
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.navigate(cRef);
		}
	}
	else
	{	
	window.navigate(cRef);
	}
	}
	
	return false;
}
/*
function ShowMenu_onclick(oC,nM,cRef) {
	if (cRef != "")
	{
//		window.navigate(cRef);
		window.location = cRef;
	}
	return true;
}
*/
function btnImpressum_onclick() {

var oC = document.getElementById("btnLanguage")  ;
if (oC.innerText == "english"	)
			{
			
			window.open("/pm/eimpressum.aspx","","",false);
	
			}
			else
			{
			
						window.open("/pm/eimpressum.aspx","","",false);
			}

return false;
}
function btnSitemap_onclick() {

var oC = document.getElementById("btnLanguage")  ;
if (oC.innerText == "english"	)
			{
			
			window.location = "/pm/esitemap.aspx";
	
			}
			else
			{
			
						window.location = "/pm/esitemap.aspx";
			}

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)
		{  
			// alert("jo 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("/pm/suche/esuche.aspx?suche="+document.forms[0].txtSuche.value) ;
			window.location = "/pm/suche/esuche.aspx?suche="+document.forms[0].txtSuche.value;
	
			}
			else
			{
			
//			window.navigate("/pm/suche/esuche.aspx?suche="+document.forms[0].txtSuche.value) ;
			window.location = "/pm/suche/esuche.aspx?suche="+document.forms[0].txtSuche.value;
			}

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 != "")
	{
	var Teile = cURL.split("?");
	if (Teile.length > 1)
	{
		if (Teile[1].toUpperCase()=="NICHTS")
		{
			return false;
		}
		if (Teile[1].toUpperCase()=="BLANK")
		{
		window.open(Teile[0],"_Blank");
		}
		else
		{
			// window.navigate(cURL);
			window.location = cURL;
		}
	}
	else
	{	
	// window.navigate(cURL);
	window.location = cURL;
	}
	
	return false;
	
	}


	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 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";
			window.location = "/pm/edefault.aspx";
	
			}
			else
			{
			oC.innerText = "english";
			window.location = "/pm/edefault.aspx";
			}
	}
	
	/* kontakt */
	if (nM == 2)
	{

		if (oC.innerText == "english"	)
			{
				window.location= "/pm/ekontakt.aspx";
	
			}
			else
			{
				window.location= "/pm/ekontakt.aspx";
			}
	}
	
	
	return true;
}

function open_news(strUrl)
{
	 window.open(strUrl,"_blank","height=675,width=786,status=yes,toolbar=no,menubar=no,location=no",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){
		}
				
		
		
}


