﻿
function btnmail_onmouseover() {
Template1.btnmail.src = "images/mail1a.gif";
}

function btnmail_onmouseout() {
Template1.btnmail.src = "images/mail1.gif";
}

function btnprint_onmouseover() {
Template1.btnprint.src = "images/print1a.gif";
}

function btnprint_onmouseout() {
Template1.btnprint.src = "images/print1.gif";
}
function open_kraftwerk()
{

var oC = document.getElementById("btnLanguage")  ;
if (oC.innerText == "english"	)
			{
			
			window.open("film/kw/kw-uebersicht.html","Steinkohlekraftwerk",  "height=780,width=835,status=no,toolbar=no,menubar=no,location=no",false); 
	
			}
			else
			{
			window.open("film/kwe/vpp-overview.html","Power_plant",  "height=780,width=835,status=no,toolbar=no,menubar=no,location=no",false); 
			
						
			}

}

function open_kraftwerknew()
{
window.open("kw/kw-uebersicht.html","Steinkohlekraftwerk",  "height=780,width=835,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("/steagde/impressum.aspx","","",false);
	
			}
			else
			{
			
						window.open("/steagde/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.location = "http://search.steag.de/steagde/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";
			}
			else
			{
            window.location = "http://search.steag.de/steagde/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";
			}

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.location = cURL;
	return true;
	
	}


	if (cRef != "")
	{
		var oEle = document.getElementById(cRef)  ;
		if (oEle.style.display == "none")
		{
			oEle.style.display= "";
		}else {
		oEle.style.display= "none";
		}
	}
	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.location = "edefault.aspx";
	
			}
			else
			{
			oC.innerText = "english";
			Template1.sleLanguage.value = "german";
			window.location = "default.aspx";
			}
	}
	
	/* kontakt */
	if (nM == 2)
	{

		if (oC.innerText == "english"	)
			{
			window.location= "/steagde/ekontakt.aspx";
	
			}
			else
			{
    		window.location= "/steagde/kontakt.aspx";
			}
	}
	
	
	return true;
}



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";
}




 // 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;
}



function MS_ON(el,nJ) {

 el.style.backgroundColor = "white"; 
 el.style.color = "#95298f";
 	el.style.textDecoration="underline";

	
}

function MS_OFF(el,nJ) {

	el.style.backgroundColor = "#ffffff";
	el.style.color = "#333";
		el.style.textDecoration="";
		
		
}
function MS_SON(el,nJ) {

 el.style.backgroundColor = "#ffffff"; 
	el.style.color = "#95298f";
	el.style.textDecoration="underline";
		
	
}

function MS_SOFF(el,nJ) {

	el.style.backgroundColor = "#ffffff";
	el.style.color = "#333";
	el.style.textDecoration="";
	
}
