// Klappmenü-Funktionalität

var isActive = ""
var started = false;
function showSubPng(which) {
    a=showSubPng.arguments;
	if (a[1]==0) MM_swapImgRestorePng(0);
	else MM_swapImgRestorePng();
	
	if (document.layers) {
	}
	else if (document.getElementById) {
		if (isActive!="") {
			document.getElementById(isActive).style.visibility="hidden";
		}
		if (which!="") {	
			document.getElementById(which).style.visibility="visible";
		}	
	}
	else {
		if (isActive!="") document.all.which.style.visibility="hidden";
		if (which!="") document.all.which.style.visibility="visible";
	}
	isActive = which;
}
function showSub(which) {
    MM_swapImgRestore();
	
	if (document.layers) {
	}
	else if (document.getElementById) {
		if (isActive!="") {
			document.getElementById(isActive).style.visibility="hidden";
		}
		if (which!="") {	
			document.getElementById(which).style.visibility="visible";
		}	
	}
	else {
		if (isActive!="") document.all.which.style.visibility="hidden";
		if (which!="") document.all.which.style.visibility="visible";
	}
	isActive = which;
	if (which=="") {
		MM_swapImgRestore();
	}
}


// Funktion überprüft Eingaben in Loginfeldern auf Standardeinträge
function checkLoginValue(which) {
	if (document.getElementById) {
		if (document.getElementById(which).value=='') {
			if (which == "mfUserName") document.getElementById(which).value=sUsername;
			if (which == "mfPassword") document.getElementById(which).value="Passwort";
		}
	}
}
function checkSuchValue(which) {
	if (document.getElementById) {
		if (document.getElementById(which).value=='') {
			if (which == "q") document.getElementById(which).value=sStichwort;			
		}
	}
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<img " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');margin-right:1px;\" border=\"0\" src=\"../../../images/filler.gif\"></img>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
//window.attachEvent("onload", correctPNG);

function getLanguage(lang) {
	if (lang != "bws") location.replace("../../../"+lang+"/index/index/index.asp");
}