function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function FindObj(n, d) { //v4.01
  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]; 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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function ShowHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=ShowHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  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; }}
}

//***********************************************************************************
//navigation

function nav_intro_over(pid) {

	if (document.all){
		document.all["nav_over"].style.visibility  = "visible";
		
		xpos_offset=0;
		for (x=1; x<=pid; x++) {
			xpos_offset+=document.all["link"+x].width;
			xpos_offset++;
		}

		document.all["nav_over"].style.left=288+xpos_offset-document.all["link"+pid].width;
		document.all["nav_over"].style.top=77;
		document.all["img_over"].style.width=document.all["link"+pid].width;
	}
	
	if (!document.all && document.getElementById){
		document.getElementById("nav_over").style.visibility  = "visible";
		
		xpos_offset=0;
		for (x=1; x<=pid; x++) {
			xpos_offset+=document.getElementById("link"+x).width;
			xpos_offset++;
		}

		document.getElementById("nav_over").style.left=288+xpos_offset-document.getElementById("link"+pid).width;
		document.getElementById("nav_over").style.top="77px";
		document.getElementById("img_over").style.width=document.getElementById("link"+pid).width+"px";
	}

}



var aNavigation=new Array();

// Definition von y-Koordinate
aNavigation[1] = 182;
aNavigation[2] = 202;
aNavigation[3] = 222;
aNavigation[4] = 242;
aNavigation[5] = 262;
aNavigation[6] = 282;
aNavigation[7] = 302;
aNavigation[8] = 477;
aNavigation[9] = 497;
aNavigation[10] = 517;
aNavigation[11] = 537;
aNavigation[12] = 557;

function nav_over(pid) {

	if (document.all){
		document.all["nav_over"].style.visibility  = "visible";
		if (pid > 7) {
			document.all["nav_over"].style.left=886;
		}
		else {
			document.all["nav_over"].style.left=0;
		}
		document.all["nav_over"].style.top=aNavigation[pid];
	}
	
	if (!document.all && document.getElementById){
		document.getElementById("nav_over").style.visibility  = "visible";
		
		if (pid > 7) {
			document.getElementById("nav_over").style.left="886px";
		}
		else {
			document.getElementById("nav_over").style.left="0px";
		}
		
		document.getElementById("nav_over").style.top=aNavigation[pid]+"px";
	}

}

function nav_out() {
		ShowHideLayers('nav_over','','hide');
}

function nav_active(pid) {

	if (document.all){
		document.all["nav_active"].style.visibility  = "visible";
		document.all["nav_active"].style.left=0;
		document.all["nav_active"].style.top=aNavigation[pid];
	}
	
	if (!document.all && document.getElementById){
		document.getElementById("nav_active").style.visibility  = "visible";
		document.getElementById("nav_active").style.left="0px";
		document.getElementById("nav_active").style.top=aNavigation[pid]+"px";
	}

}

//***********************************************************************************
//subnavigation
var aSubNavigation=new Array(3);
for (i=0; i<3; i++) {
	aSubNavigation[i]=new Array(5);
}

function subnav_over(pid,sid,subsub) {

	restore_subsub();

	if (document.all){
		document.all["subnav_over"].style.visibility  = "visible";
		
		xpos_offset=0;
		for (x=2; x<=sid; x+=2) {
			xpos_offset+=document.all["sublink"+(x-2)].width;
			xpos_offset++;
		}

		document.all["subnav_over"].style.left=375+xpos_offset;
		document.all["subnav_over"].style.top=76;
		document.all["img_over"].style.width=document.all["sublink"+sid].width;
		
		document.all["subsub_"+subsub].style.left=375+xpos_offset;
		ShowHideLayers('subsub_'+subsub,'','show');		
	}
	
	if (!document.all && document.getElementById){
		document.getElementById("subnav_over").style.visibility  = "visible";
		
		xpos_offset=0;
		for (x=2; x<=sid; x+=2) {
			xpos_offset+=document.getElementById("sublink"+(x-2)).width;
			xpos_offset++;
		}

		document.getElementById("subnav_over").style.left=375+xpos_offset;
		document.getElementById("subnav_over").style.top="76px";
		document.getElementById("img_over").style.width=document.getElementById("sublink"+sid).width+"px";
		
		document.getElementById("subsub_"+subsub).style.left=375+xpos_offset;
		ShowHideLayers('subsub_'+subsub,'','show');
	}
	
	ShowHideLayers('restore_subsub_layer','','show');

}

function subnav_out() {
		//ShowHideLayers('subnav_over','','hide');
}

function subnav_active(pid,sid) {

	if (document.all){
		document.all["subnav_active"].style.visibility  = "visible";
		
		xpos_offset=0;
		for (x=2; x<=sid; x+=2) {
			xpos_offset+=document.all["sublink"+(x-2)].width;
			xpos_offset++;
		}

		document.all["subnav_active"].style.left=375+xpos_offset;
		document.all["subnav_active"].style.top=76;
		document.all["img_active"].style.width=document.all["sublink"+sid].width;
	}
	
	if (!document.all && document.getElementById){
		document.getElementById("subnav_active").style.visibility  = "visible";
		
		xpos_offset=0;
		for (x=2; x<=sid; x+=2) {
			xpos_offset+=document.getElementById("sublink"+(x-2)).width;
			xpos_offset++;
		}

		document.getElementById("subnav_active").style.left=375+xpos_offset;
		document.getElementById("subnav_active").style.top="76px";
		document.getElementById("img_active").style.width=document.getElementById("sublink"+sid).width+"px";
	}

}

//***********************************************************************************
//Navigation aktiv setzen
function set_active(pid,sid) {
	nav_active(pid);
	subnav_active(pid,sid);
	
	//if (pid == 2 || (pid == 3 && sid == 0) || (pid == 4 && sid <= 6) || (pid == 6) || (pid == 5 && sid == 6)  || (pid == 7 && sid == 10)) {
		//ShowHideLayers('subsubnavigation_pad','','show');
		//ShowHideLayers('subsub_dropdown','','show');
		//document.getElementById("content").style.top="130px";
	//}
}