

function reloadPageOnResize ( init ) {
	( init == true ) ? onresize = reloadPageOnResize : location.reload() ;
}

if ( (navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4) ) reloadPageOnResize ( true ) ;

// für Counter-Pixel

function replace(text,from,to)  // replace strings in strings
 {
    while (( ti=text.indexOf(from) ) >= 0)
    {
        text = text.substr(0,ti)+to+text.substr(ti+1);
    }    
    return text;
 } 

function x_escape(text)  // extended escape function
 {
    var x_chars = "*2A+2B-2D.2E/2F_5F";
    
    text = escape(text);
    for (ci=0; ci < x_chars.length; ci+=3)
    {
        text = replace(text,x_chars.substr(ci,1),"%"+x_chars.substr(ci+1,2));
    }
    return text;
 }   


function getCounterPixel (myurl, params) {
        var CGI="http://count.eon.com/cgi-bin/count/eon-engineering/"+myurl;
        if ((params.substring(0,1) != "&") && (params != "")) params = "&" + params;
		
		if (myurl.indexOf('?') > -1) { 
			CGI += "&ref=";
		} else {
			CGI += "?ref=";
		}
			
		if (parent.location == document.referrer) {
            document.write("<IMG SRC=\""+CGI+x_escape(parent.document.referrer)+params+"\" WIDTH=\"1\" HEIGHT=\"1\">");
			
        } else {
            document.write("<IMG SRC=\""+CGI+x_escape(document.referrer)+params+"\" WIDTH=\"1\" HEIGHT=\"1\">");
			
        }
}

function openPlugins (lang) {
	if(lang == "en"){
		var url = "http://apps.eon-energie.com/frameset_english/service_eng/service_eng.htm?target=plugins";
		var temp = "width=600 ,height=580, location=no, menubar=no";
	}else{
		var url = "http://apps.eon-energie.com/frameset_german/service/service.htm?target=plugins";
		var temp = "width=600 ,height=580, location=no, menubar=no";
	}
	window.open( url, "service", temp ) ;
}

/*allgemein*/
function openNamedPopup(url,name,width,height) {
	namedWin = window.open(url,name,"width="+width+",height="+height+",resizable=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no");
	namedWin.focus();
}