function btnmail_onmouseover() {
//Template1.btnmail.src = "images/mail1a.gif";
// btnmail.src = "images/mail1a.gif";
document.all["btnmail"].src = "images/mail1a.gif";
}

function btnmail_onmouseout() {
// Template1.btnmail.src = "images/mail1.gif";
document.all["btnmail"].src = "images/mail1.gif";
}

function btnprint_onmouseover() {
document.all["btnprint"].src = "images/print1a.gif";
}

function btnprint_onmouseout() {
document.all["btnprint"].src ="images/print1.gif";
}
function open_kraftwerk()
{
window.open("kraftwerk/kraftwerk.htm","Steinkohlekraftwerk",  "height=310,width=600,status=no,toolbar=no,menubar=no,location=no",false); 
}







function ShowMenu_onclick(oC,nM,cRef) {
	
if (cRef != "")
	{
	var Teile = cRef.split("?");
	if (Teile.length > 1)
	{
		if (Teile[1].toUpperCase()=="BLANK")
		{
		window.open(Teile[0],"_Blank");
		}
		else
		{
			window.location= cRef;
		}
	}
	else
	{	
	window.location = cRef;
	}
	}
	
	return true;
}



function btnImpressum_onclick() {

var oC = document.getElementById("btnLanguage")  ;
if (oC.innerText == "english"	)
			{
			
			window.open("/spi/eimpressum.aspx","","",false);
	
			}
			else
			{
			
						window.open("/spi/eimpressum.aspx","","",false);
			}

return false;
}
function document_onkeydown(field, evt) {
try{

 evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));

	if (document.activeElement.id == "txtSuche")
	{
		var oC = document.getElementById("txtSuche");
		if (oC.value.length > 0 && charCode == 13)
		{  
			
			open_suche();
			return false;
		}
	}
	}catch(e){}
	return true;
 }

function checkKeys( field, evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
    // check if return is pressed AND the text has a value 
     if (charCode == 13 && field.value.length > 0)
     {
     open_suche();
     }
}
function open_suche()
{
var oC = document.getElementById("btnLanguage")  ;
if (oC.innerText == "english"	)
			{
			
//			window.navigate("/spi/suche/suche.aspx?suche="+document.forms[0].txtSuche.value) ;
			// window.location = "/spi/suche/suche.aspx?suche="+document.forms[0].txtSuche.value;
			// window.location = "http://search.steag.de/spi/suche.aspx?Search="+document.forms[0].txtSuche.value+"~section=steagag~results_option=scores~begin=0~subdivision=steag~method=All%20my%20words~orgsection=steagag~displaylanguage=german~Submit.x=12~Submit.y=7";
	
			window.open("http://www.google.de/search?hl=en&as_qdr=all&q=+site%3Awww.steagstatepower.com+"+document.forms[0].txtSuche.value ,"","",false);
			}
			else
			{
			
		//	window.navigate("/spi/suche/esuche.aspx?suche="+document.forms[0].txtSuche.value) ;
//			window.location = "/spi/suche/esuche.aspx?suche="+document.forms[0].txtSuche.value;
        //    window.location = "http://search.steag.de/spi/suche.aspx?Search="+document.forms[0].txtSuche.value+"~section=steagag~results_option=scores~begin=0~subdivision=steag~method=All%20my%20words~orgsection=steagag~displaylanguage=english~Submit.x=12~Submit.y=7";
		window.open("http://www.google.de/search?hl=en&as_qdr=all&q=+site%3Awww.steagstatepower.com+"+document.forms[0].txtSuche.value ,"","",false);
			}

return false;
}

function mshow(cMenu){
var oEle = document.getElementById(cMenu)  ;
		
		if (oEle.style.display == "none")
		{
			oEle.style.display= "";
		}else {
		oEle.style.display= "none";
		}

}


function ShowMMenu_onclick(oC,nM,cRef,cURL) {
	if (cURL != "")
	{
//	window.navigate(cURL);
	window.location = cURL;
	return true;
	
	}


	if (cRef != "")
	{
		// alert(cRef);
		var oEle = document.getElementById(cRef)  ;
		
		if (oEle.style.display == "none")
		{
			oEle.style.display= "";
		}else {
		oEle.style.display= "none";
		}
		
		
		// window.navigate(cRef);
	}
	return true;
}

function ShowTopMenu_onclick(oC, nM,cRef) {

	/* german/english */
	if (nM == 1)
	{

		if (oC.innerText == "english"	)
			{
			oC.innerText = "german";
//			Template1.sleLanguage.value = "english";
//			window.navigate("/spi/edefault.aspx") ;
			window.location = "/spi/edefault.aspx";
	
			}
			else
			{
			oC.innerText = "english";
	//		Template1.sleLanguage.value = "german";
//			window.navigate("/spi/default.aspx") ;
			window.location = "/spi/default.aspx";
			}
	}
	
	/* kontakt */
	if (nM == 2)
	{

		if (oC.innerText == "english"	)
			{
			
//			window.navigate("/spi/ekontakt.aspx") ;
			window.location= "/spi/ekontakt.aspx";
	
			}
			else
			{
			
	//		window.navigate("/spi/kontakt.aspx") ;
			window.location= "/spi/kontakt.aspx";
			}
	}
	
	
	return true;
}

function open_news(strUrl)
{
	
	//window.open(strUrl,"","",false);
	//// window.open(strUrl,"_blank","height=426,width=786,status=yes,toolbar=no,menubar=no,location=no",false);
	// window.open("about:blank","_blank","height=426,width=786,status=yes,toolbar=no,menubar=no,location=no",false);
	// window.open(strUrl,"_blank","height=675,width=786,status=yes,toolbar=no,menubar=no,location=no",false);
 window.open(strUrl,"_blank","scrollbars=1,resizable=1,height=675px,width=786px,status=1,toolbar=0,menubar=0,location=0",false);

}

function MS_TOPON(el) {
 // el.style.backgroundColor = "#A0BEC8"; 
//	el.style.backgroundColor = "#FF9137";
	el.style.color = "#ffffff";
}

function MS_TOPOFF(el) {
	// el.style.backgroundColor = "#ffffff";
	el.style.color = "#0E178C";
}


function MS_ON(el,nJ) {

 el.style.backgroundColor = "#B0C1C9"; 
//	el.style.backgroundColor = "#FF9137";
	el.style.color = "#0E178C";

	
}

function MS_OFF(el,nJ) {

	el.style.backgroundColor = "#ffffff";
	el.style.color = "#0E178C";
		
		
}
function MS_SON(el,nJ) {

 el.style.backgroundColor = "#B0C1C9"; 
	el.style.color = "#0E178C";
		
	
}

function MS_SOFF(el,nJ) {

	el.style.backgroundColor = "#ffffff";
	el.style.color = "#0E178C";
	
}


 // change layout on HighDPI screens when IE not scaling
  function fnScaleManually()
  {
    // normal DPI		
    var constNorm = 96; 
	try{			
		// scaling is off and DPI higher than normal
		if ((screen.deviceYDPI == screen.logicalYDPI) 
		&& (screen.deviceYDPI > constNorm))
		{									
			document.body.style.zoom = 
			constNorm / screen.logicalYDPI;				
		}			
		}
		catch(e){
		}
  }
  
  
  
function window_onload() {
var nCount = 0;
	// fnScaleManually();
	
		try{
		
			def_menu();
					
			
		}
		catch(e){
		}
		
	for (nCount =0; nCount < 20;nCount++){
		try{
			var oEle = document.getElementById("SSSMenu"+nCount)  ;
			oEle.style.display = "none";
			}
		 catch(e){
			nCount = 20;
			}
		}
		
	try{
		
			def_menu();
					
			
		}
		catch(e){
		}
try{
		
			def_menu1();
					
			
		}
		catch(e){
		}
				
		
		
}
function window_onresize() {
// window.div1.style.left = Bild.offsetLeft;
}


