// JavaScript Document
function go(){	 
//	currentMenu();
	wrapperHeigthFix();
	onPageLink('onPageStyle','leftnavcontainer')	
	MailLink('pagewidth','')

//	onPageLink('onPageStyle','onPageField')	
// P7_Uberlink('p7uberlink','p7bod')
};

function currentMenu(){
	url= ""+window.location.href
	if(url.indexOf("http") >= 0){url = url.substring(7,url.length);}
	if(url.indexOf("/") >= 0){url = url.substring(url.indexOf("/")+1,url.length);}
	if(url.indexOf("/") >= 0){url = url.substring(0,url.indexOf("/"));}else{url=""};
	if (url == "distributor"){url = "download"};
	if (document.getElementById("topMenu_"+url)){
		document.getElementById("topMenu_"+url).style.color = '#303030';
		document.getElementById("topMenu_"+url).style.background = '#f8f8f8';
		document.getElementById("topMenu_"+url).style.background = '#f8f8f8 url(/css/images/bg-b9e5fb-FadeOut-menu.png)';
	}
};

function wrapperHeigthFix(){
	var Hi
	if (parseInt(navigator.appVersion)>3){
		if (navigator.appName=="Netscape"){Hi = window.innerHeight;}
		if (navigator.appName.indexOf("Microsoft")!=-1){Hi = document.documentElement.clientHeight;}
	}
	Hi = Hi - 150;
	if (document.getElementById("tabelwrapper")){document.getElementById("tabelwrapper").style.height = Hi+'px';};
};


function onPageLink(cl,d){
	var i,ob,tA,h=document.location.href;
	if(document.getElementById){
		ob=(d)?document.getElementById(d):document;
		if(ob){
			tA=ob.getElementsByTagName('A');
			for(i=0;i<tA.length;i++){
				if(tA[i].href==h){
					tA[i].className=cl;
				}
			}
		}
	}
}

function MailLink(d,r){
	var i,ob,tA,L,T;
	if(document.getElementById){
		ob=(d)?document.getElementById(d):document;
		if(ob){
			tA=ob.getElementsByTagName('A');
			for(i=0;i<tA.length;i++){
				L=tA[i].href
				T=tA[i].innerHTML
				if(L.indexOf("mailto:")== 0){
					ex = new RegExp("€"+r,"g");
					ex2 = new RegExp("%E2%82%AC"+r,"g");
					tA[i].href=L.replace(ex,"@");
					if (navigator.appName != "Microsoft Internet Explorer"){tA[i].href=L.replace(ex2,"@");}
					tA[i].innerHTML=T.replace(ex,"@");
				}
			}
		}
	}
}
