//Browserweiche CSS
if (location.href.substr(location.href.length-9,location.href.length) != "index.htm") {
	document.write('<link rel="stylesheet" href="../styles/general.css" type="text/css">');
	if (document.all) document.write('<link rel="stylesheet" href="../styles/ie.css" type="text/css">');
	else document.write('<link rel="stylesheet" href="../styles/ns.css" type="text/css">');
	//if (navigator.userAgent.indexOf("Netscape/7") != -1) document.write('<link rel="stylesheet" href="../styles/ns7.css" type="text/css">');
	//if (navigator.userAgent.indexOf("Firefox/1") != -1) document.write('<link rel="stylesheet" href="../styles/ff1.css" type="text/css">');
}	
else {
	document.write('<link rel="stylesheet" href="styles/general.css" type="text/css">');
	if (document.all) document.write('<link rel="stylesheet" href="styles/ie.css" type="text/css">');
	else document.write('<link rel="stylesheet" href="styles/ns.css" type="text/css">');
}

//behebt Navigator 4 Resize Bug
function MM_reloadPage(init) {  
  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);

//E-Mail-Verschlüsselung
function build_mail(user,domain,suffix,weight){
document.write('<a href="'+'mailto:'+user+'@'+domain+'.'+suffix+'" class="textlink" style="color:#706F6F; font-weight:'+weight+'" onfocus="this.blur()">'+user+'@'+domain+'.'+suffix+'</a>');
}

//E-Mail versenden
function mail(recipient,subject,body){
	parent.location.href='mailto:'+recipient+'?subject='+subject+'&amp;body='+body+'';
}

//Popup öffnen
function NeuesFenster(datei,name,breite,hoehe,x,y,center,loc,men,stat,scroll,res,sitemap)
{
	if (center == 1)
	{
		x = (screen.width-breite)/2;
		y = (screen.height-hoehe)/2;
	}
	settings='width='+breite+',height='+hoehe+',left='+x+',top='+y+',location='+loc+',menubar='+men+',status='+stat+',scrollbars='+scroll+',resizable='+res+'';
	if (!sitemap) newWindow=window.open(datei,name,settings);
	else sitemap=window.open(datei,name,settings);
}

//Show-Hide Layers
function ShowHideLayers(layer,val) {

	if (document.layers) {n4=1;ie_n6=0;}
	if (document.getElementById) {n4=0;ie_n6=1}
	
	if (val == "show"){
    	if (n4) {document[layer].visibility = "show"; return;}
		if (ie_n6) {
			document.getElementById(layer).style.visibility = "visible";
		return;}
	}
	if (val == "hide"){
    	if (n4) {document[layer].visibility = "hide";}
		if (ie_n6) {document.getElementById(layer).style.visibility = "hidden";}
	}
}

function HighlightBox(box1,box2,val,bg) {

	if (document.layers) {n4=1;ie_n6=0;}
	if (document.getElementById) {n4=0;ie_n6=1}
	
	if (val == "over"){
		if (n4) {document[box1].className = bg; document[box2].className = bg;return;}
		if (ie_n6) {document.getElementById(box1).className = bg; document.getElementById(box2).className = bg; return;}
	}
	if (val == "out"){
		if (n4) {document[box1].className = ''; document[box2].className = ''; return;}
		if (ie_n6) {document.getElementById(box1).className = ''; document.getElementById(box2).className = ''; return;}
	}
	
}

//Menü oben
function HighlightMenu(col,val,bg,seite) {

	if (document.layers) {n4=1;ie_n6=0;}
	if (document.getElementById) {n4=0;ie_n6=1}
			
 	var colnr = parseInt(col.substr(1,col.length-1));
	colleft = "c"+(colnr-1);
	colright = "c"+(colnr+1);
	imgleft = "img"+(colnr-1);
	imgright = "img"+(colnr+1);
	
	if (val == "over"){
		if (n4) {
			document[col].className = bg;
			document[colleft].className = bg;
			document[colright].className = bg;
			if (imgleft != "img1") document[imgleft].src = "../images/pix.gif";
			if (imgright != "img17") document[imgright].src = "../images/pix.gif";
			return;
		}
		if (ie_n6) {
			document.getElementById(col).className = bg;
			document.getElementById(colleft).className = bg; document.getElementById(colright).className = bg;
			if (imgleft != "img1") document.getElementById(imgleft).src = "../images/pix.gif";
			if (imgright != "img17") document.getElementById(imgright).src = "../images/pix.gif";
			return;
		}
	}
	if (val == "out"){
	
		switch(seite){
			case "aktuelles": col_akt_nr = 2; break;
			case "renner": col_akt_nr = 4; break;
			case "kontakt": col_akt_nr = 6; break;
			case "impressum": col_akt_nr = 8; break;
			case "literatur": col_akt_nr = 10; break;
			case "presse": col_akt_nr = 12; break;
			case "sitemap": col_akt_nr = 14; break;			
			case "newsletter": col_akt_nr = 16; break;
			case "": col_akt_nr = 99;
		}
			
		if (n4) {
			document[col].className = '';
			document[colleft].className = '';
			document[colright].className = '';
			if (imgleft != "img1") document[imgleft].src = "../images/pix_grau.gif";
			if (imgright != "img17") document[imgright].src = "../images/pix_grau.gif";
			return;
		}
		if (ie_n6) {
			document.getElementById(col).className = '';
			if(col_akt_nr != colnr-2) {
				document.getElementById(colleft).className = '';
				if (imgleft != "img1") document.getElementById(imgleft).src = "../images/pix_grau.gif";
			}
			if(col_akt_nr != colnr+2) {
				document.getElementById(colright).className = ''; 
				if (imgright != "img17") document.getElementById(imgright).src = "../images/pix_grau.gif";
			}
			return;
		}
	}
}

//Menü links
function ShowHideMenu(show) {

	pop1_y = 58;
	pop2_y = 155; /* 142 davor 114*/
	pop3_y = 58;
	pop4_y = 30;

	if (document.layers) {n4=1;ie_n6=0;v_show="show";v_hide="hide";}
	if (document.getElementById) {n4=0;ie_n6=1;v_show="visible";v_hide="hidden"}

  if (n4){
		tab1 = document.hmt;
		pop1 = document.pophmt;
		tab2 = document.selbsthilfe;
		pop2 = document.popselbsthilfe;
		tab3 = document.seminare;
		pop3 = document.popseminare;
		tab4 = document.fachverband;
		pop4 = document.popfachverband;		
		tab5 = document.sohlen;
		tab6 = document.tee;		
		tab7 = document.mitglieder;
		pop7 = document.popmitglieder;
	}
	if (ie_n6){
		tab1 = document.getElementById("hmt").style;
   		pop1 = document.getElementById("pophmt").style;
		tab2 = document.getElementById("selbsthilfe").style;
    	pop2 = document.getElementById("popselbsthilfe").style;
		tab3 = document.getElementById("seminare").style;
   		pop3 = document.getElementById("popseminare").style;
		tab4 = document.getElementById("fachverband").style;
    	pop4 = document.getElementById("popfachverband").style;		
		tab5 = document.getElementById("sohlen").style;
		tab6 = document.getElementById("tee").style;		
		tab7 = document.getElementById("mitglieder").style;
    	pop7 = document.getElementById("popmitglieder").style;		
	}
	
	if (show == "hmt") {
		if (pop1.visibility == v_hide) {
			if ((pop2.visibility == v_show) && (document.getElementById("thema").className != "selbsth_menu")) {
				tab3.top = parseInt(tab3.top) - pop2_y;
				pop3.top = parseInt(pop3.top) - pop2_y;
				tab4.top = parseInt(tab4.top) - pop2_y;
				pop4.top = parseInt(pop4.top) - pop2_y;				
				tab5.top = parseInt(tab5.top) - pop2_y;
				tab6.top = parseInt(tab6.top) - pop2_y;				
				tab7.top = parseInt(tab7.top) - pop2_y;
				pop7.top = parseInt(pop7.top) - pop2_y;	
			}
			if ((pop3.visibility == v_show) && (document.getElementById("thema").className != "sem_menu")) {
				tab4.top = parseInt(tab4.top) - pop3_y;
				pop4.top = parseInt(pop4.top) - pop3_y;				
				tab5.top = parseInt(tab5.top) - pop3_y;
				tab6.top = parseInt(tab6.top) - pop3_y;				
				tab7.top = parseInt(tab7.top) - pop3_y;
				pop7.top = parseInt(pop7.top) - pop3_y;
			}
			if ((pop4.visibility == v_show) && (document.getElementById("thema").className != "fachv_menu")) {
				tab5.top = parseInt(tab5.top) - pop4_y;
				tab6.top = parseInt(tab6.top) - pop4_y;
				tab7.top = parseInt(tab7.top) - pop4_y;
				pop7.top = parseInt(pop7.top) - pop4_y;
			}
			tab2.top = parseInt(tab2.top) + pop1_y;
			pop2.top = parseInt(pop2.top) + pop1_y;
			tab3.top = parseInt(tab3.top) + pop1_y;
			pop3.top = parseInt(pop3.top) + pop1_y;
			tab4.top = parseInt(tab4.top) + pop1_y;
			pop4.top = parseInt(pop4.top) + pop1_y;			
			tab5.top = parseInt(tab5.top) + pop1_y;
			tab6.top = parseInt(tab6.top) + pop1_y;			
			tab7.top = parseInt(tab7.top) + pop1_y;
			pop7.top = parseInt(pop7.top) + pop1_y;
    		pop1.visibility = v_show;
			if (document.getElementById("thema").className != "selbsth_menu") pop2.visibility = v_hide;
    		if (document.getElementById("thema").className != "sem_menu") pop3.visibility = v_hide;
			if (document.getElementById("thema").className != "fachv_menu") pop4.visibility = v_hide;
			if (document.getElementById("thema").className != "mitgl_menu") pop7.visibility = v_hide;
		}
		else if (document.getElementById("thema").className != "hmt_menu") {
			pop1.visibility = v_hide;
			tab2.top = parseInt(tab2.top) - pop1_y;
			pop2.top = parseInt(pop2.top) - pop1_y;
			tab3.top = parseInt(tab3.top) - pop1_y;
			pop3.top = parseInt(pop3.top) - pop1_y;
			tab4.top = parseInt(tab4.top) - pop1_y;
			pop4.top = parseInt(pop4.top) - pop1_y;			
			tab5.top = parseInt(tab5.top) - pop1_y;
			tab6.top = parseInt(tab6.top) - pop1_y;			
			tab7.top = parseInt(tab7.top) - pop1_y;
			pop7.top = parseInt(pop7.top) - pop1_y;
		}
	}
	if (show == "selbsthilfe") {
		if (pop2.visibility == v_hide) {
			if ((pop1.visibility == v_show) && (document.getElementById("thema").className != "hmt_menu")) {
				tab2.top = parseInt(tab2.top) - pop1_y;
				pop2.top = parseInt(pop2.top) - pop1_y;
				tab3.top = parseInt(tab3.top) - pop1_y;
				pop3.top = parseInt(pop3.top) - pop1_y;
				tab4.top = parseInt(tab4.top) - pop1_y;
				pop4.top = parseInt(pop4.top) - pop1_y;				
				tab5.top = parseInt(tab5.top) - pop1_y;
				tab6.top = parseInt(tab6.top) - pop1_y;				
				tab7.top = parseInt(tab7.top) - pop1_y;
				pop7.top = parseInt(pop7.top) - pop1_y;				
			}
			if ((pop3.visibility == v_show) && (document.getElementById("thema").className != "sem_menu")) {
				tab4.top = parseInt(tab4.top) - pop3_y;
				pop4.top = parseInt(pop4.top) - pop3_y;				
				tab5.top = parseInt(tab5.top) - pop3_y;
				tab6.top = parseInt(tab6.top) - pop3_y;				
				tab7.top = parseInt(tab7.top) - pop3_y;
				pop7.top = parseInt(pop7.top) - pop3_y;
			}
			if ((pop4.visibility == v_show) && (document.getElementById("thema").className != "fachv_menu")) {
				tab5.top = parseInt(tab5.top) - pop4_y;
				tab6.top = parseInt(tab6.top) - pop4_y;
				tab7.top = parseInt(tab7.top) - pop4_y;
				pop7.top = parseInt(pop7.top) - pop4_y;
			}
        	if (document.getElementById("thema").className != "hmt_menu") pop1.visibility = v_hide;
			pop2.visibility = v_show;
   			if (document.getElementById("thema").className != "sem_menu") pop3.visibility = v_hide;
			if (document.getElementById("thema").className != "fachv_menu") pop4.visibility = v_hide;
			if (document.getElementById("thema").className != "mitgl_menu") pop7.visibility = v_hide;
			tab3.top = parseInt(tab3.top) + pop2_y;
			pop3.top = parseInt(pop3.top) + pop2_y;
			tab4.top = parseInt(tab4.top) + pop2_y;
			pop4.top = parseInt(pop4.top) + pop2_y;			
			tab5.top = parseInt(tab5.top) + pop2_y;
			tab6.top = parseInt(tab6.top) + pop2_y;			
			tab7.top = parseInt(tab7.top) + pop2_y;
			pop7.top = parseInt(pop7.top) + pop2_y;
		}
		else if (document.getElementById("thema").className != "selbsth_menu") {
			pop2.visibility = v_hide;
			tab3.top = parseInt(tab3.top) - pop2_y;
			pop3.top = parseInt(pop3.top) - pop2_y;
			tab4.top = parseInt(tab4.top) - pop2_y;
			pop4.top = parseInt(pop4.top) - pop2_y;			
			tab5.top = parseInt(tab5.top) - pop2_y;
			tab6.top = parseInt(tab6.top) - pop2_y;
			tab7.top = parseInt(tab7.top) - pop2_y;
			pop7.top = parseInt(pop7.top) - pop2_y;
		}
	}
	if (show == "seminare") {
		if (pop3.visibility == v_hide) {
			if ((pop1.visibility == v_show) && (document.getElementById("thema").className != "hmt_menu")) {
				tab2.top = parseInt(tab2.top) - pop1_y;
				pop2.top = parseInt(pop2.top) - pop1_y;
				tab3.top = parseInt(tab3.top) - pop1_y;
				pop3.top = parseInt(pop3.top) - pop1_y;
				tab4.top = parseInt(tab4.top) - pop1_y;
				pop4.top = parseInt(pop4.top) - pop1_y;				
				tab5.top = parseInt(tab5.top) - pop1_y;
				tab6.top = parseInt(tab6.top) - pop1_y;
				tab7.top = parseInt(tab7.top) - pop1_y;
				pop7.top = parseInt(pop7.top) - pop1_y;
			}
			if ((pop2.visibility == v_show) && (document.getElementById("thema").className != "selbsth_menu")) {
				tab3.top = parseInt(tab3.top) - pop2_y;
				pop3.top = parseInt(pop3.top) - pop2_y;
				tab4.top = parseInt(tab4.top) - pop2_y;
				pop4.top = parseInt(pop4.top) - pop2_y;				
				tab5.top = parseInt(tab5.top) - pop2_y;
				tab6.top = parseInt(tab6.top) - pop2_y;
				tab7.top = parseInt(tab7.top) - pop2_y;
				pop7.top = parseInt(pop7.top) - pop2_y;
			}
			if ((pop4.visibility == v_show) && (document.getElementById("thema").className != "fachv_menu")) {
				tab5.top = parseInt(tab5.top) - pop4_y;
				tab6.top = parseInt(tab6.top) - pop4_y;			
				tab7.top = parseInt(tab7.top) - pop4_y;
				pop7.top = parseInt(pop7.top) - pop4_y;
			}
        	if (document.getElementById("thema").className != "hmt_menu") pop1.visibility = v_hide;
			if (document.getElementById("thema").className != "selbsth_menu") pop2.visibility = v_hide;
    		pop3.visibility = v_show;
			if (document.getElementById("thema").className != "fachv_menu") pop4.visibility = v_hide;
			if (document.getElementById("thema").className != "mitgl_menu") pop7.visibility = v_hide;
			tab4.top = parseInt(tab4.top) + pop3_y;
			pop4.top = parseInt(pop4.top) + pop3_y;
			tab5.top = parseInt(tab5.top) + pop3_y;
			tab6.top = parseInt(tab6.top) + pop3_y;			
			tab7.top = parseInt(tab7.top) + pop3_y;
			pop7.top = parseInt(pop7.top) + pop3_y;
		}
		else if (document.getElementById("thema").className != "sem_menu") {
			pop3.visibility = v_hide;
			tab4.top = parseInt(tab4.top) - pop3_y;
			pop4.top = parseInt(pop4.top) - pop3_y;
			tab5.top = parseInt(tab5.top) - pop3_y;
			tab6.top = parseInt(tab6.top) - pop3_y;			
			tab7.top = parseInt(tab7.top) - pop3_y;
			pop7.top = parseInt(pop7.top) - pop3_y;
		}
	}
	if (show == "fachverband") {
		if (pop4.visibility == v_hide) {
			if ((pop1.visibility == v_show) && (document.getElementById("thema").className != "hmt_menu")) {
				tab2.top = parseInt(tab2.top) - pop1_y;
				pop2.top = parseInt(pop2.top) - pop1_y;
				tab3.top = parseInt(tab3.top) - pop1_y;
				pop3.top = parseInt(pop3.top) - pop1_y;
				tab4.top = parseInt(tab4.top) - pop1_y;
				pop4.top = parseInt(pop4.top) - pop1_y;
				tab5.top = parseInt(tab5.top) - pop1_y;
				tab6.top = parseInt(tab6.top) - pop1_y;				
				tab7.top = parseInt(tab7.top) - pop1_y;
				pop7.top = parseInt(pop7.top) - pop1_y;
			}
			if ((pop2.visibility == v_show) && (document.getElementById("thema").className != "selbsth_menu")) {
				tab3.top = parseInt(tab3.top) - pop2_y;
				pop3.top = parseInt(pop3.top) - pop2_y;
				tab4.top = parseInt(tab4.top) - pop2_y;
				pop4.top = parseInt(pop4.top) - pop2_y;
				tab5.top = parseInt(tab5.top) - pop2_y;
				tab6.top = parseInt(tab6.top) - pop2_y;
				tab7.top = parseInt(tab7.top) - pop2_y;
				pop7.top = parseInt(pop7.top) - pop2_y;
			}
			if ((pop3.visibility == v_show) && (document.getElementById("thema").className != "sem_menu")) {
				tab4.top = parseInt(tab4.top) - pop3_y;
				pop4.top = parseInt(pop4.top) - pop3_y;
				tab5.top = parseInt(tab5.top) - pop3_y;
				tab6.top = parseInt(tab6.top) - pop3_y;
				tab7.top = parseInt(tab7.top) - pop3_y;
				pop7.top = parseInt(pop7.top) - pop3_y;
			}
   			if (document.getElementById("thema").className != "hmt_menu") pop1.visibility = v_hide;
			if (document.getElementById("thema").className != "selbsth_menu") pop2.visibility = v_hide;
			if (document.getElementById("thema").className != "sem_menu") pop3.visibility = v_hide;
			pop4.visibility = v_show;
			if (document.getElementById("thema").className != "mitgl_menu") pop7.visibility = v_hide;
			tab5.top = parseInt(tab5.top) + pop4_y;
			tab6.top = parseInt(tab6.top) + pop4_y;
			tab7.top = parseInt(tab7.top) + pop4_y;
			pop7.top = parseInt(pop7.top) + pop4_y;
		}
		else if (document.getElementById("thema").className != "fachv_menu") {
			pop4.visibility = v_hide;
			tab5.top = parseInt(tab5.top) - pop4_y;
			tab6.top = parseInt(tab6.top) - pop4_y;
			tab7.top = parseInt(tab7.top) - pop4_y;
			pop7.top = parseInt(pop7.top) - pop4_y;
		}
	}	
	if (show == "sohlen") {
			if ((pop1.visibility == v_show) && (document.getElementById("thema").className != "hmt_menu")) {
				tab2.top = parseInt(tab2.top) - pop1_y;
				pop2.top = parseInt(pop2.top) - pop1_y;
				tab3.top = parseInt(tab3.top) - pop1_y;
				pop3.top = parseInt(pop3.top) - pop1_y;
				tab4.top = parseInt(tab4.top) - pop1_y;
				pop4.top = parseInt(pop4.top) - pop1_y;
				tab5.top = parseInt(tab5.top) - pop1_y;
				tab6.top = parseInt(tab6.top) - pop1_y;				
				tab7.top = parseInt(tab7.top) - pop1_y;
				pop7.top = parseInt(pop7.top) - pop1_y;
			}
			if ((pop2.visibility == v_show) && (document.getElementById("thema").className != "selbsth_menu")) {
				tab3.top = parseInt(tab3.top) - pop2_y;
				pop3.top = parseInt(pop3.top) - pop2_y;
				tab4.top = parseInt(tab4.top) - pop2_y;
				pop4.top = parseInt(pop4.top) - pop2_y;
				tab5.top = parseInt(tab5.top) - pop2_y;
				tab6.top = parseInt(tab6.top) - pop2_y;
				tab7.top = parseInt(tab7.top) - pop2_y;
				pop7.top = parseInt(pop7.top) - pop2_y;
			}
			if ((pop3.visibility == v_show) && (document.getElementById("thema").className != "sem_menu")) {
				tab4.top = parseInt(tab4.top) - pop3_y;
				pop4.top = parseInt(pop4.top) - pop3_y;
				tab5.top = parseInt(tab5.top) - pop3_y;
				tab6.top = parseInt(tab6.top) - pop3_y;
				tab7.top = parseInt(tab7.top) - pop3_y;
				pop7.top = parseInt(pop7.top) - pop3_y;
			}
			if ((pop4.visibility == v_show) && (document.getElementById("thema").className != "fachv_menu")) {
				tab5.top = parseInt(tab5.top) - pop4_y;
				tab6.top = parseInt(tab6.top) - pop4_y;
				tab7.top = parseInt(tab7.top) - pop4_y;
				pop7.top = parseInt(pop7.top) - pop4_y;
			}
   			if (document.getElementById("thema").className != "hmt_menu") pop1.visibility = v_hide;
			if (document.getElementById("thema").className != "selbsth_menu") pop2.visibility = v_hide;
			if (document.getElementById("thema").className != "sem_menu") pop3.visibility = v_hide;
			if (document.getElementById("thema").className != "fachv_menu") pop4.visibility = v_hide;
			if (document.getElementById("thema").className != "mitgl_menu") pop7.visibility = v_hide;
	}
	if (show == "tee") {
			if ((pop1.visibility == v_show) && (document.getElementById("thema").className != "hmt_menu")) {
				tab2.top = parseInt(tab2.top) - pop1_y;
				pop2.top = parseInt(pop2.top) - pop1_y;
				tab3.top = parseInt(tab3.top) - pop1_y;
				pop3.top = parseInt(pop3.top) - pop1_y;
				tab4.top = parseInt(tab4.top) - pop1_y;
				pop4.top = parseInt(pop4.top) - pop1_y;
				tab5.top = parseInt(tab5.top) - pop1_y;
				tab6.top = parseInt(tab6.top) - pop1_y;				
				tab7.top = parseInt(tab7.top) - pop1_y;
				pop7.top = parseInt(pop7.top) - pop1_y;
			}
			if ((pop2.visibility == v_show) && (document.getElementById("thema").className != "selbsth_menu")) {
				tab3.top = parseInt(tab3.top) - pop2_y;
				pop3.top = parseInt(pop3.top) - pop2_y;
				tab4.top = parseInt(tab4.top) - pop2_y;
				pop4.top = parseInt(pop4.top) - pop2_y;
				tab5.top = parseInt(tab5.top) - pop2_y;
				tab6.top = parseInt(tab6.top) - pop2_y;
				tab7.top = parseInt(tab7.top) - pop2_y;
				pop7.top = parseInt(pop7.top) - pop2_y;
			}
			if ((pop3.visibility == v_show) && (document.getElementById("thema").className != "sem_menu")) {
				tab4.top = parseInt(tab4.top) - pop3_y;
				pop4.top = parseInt(pop4.top) - pop3_y;
				tab5.top = parseInt(tab5.top) - pop3_y;
				tab6.top = parseInt(tab6.top) - pop3_y;
				tab7.top = parseInt(tab7.top) - pop3_y;
				pop7.top = parseInt(pop7.top) - pop3_y;
			}
			if ((pop4.visibility == v_show) && (document.getElementById("thema").className != "fachv_menu")) {
				tab5.top = parseInt(tab5.top) - pop4_y;
				tab6.top = parseInt(tab6.top) - pop4_y;
				tab7.top = parseInt(tab7.top) - pop4_y;
				pop7.top = parseInt(pop7.top) - pop4_y;
			}
   			if (document.getElementById("thema").className != "hmt_menu") pop1.visibility = v_hide;
			if (document.getElementById("thema").className != "selbsth_menu") pop2.visibility = v_hide;
			if (document.getElementById("thema").className != "sem_menu") pop3.visibility = v_hide;
			if (document.getElementById("thema").className != "fachv_menu") pop4.visibility = v_hide;
			if (document.getElementById("thema").className != "mitgl_menu") pop7.visibility = v_hide;
	}	
	if (show == "mitglieder") {
		if (pop7.visibility == v_hide) {
			if ((pop1.visibility == v_show) && (document.getElementById("thema").className != "hmt_menu")) {
				tab2.top = parseInt(tab2.top) - pop1_y;
				pop2.top = parseInt(pop2.top) - pop1_y;
				tab3.top = parseInt(tab3.top) - pop1_y;
				pop3.top = parseInt(pop3.top) - pop1_y;
				tab4.top = parseInt(tab4.top) - pop1_y;
				pop4.top = parseInt(pop4.top) - pop1_y;				
				tab5.top = parseInt(tab5.top) - pop1_y;
				tab6.top = parseInt(tab6.top) - pop1_y;
				tab7.top = parseInt(tab7.top) - pop1_y;
				pop7.top = parseInt(pop7.top) - pop1_y;
			}
			if ((pop2.visibility == v_show) && (document.getElementById("thema").className != "selbsth_menu")) {
				tab3.top = parseInt(tab3.top) - pop2_y;
				pop3.top = parseInt(pop3.top) - pop2_y;
				tab4.top = parseInt(tab4.top) - pop2_y;
				pop4.top = parseInt(pop4.top) - pop2_y;
				tab5.top = parseInt(tab5.top) - pop2_y;
				tab6.top = parseInt(tab6.top) - pop2_y;
				tab7.top = parseInt(tab7.top) - pop2_y;
				pop7.top = parseInt(pop7.top) - pop2_y;
			}
			if ((pop3.visibility == v_show) && (document.getElementById("thema").className != "sem_menu")) {
				tab4.top = parseInt(tab4.top) - pop3_y;
				pop4.top = parseInt(pop4.top) - pop3_y;
				tab5.top = parseInt(tab5.top) - pop3_y;
				tab6.top = parseInt(tab6.top) - pop3_y;
				tab7.top = parseInt(tab7.top) - pop3_y;
				pop7.top = parseInt(pop7.top) - pop3_y;
			}
			if ((pop4.visibility == v_show) && (document.getElementById("thema").className != "fachv_menu")) {
				tab5.top = parseInt(tab5.top) - pop4_y;
				tab6.top = parseInt(tab6.top) - pop4_y;
				tab7.top = parseInt(tab7.top) - pop4_y;
				pop7.top = parseInt(pop7.top) - pop4_y;
			}
   			if (document.getElementById("thema").className != "hmt_menu") pop1.visibility = v_hide;
			if (document.getElementById("thema").className != "selbsth_menu") pop2.visibility = v_hide;
			if (document.getElementById("thema").className != "sem_menu") pop3.visibility = v_hide;
			if (document.getElementById("thema").className != "fachv_menu") pop4.visibility = v_hide;
			pop7.visibility = v_show;
		}
		else if (document.getElementById("thema").className != "mitgl_menu") {
			pop7.visibility = v_hide;
		}
	}
}

//Navigation ueber Sitemap

function switch_sitemap(titel,bereich,neu_geladen) {

var menu = new Array(22);
	for (var i=0; i < menu.length; i++) {
		menu[0] = new Array("aktuelles","1");
		menu[1] = new Array("renner","2");
		menu[2] = new Array("kontakt","3"),
		menu[3] = new Array("impressum","4"),
		menu[4] = new Array("literatur","5"),
		menu[5] = new Array("presse","6"),
		menu[6] = new Array("sitemap","7"),
		menu[7] = new Array("newsletter","8"),
		menu[8] = new Array("hmt_willkommen","9"),
		menu[9] = new Array("hmt_historie","10");
		menu[10] = new Array("hmt_literatur","11");
		menu[11] = new Array("selbsthilfe_willkommen","12");
		menu[12] = new Array("selbsthilfe_prophylaxe","13");
		menu[13] = new Array("selbsthilfe_leistungssport","14");
		menu[14] = new Array("selbsthilfe_fuer_patienten","15");
		menu[15] = new Array("selbsthilfe_therapeutenliste","16");
		menu[16] = new Array("selbsthilfe_literatur","17");
		menu[17] = new Array("seminare_willkommen","18");
		menu[18] = new Array("seminare_therapeuten","19");
		menu[19] = new Array("seminare_selbsthilfe","20");
		menu[20] = new Array("fachverband_news","21");
		menu[21] = new Array("fachverband_beitritt","22");		
	}

	if (document.layers) {n4=1;ie_n6=0;}
	if (document.getElementById) {n4=0;ie_n6=1}
	
	if (neu_geladen) {
		for (var i=0; i < menu.length; i++) {
			if (neu_geladen == menu[i][0]) { 
				titel = menu[i][1];
				break;
			}
		}
		if (titel < 9) bereich = "methode";
		else if (titel < 12) bereich = "hmt";
		else if (titel < 18) bereich = "selbsthilfe";
		else if (titel < 21) bereich = "seminare";
		else bereich = "fachverband";
	}
	
	switch (bereich) {
		case "methode": farbe = "#D2A427"; break;
		case "hmt": farbe = "#AFCE3D"; break;
		case "selbsthilfe": farbe = "#5454AC"; break;
		case "seminare": farbe = "#BD0542"; break;
		case "fachverband":	farbe = "#A3C4BD"; break;
	}
	
	if (n4) {
		document[titel].style.color = farbe;
		document[titel].style.fontWeight  = "bold";
		for (i=1;i<=22;i++) {
			if (i != titel) {
				document[i].style.color = "";
				document[i].style.fontWeight  = "";
			}
		}
		return;
	}
	
	if (ie_n6) {
		document.getElementById(titel).style.color = farbe;
		document.getElementById(titel).style.fontWeight = "bold";
		for (i=1;i<=22;i++) {
			if (i != titel) {
				document.getElementById(i).style.color = "";
				document.getElementById(i).style.fontWeight  = "";
			}
		}
		return;
	}
}

//Aktualisierung Sitemap aus Hauptnavigation
function control_sitemap(titel,bereich) {
	if(window.name=="sitemap_open") {
		sitemap.focus(); //sitemap ist beim zweiten Aufruf undefined
		switch_sitemap(titel,bereich,1);
	}
}

//Frame-Inhalte austauschen
function SwapFrames(URLleft,URLmain,level) {
	if(level=="top") {
		top.leftFrame.location.href=URLleft;
		top.mainFrame.location.href=URLmain;
	}
	else {
		parent.leftFrame.location.href=URLleft;
		parent.mainFrame.location.href=URLmain;
	}
}

//Überprüfung der Formulareingaben im Admin-Bereich
function checkFields(input)
{
	var fehler = "";
	var fehlermeldung = "";
	
	// Vollständigkeit
	if (!(input.elements[2].checked) && !(input.elements[3].checked))
		fehler += "- " + "Geschlecht" + "\n";
	if (input.elements[4].value == "")
		fehler += "- " + "Name" + "\n";
		if (input.elements[5].value == "")
		fehler += "- " + "Vorname" + "\n";

	if (fehler != "") {
		fehlermeldung += "\Bitte ergänzen Sie die folgenden Angaben:\n\n";
		fehlermeldung += fehler;
		fehler = "";
	}
		
	//Ausgabe
	if (fehlermeldung == "") {
		return true;
	}
	else {
		alert(fehlermeldung);
		return false;
	}
}

//Überprüfung der Formulareingaben für den Newsletter
function checkFieldsNews(input)
{
	var fehler = "";
	var fehlermeldung = "";
	
	// Vollständigkeit
	if (input.elements[0].value == "")
		fehler += "- " + "Vorname" + "\n";
	if (input.elements[1].value == "")
		fehler += "- " + "Nachname" + "\n";
	if (input.elements[2].value == "")
		fehler += "- " + "Tätigkeit" + "\n";
	if (input.elements[3].value == "")
		fehler += "- " + "E-Mail-Adresse" + "\n";

	if (fehler != "") {
		fehlermeldung += "\Bitte ergänzen Sie die folgenden Angaben:\n\n";
		fehlermeldung += fehler;
		fehler = "";
	}
		
	//Ausgabe
	if (fehlermeldung == "") {
		return true;
	}
	else {
		alert(fehlermeldung);
		return false;
	}
}

//Paßwortgenerator
function generatePassword() {

	var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789";
	var passwd = "";
	
	for (var i=0; i<8; i++) {
		passwd += chars.substr(Math.ceil(Math.random()*chars.length)-1,1);
    }	
	document.eintrag_form.kennwort.value = passwd;	
 }
 
//Bildgalerie
function bildgalerie(bild) {
  
	var anzahl = 30;			//Anzahl der Bilder
			
	if (bild == 0)
		bild = anzahl;
	if (bild == anzahl+1)
		bild = 1;
	window.location.href = "selbsthilfe_adiyart_bild.php?nr=" + bild;
}	

