// JS - 2005/2006 - Sipke


// Function to change the background of the main navigation bar, depending on the hovered link
function SetNavBackgr(imgName){
    if(imgName==''){
        document.getElementById("nav").style.backgroundImage="none";
    }else if(imgName.charAt(0)=='+'){
        imgName=imgName.replace('+','');
        document.getElementById("nav").style.backgroundImage="url(siteimg/nav_backgr_" + imgName + ".png)";
    } else {
        document.getElementById("nav").style.backgroundImage="url(../siteimg/nav_backgr_" + imgName + ".png)";
    }
}


function SwitchLang(lang){
	CheckChildren(document.body,lang);
}


function CheckChildren(mother,lang){
	var str=mother.childNodes;
	for (var i=0,si;si=str[i];i++){
		if (si.nodeType==1){
		    if (si.getAttribute('lang')){
		        if(si.getAttribute('lang')==lang){ 
    		        si.style.display = (si.nodeName=='DIV' || si.nodeName=='P' || si.nodeName=='UL' || si.nodeName=='OL')? 'block' : 'inline'
    		    } else {si.style.display = 'none'}
	        } else {
    	        CheckChildren(si,lang);
	        }
	    }
	}	
}
