function hoehemachen() {

	if(document.getElementById("posi_c").offsetTop) {

		var pos_test = document.getElementById("content_bereich").offsetTop;
		var pos_e = document.getElementById("content").offsetTop;
		var pos_c = document.getElementById("posi_c").offsetTop;
		var pos_n = document.getElementById("posi_n").offsetTop;

		var hoehe_c = pos_c - pos_e - 2;
		
		if(hoehe_c <= 390) {
			c_hoehe_neu = 390;
		} else {
			c_hoehe_neu = hoehe_c - 60;
		}

		c_hoehe_neu = c_hoehe_neu + "px";
		document.getElementById("content").style.height = c_hoehe_neu;

		var pos_n = document.getElementById("posi_n").offsetTop;
		var pos_c = document.getElementById("posi_c").offsetTop;
		var end_n = pos_n - 5;
		var end_c = pos_c - 2;

		var dif = Math.abs(end_n - end_c);

		if(end_c < end_n) { 
			hoehe_alt = parseInt(c_hoehe_neu);
			hoehe_neu = hoehe_alt + dif;
			hoehe_neu = hoehe_neu + "px";
			document.getElementById("content").style.height = hoehe_neu;
		} else if(end_c > end_n) {
			hoehe_neu = 80 + dif;
			hoehe_neu = hoehe_neu + "px";
			document.getElementById("nav_ende").style.height = hoehe_neu;
		}
	}
}

function pop(seite) {
	window.open(seite,'Druckversion','width=590,height=400,scrollbars,menubar=yes,resizable=yes');
}

function pop_gal($hoehe,$breite,id) {
	$hoehe2 = $hoehe + 80;
	$breite2 = $breite + 20;
	argumente = 'width=' + $breite2 + ',height=' + $hoehe2 + ',scrollbars=no,menubar=no,resizable=yes';
	window.open('pop.php?id='+id,'Einzelbild',argumente);
}

function drucken() {
	if(! window.print)
		alert("Leider unterst\u00fctzt Ihr Browser diese Druckfunktion \nnicht, bitte drucken Sie manuell \u00fcber die Men\u00fcleiste!");
	else
	{
		window.print();
	}
}

function anmelden() {
	var $i = 0;
	var $fehler = "Bitte noch ausf\u00fcllen:  \n\n";
	if(document.Anm.VornAnm.value == "") { $fehler = $fehler + " - Vorname  \n"; $i++; }
	if(document.Anm.NachnAnm.value == "") { $fehler = $fehler + " - Nachname  \n"; $i++; }
	if((!document.Anm.GeAnm[0].checked) && (!document.Anm.GeAnm[1].checked)) {
		$fehler = $fehler + " - Geschlecht  \n";
		$i++;
	} 
	if(document.Anm.StrAnm.value == "") { $fehler = $fehler + " - Stra\u00dfe und Hausnummer  \n"; $i++; }
	if(document.Anm.StaAnm.value == "") { $fehler = $fehler + " - Postleitzahl und Stadt  \n"; $i++; }
	if((document.Anm.TelAnm.value == "") && (document.Anm.MailAnm.value == "")) { $fehler = $fehler + " - Telefon oder Email  \n"; $i++; }

	if($i == 0) { $fehler = ""; }
	
	if((document.Anm.GebTAnm.value != "") && (document.Anm.GebMAnm.value != "") && (document.Anm.GebJAnm.value != ""))
		{
			$chkZ = 0;
			
			for($z = 0; $z < document.Anm.GebTAnm.value.length; ++$z) {
				if((document.Anm.GebTAnm.value.charAt($z) < "0") || (document.Anm.GebTAnm.value.charAt($z) > "9")) {
				$chkZ = -1;
			}}

			for($z = 0; $z < document.Anm.GebMAnm.value.length; ++$z) {
				if((document.Anm.GebMAnm.value.charAt($z) < "0") || (document.Anm.GebMAnm.value.charAt($z) > "9")) {
				$chkZ = -1;
			}}

			for($z = 0; $z < document.Anm.GebJAnm.value.length; ++$z) {
				if((document.Anm.GebJAnm.value.charAt($z) < "0") || (document.Anm.GebJAnm.value.charAt($z) > "9")) {
				$chkZ = -1;
			}}
			
			if($chkZ == -1) {
				$fehler = $fehler + "\nGeburtsdatum ist nicht g\u00fcltig!\n - bitte nur Zahlen\n - bitte keine Leerstellen"; $i++;
			} else {
				$fehler = $fehler + "\n";
					
				if((document.Anm.GebTAnm.value > 31) || (document.Anm.GebTAnm.value < 1)) {
					$fehler = $fehler + "Ein Monat hat 1 - 31 Tage!\n"; $i++;
				}
				if((document.Anm.GebMAnm.value > 12) || (document.Anm.GebMAnm.value < 1)) {
					$fehler = $fehler + "Ein Jahr hat 1 - 12 Monate!\n"; $i++;
				}
			}
	
		} else {
		
			$fehler = $fehler + "\nGeburtsdatum ist nicht  \nkomplett ausgef\u00fcllt!"; $i++;
		
		}

	if(($i == 0) && (!document.Anm.AGBAnm[0].checked)) {
		$fehler = $fehler + "Bitte die AGB best\u00e4tigen!"; $i++; 
		}

	if($i == 0) {
		document.Anm.submit();
	} else {
		alert($fehler);
	}
}

function ie_rahmen_over(ding) {
	if(document.getElementById("m_over").currentStyle) {
		farbe = document.getElementById("m_over").currentStyle.borderColor;
		document.getElementById(ding).style.borderColor = farbe;
	}
}

function ie_rahmen_out(ding) {
	if(document.getElementById("out").currentStyle) {
		farbe = document.getElementById("out").currentStyle.borderColor;
		document.getElementById(ding).style.borderColor = farbe;
	}
}
