var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4&&parseFloat(navigator.appVersion) < 5) ? 1 : 0;
var isMinNS6 = (isMinNS4 && navigator.userAgent.indexOf("Gecko")>=0) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.")) >= 0 ? 1 : 0;
var isDOM = (document.getElementById) ? 1 : 0;

//macht entsprechende container sicht- oder unsichtbar

function show(id) {
  if (isMinIE4) document.all[id].style.visibility = "visible" ; 
  if (isMinIE4||isDOM) document.getElementById(id).style.visibility = "visible";
  if (isMinNS4) document.layers[id].visibility = "show";
}

function hide(id) {
  if (isMinIE4) document.all[id].style.visibility = "hidden";  
  if (isMinIE4||isDOM) document.getElementById(id).style.visibility = "hidden";
  if (isMinNS4) document.layers[id].visibility = "hide";
}

var s = 0;
var h = 0;

function reset(i){
	if (i == 0){
		hide("subnav01");
		hide("subnav02");
	}
	if (i == 1){
		hide("subnav02");
		show("subnav01");
	}
	if (i == 2){
		hide("subnav01");
		show("subnav02");
	}
}

function slowhide(id2) {
	if (id2  == "subnav01"){
  		h2 = window.setTimeout("hide3(2);",600);
		s = 1;
  		s2 = window.setTimeout("show3(1);",600);
		h = 1;
	}
	if (id2  == "subnav02"){
  		h2 = window.setTimeout("hide3(1);",600);
		s = 1;
  		s2 = window.setTimeout("show3(2);",600);
		h = 1;
	}
	if (id2  == ""){
  		h2 = window.setTimeout("hide3(1);",600);
		s = 1;
  		s2 = window.setTimeout("hide3(2);",600);
		h = 1;
	}
}

function keep(){
	if (h == 1){
		window.clearTimeout(h2);
		h = 0;
	}
	if (s == 1){
		window.clearTimeout(s2);
		s = 0;
	}
}

function show3(i) {
	if (i == 1){
		show("subnav01");
	}
	if (i == 2){
		show("subnav02");
	}
}

function hide3(i) {
	if (i == 1){
		hide("subnav01");
	}
	if (i == 2){
		hide("subnav02");
	}
}

function subnav(j){
	if (j == 01){
	keep();
	reset(0);
	show("subnav01");
	}
	if (j == 02){
	keep();
	reset(0);
	show("subnav02");	
	}
}

function navhi(id,status){
	if (status == "hi"){
		document.getElementById(id).style.color='#96BCEB';
	}else{
		document.getElementById(id).style.color='#025DBB';
	}
}



var i = 0;
function change_map(){
	if (i == 0){
		document.getElementById("karte").src='img/img_kontakt_02.gif';
		i = 1;
	}else{
		document.getElementById("karte").src='img/img_kontakt_01.gif';
		i = 0;
	}
}

function change_map1(){
	document.getElementById("karte").src='img/img_kontakt_02.gif';
	i = 1;
}

function sitemap(){
	var popUpSizeX=675;
	var popUpSizeY=740;
	var popUpLocationX= 200;
	var popUpLocationY= 200;
	var popUpURL="sitemap.php";
	pop = window.open(popUpURL,'sitemap','width='+popUpSizeX+',height='+popUpSizeY+',left='+popUpLocationX+',top='+popUpLocationY+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
	pop.location=popUpURL;
}

function openinmain(i){
	opener.location.href=i;
}