// Arrays and function for Menu Data







var area1 = new Array();



var area2 = new Array();



var area3 = new Array();



var area4 = new Array();



var area5 = new Array();



var area6 = new Array();



var area7 = new Array();



var area8 = new Array();











function item(id,order,name,path,text){



	this.id = id;


	


	this.order = order;



	this.name = name;



	this.path = path;


	


	this.text = text;



	



	this.child = new Array();



}







// Counter Variables for Sub Menu 







var index2 = 0;



var index3 = 0;







function getLevel(){



    if (level != "default"){



        var pos1 = level.indexOf("-");



        if (pos1 != -1){



            level1 = level.substring(0,pos1);    



            var pos2 = level.indexOf("-", pos1+1);  



            if (pos2 != -1){



                level2 = level.substring(pos1+1,pos2);



                level3 = level.substring(pos2+1,level.length);



            } 



            else{



                level2 = level.substring(pos1+1,level.length);



                level3 = "";



            }



        }



        else{



            level1 = level



            level2 = "";



            level3 = "";



        } 



    }



    else{



        level1 = "default";



        level2 = "default";



        level3 = "default";



    } 



}







// Browser detection







function BrowserCheck()



	{



		var b = navigator.appName;



		if (b=="Netscape") this.b = "ns"



		else if (b=="Microsoft Internet Explorer") this.b = "ie"



		else this.b = b



		



		var p = navigator.platform.toLowerCase();



		if (p=="win32") this.p = "win"



		else if (p=="macppc") this.p = "mac"



		else if (p=="x11") this.p = "x11"



		else this.p = p



		



		this.uA = navigator.userAgent.toLowerCase();



		this.v = parseInt(navigator.appVersion);



		this.ns4 = (this.b=="ns" && this.v==4);



		this.ns6 = (this.b=="ns" && this.v>=5);



		this.ie4 = (this.uA.indexOf('msie 4')>0);



		this.ie5 = ((this.uA.indexOf('msie 5')>0)||(this.uA.indexOf('msie 6')>0));



		this.winns4 = (this.b=="ns" && this.p=="win" && this.v==4);



		this.winns6 = (this.b=="ns" && this.p=="win" && this.v>=5);



		this.winie4 = (this.p=="win" && this.uA.indexOf('msie 4')>0);



		this.winie5 = (this.p=="win" && ((this.uA.indexOf('msie 5')>0)||(this.uA.indexOf('msie 6')>0)));



		this.macns4 = (this.b=="ns" && this.p=="mac" && this.v==4);



		this.macns6 = (this.b=="ns" && this.p=="mac" && this.v>=5);



		this.macie4 = (this.p=="mac" && this.uA.indexOf('msie 4.5')>0);



		this.macie5 = (this.p=="mac" && this.uA.indexOf('msie 5')>0);



		this.other = ((this.p!="mac" && this.p!="win") || (this.b!="ns" && this.b!="ie") || this.uA.indexOf('aol')>0 || this.uA.indexOf('opera')>0);



		



		if (this.ie5) this.v = 5



		this.min = (this.ns4 || this.ie4);



	}







is = new BrowserCheck();







function CSSFileChooser()



	{



		BrowserCheck();



		if (ns4) document.write("<LINK REL='stylesheet' TYPE='text/css' HREF='/general/data/webasto_n4.css'>");



		else document.write("<LINK REL='stylesheet' TYPE='text/css' HREF='/general/data/webasto_ie.css'>");



	}		







// resize (Netscape)	



	



if(is.ns4) {



    orgWidth = self.innerWidth;



    orgHeight = self.innerHeight;



    self.onresize = reDo;



}







function reDo(){



    if (self.innerWidth==orgWidth && self.innerHeight==orgHeight) return;



    self.location.reload();



}







// Layer Menu (cross browser)







function findObj(n, d) {



	  var p,i,x;  



	  



	  if(!d) d=document; 



	  if((p=n.indexOf("?"))>0&&parent.frames.length) {



	  	d=parent.frames[n.substring(p+1)].document; 



		n=n.substring(0,p);



	  }



	  if(!(x=d[n])&&d.all) 



	  	x=d.all[n]; 



	  else if(!(x=d[n])&&d.getElementById) 



	  	x=d.getElementById(n); 



	  



	  for (i=0;!x&&i<d.forms.length;i++) 



	  	x=d.forms[i][n];



	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) 



	  	x=findObj(n,d.layers[i].document); 



		



	  return x;



}







function showHideLayers() {



	  var i,p,v,obj,args=showHideLayers.arguments;



	  



	  for (i=0; i<(args.length-2); i+=3) 



	  	if ((obj=findObj(args[i]))!=null) { 



			v=args[i+2];



		    if (obj.style) { 



				obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; 



			}



		    obj.visibility=v; 



		}



} 







// Functions for Layer Menu







function show(id) {



	if (document.layers) {



		document.layers[id].visibility = "show";



	}



	else if (document.all) {



		document.all[id].style.visibility = "visible";



	}



	else {



		document.getElementById(id).style.visibility = "visible";



	}



}







function hide(id) {



	if (document.layers) {



		document.layers[id].visibility = "hide";



	}



	else if (document.all) {



		document.all[id].style.visibility = "hidden";



	}



	else {



		document.getElementById(id).style.visibility = "hidden";



	}



}



	



function showMenu(layer){



	if(document.layers){



		eval('document.layers["'+layer+'"].visibility = "show"');



	}	



	else if(document.all){



		eval('document.all["'+layer+'"].style.visibility="visible"');



	}



	else{



		eval('document.getElementById("'+layer+'").style.visibility = "visible"');



	}		



}







function hideMenu(layer){



	if(document.layers){



		eval('document.layers["'+layer+'"].visibility = "hide"');



	}	



	else if(document.all){



		eval('document.all["'+layer+'"].style.visibility="hidden"');



	}



	else{



		eval('document.getElementById("'+layer+'").style.visibility = "hidden"');



	}		



}







function show_area1(){



	showHideLayers('area1','','show');



}







function hide_area1(){



	showHideLayers('area1','','hide');



}







function show_area2(){



	showHideLayers('area2','','show');



}



	



function hide_area2(){



	showHideLayers('area2','','hide');



}







function show_area3(){



	showHideLayers('area3','','show');



}







function hide_area3(){



	showHideLayers('area3','','hide');



}







function show_area4(){



	showHideLayers('area4','','show');



}







function hide_area4(){



	showHideLayers('area4','','hide');



}







function show_area5(){



	showHideLayers('area5','','show');



}







function hide_area5(){



	showHideLayers('area5','','hide');



}







function show_area6(){



	showHideLayers('area6','','show');



}







function hide_area6(){



	showHideLayers('area6','','hide');



}



	



function show_area7(){



	showHideLayers('area7','','show');



}







function hide_area7(){



	showHideLayers('area7','','hide');



}



	



function show_area8(){



	showHideLayers('area8','','show');



}







function hide_area8(){



	showHideLayers('area8','','hide');



}







function hide_all(){



	hide_area1();



	hide_area2();



	hide_area3();



	hide_area4();



	hide_area5();



	hide_area6();



	hide_area7();



	hide_area8();



}		