﻿



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 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;
}
/* grey border for hor. navigation*/
function greyborder(el)
{
 el.style.borderBottomColor = "#ececec";
}


/* grey border for hor. navigation*/
function greyborderOff(el)
{
 el.style.borderBottomColor = "white";
}


/* grey border for hor. navigation*/
function dpborder(el)
{
 el.style.borderBottomColor = "#95298f";
}


/* grey border for hor. navigation*/
function dpborderOff(el)
{
 el.style.borderBottomColor = "#95298f";
}


function MS_TOPON(el) {

}

function MS_TOPOFF(el) {

	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;
try{
var oF = document.getElementById("dFooterLine")  ;
var oC = document.getElementById("btnLanguage")  ;
		if (oC.innerHTML == "english"	)
			{
				oF.innerHTML= '<div id="Div2" class="dFooter" style="z-index: 6; width: 663px;"><span><a href="/ees/impressum.aspx">Impressum</a></span><span > | </span><span ><a href="/ees/rechtlicher_hinweis.aspx">Rechtlicher Hinweis</a></span><span >| </span><span ><a href="/ees/datenschutz.aspx">Datenschutz</a> </span></div>';
			}
			else
			{
			
				oF.innerHTML= '<div id="Div2" class="dFooter" style="z-index: 6; width: 663px;"><span><a href="/ees/eimpressum.aspx">Imprint</a></span><span > | </span><span ><a href="/ees/erechtlicher_hinweis.aspx">Legal notice</a></span><span >| </span><span ><a href="/ees/edatenschutz.aspx">Privacy policy</a> </span></div>';

			}
			}
			catch(e)
			{
			}
	// 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() {

}



function MS_ON(el,nJ) {
    el.style.backgroundColor = "white"; 
    el.style.color = "#333333";
 	el.style.textDecoration="none";

	
}

function MS_OFF(el,nJ) {

	el.style.backgroundColor = "#ffffff";
	el.style.color = "#666666";
	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="";
	
}
