function menuhover(imgid, ln){
menustr = window.location.search.substring(1);
menustr = menustr.replace('#','');
values = menustr.split("&");
menuid = values[0].split("=");
if(imgid == 'kerntext' ){
	document.body.style.cursor = "pointer";
	 if(menuid[1] == 'menu1'){
	 
	} 
	else {
	document.getElementById(imgid).src = ln + "/hover/menu/" + imgid + ".jpg";
 	
	}
}
else if(menuid[1] != imgid){
        document.getElementById(imgid).src = ln + "/hover/menu/" + imgid + ".gif";
        document.body.style.cursor = "pointer";
    }
}

function logohover(logoid){
	document.getElementById(logoid).src = "menu/logo_hover.jpg";
}

function logopassive(logoid){
	document.getElementById(logoid).src = "menu/logo_passive.jpg";
}

function menupassive(imgid, ln){
menustr = window.location.search.substring(1);
menustr = menustr.replace('#','');
values = menustr.split("&");
menuid = values[0].split("=");
if(imgid == 'kerntext') {
	if(menuid[1] == 'menu1'){
	 
	} else{
		document.getElementById(imgid).src = ln + "/menu/" + imgid + ".jpg";
		document.body.style.cursor = "default";
	}
}
else if(menuid[1] != imgid && imgid != 'kerntext'){
	
        document.getElementById(imgid).src = ln + "/menu/" + imgid + ".gif";
        document.body.style.cursor = "default";
    }
}

function submenuhover(imgid){
str = document.getElementById('contentframe').src;
aStr = str.split("?");
smid = aStr[1].split("=");
if(imgid != smid[1]){
document.body.style.cursor = "pointer";
document.getElementById(imgid).style.color='#999999';
}
}

function submenupassive(imgid, ln){
str = document.getElementById('contentframe').src;
aStr = str.split("?");
smidall = aStr[1].split("=");
smid = smidall[1].split("&");

if(imgid != smid[0]){
    document.body.style.cursor = "default";
    document.getElementById(imgid).style.color='#666666';
}
}

function bottommenuhover(imgid,ln){
	lng = ln == 'en'? 'en':'';
document.body.style.cursor = "pointer";
document.getElementById(imgid).src='nav/'+lng+'hellgrau_' + imgid + '.gif';
}

function bottomtextmenuhover(imgid){
document.body.style.cursor = "pointer";
}

function bottommenupassive(imgid,ln){
	lng = ln == 'en'? 'en':'';
    document.body.style.cursor = "default";
    document.getElementById(imgid).src='nav/'+lng+'dunkelgrau_' + imgid + '.gif';

}


function menugoto(imgid){
    pageurl = window.location.href.split("?");
    pageurl1 = pageurl[0];
    if(imgid == 'kerntext'){
		window.location.href = pageurl1 + "?menuid=menu1";
	} else {
    window.location.href = pageurl1 + "?menuid=" + imgid;
		}
}

function getborders(menuid){

   document.getElementById("top").src = menuid + "/border/top.jpg";
   document.getElementById("left").src = menuid + "/border/left.jpg";
   document.getElementById("right").src = menuid + "/border/right.jpg";
   document.getElementById("bottom").src = menuid + "/border/bottom.jpg";
}
function menupreload(){
    if(document.images){
    	img01=new Image(98,98);
    	img01.src = "menu/menu_hover.jpg";
        img01=new Image(98,98);
    	img01.src = "menu/menu_active.jpg";
        img01=new Image(98,98);
    	img01.src = "menu/menu_passive.jpg";
        img1=new Image(152,31);
        img1.src="hover/menu/menu1.gif";
        img2=new Image(152,30);
        img2.src="hover/menu/menu2.gif";
        img3=new Image(152,31);
        img3.src="hover/menu/menu3.gif";
        img4=new Image(152,31);
        img4.src="hover/menu/menu4.gif";
        img5=new Image(152,31);
        img5.src="hover/menu/menu5.gif";
        img6=new Image(152,31);
        img6.src="hover/menu/menu6.gif";
        img7=new Image(152,31);
        img7.src="hover/menu/menu7.gif";
    }
}
function menuinit(ln){
    menustr = window.location.search.substring(1);
    menustr = menustr.replace('#','');
    values = menustr.split("&");
    menuid = values[0].split("=");
    
    if(menuid[1]){
    	if(menuid[1] == 'menu1'){    	
    		document.getElementById('kerntext').src = ln + "/active/menu/kerntext.jpg";
    		document.getElementById(menuid[1]).src = ln + "/active/menu/" + menuid[1] + ".gif";
    	} else {
    		document.getElementById(menuid[1]).src = ln + "/active/menu/" + menuid[1] + ".gif";
    	}
    	
    }
    menupreload();
}

function getcontenturl(submenuid, ln){
	
    document.getElementById('contentframe').src = 'content.php?submenuid=' + submenuid + '&ln=' + ln;
    aels = document.getElementsByTagName('div');
    for(y in aels) {
        if(aels[y].id != undefined){
            document.getElementById(aels[y].id).style.color= '#666666';
        }
    }
    
    if(document.getElementById(submenuid)){
    	
    	document.getElementById(submenuid).style.color = '#99cc66';
    }
}

function changelang(ln){
if(ln){
	str = window.location.search
	window.location.href = 'index_en.php' + str;
} else {
	str = window.location.search
	window.location.href = 'index.php' + str;
}
}