if (document.getElementById){ 
	document.write('<style type="text/css">\n')
	document.write('.submenu{display: none;}\n')
	document.write('</style>\n')
}
function SwitchMenu(obj) {
	if(document.getElementById) {
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block") { 
			for (var i=0; i<ar.length; i++) {
				if (ar[i].className=="submenu") 
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		} else {
			el.style.display = "none";
		}
	}
}

//////////SCRIPTE FÜR bestellen.php////////////////////////////////////////////////////////////////////////////START
function popup(content) {
 	OpenWindow=window.open("http://www.telefonanschluss.mobi/pop_content.php?content="+content,"_blank", "height=600,width=600,resizable=yes,toolbar=no,scrollbars=yes ,menubar=no,top=100,left=200");
	OpenWindow.document.close();
}
function hide_settings() {
	document.getElementById("div_settings").style.display = "none";
}
function unhide_settings() {
	document.getElementById("div_settings").style.display = "";
}
function hide_rechnungsadresse() {
	if(document.getElementById("div_rechnung").style.display == "none") {
		document.getElementById("div_rechnung").style.display = "";
	} else {
		document.getElementById("div_rechnung").style.display = "none";
	}
}
function switch_anrede(anrede) {
	if(anrede == 2) {
		document.getElementById("div_firma").style.display = "";
		document.getElementById("div_privat").style.display = "none";
		document.getElementById("div_privat1").style.display = "none";
		document.getElementById("div_privat2").style.display = "none";
		document.getElementById("div_geschaeftsform").style.display = "";
		document.getElementById("div_vorname").style.display = "none";
		document.getElementById("showtyp_n").innerHTML = "Firma";
		document.getElementById("showtyp_v").innerHTML = "Geschäftsform";
		document.getElementById("showtyp_rn").innerHTML = "Firma";
		document.getElementById("showtyp_rv").innerHTML = "Geschäftsform";
	} else {
		document.getElementById("div_firma").style.display = "none";
		document.getElementById("div_privat").style.display = "";
		document.getElementById("div_privat1").style.display = "";
		document.getElementById("div_privat2").style.display = "";
		document.getElementById("div_geschaeftsform").style.display = "none";
		document.getElementById("div_vorname").style.display = "";
		document.getElementById("showtyp_n").innerHTML = "Name";
		document.getElementById("showtyp_v").innerHTML = "Vorname";
		document.getElementById("showtyp_rn").innerHTML = "Name";
		document.getElementById("showtyp_rv").innerHTML = "Vorname";
	}
}
function switch_staatsangehoerigkeit(staat) {
	if(staat == "deutsch") {
		document.getElementById("div_auslaendisch").style.display = "none";
		document.getElementById("div_deutsch").style.display = "";	
	} else {
		document.getElementById("div_auslaendisch").style.display = "";
		document.getElementById("div_deutsch").style.display = "none";
	}
}
function hide_rufnummernmitnahme() {
	if(document.getElementById("div_rufnummernmitnahme").style.display == "none") {
		document.getElementById("div_rufnummernmitnahme").style.display = "";
	} else {
		document.getElementById("div_rufnummernmitnahme").style.display = "none";
	}
}
function rlbox() {
	for( i = 0; i < document.getElementsByName("daten0[hardware]").length; i++ ) {
		if( document.getElementsByName("daten0[hardware]")[i].checked == true) {
			val =document.getElementsByName("daten0[hardware]")[i].value;
		}
	}
	if(val == "RL 302") {
		document.getElementById("rlbox").style.display = "";
	} else {
		document.getElementById("rlbox").style.display = "none";
	}
}
function wunschtermin_on(id) { 
	document.getElementById("wunschtermin2").checked = "checked"; 
	document.getElementById(id).value = ''; 
}
function switch_carrier(carrier) {
	if(carrier == "OTHER") {
		document.getElementById("others").style.display = "";
	} else {		
		document.getElementById("others").style.display = "none";
	}
}
function check_flats() {
	var zuhause_mobilflat = document.getElementById("zuhause_mobilflat").checked;
	var happy_international = document.getElementById("happy_international").checked;
	if(happy_international==true && !zuhause_mobilflat) {
		alert('Bitte beachten Sie:\nDie Option Happy International kann nur mit der Option Zuhause Mobilflat gebucht werden.');
		return false;
	} else {
		return true;
	}
}
function show_zuhause_mobilflat_details() {
	if(document.getElementById("show_zuhause_mobilflat_details").style.display == "none") {
		document.getElementById("show_zuhause_mobilflat_details").style.display = "";
	} else {
		document.getElementById("show_zuhause_mobilflat_details").style.display = "none";
	}
}
function show_happy_international_details() {
	if(document.getElementById("show_happy_international_details").style.display == "none") {
		document.getElementById("show_happy_international_details").style.display = "";
	} else {
		document.getElementById("show_happy_international_details").style.display = "none";
	}
}
//////////SCRIPTE FÜR bestellen.php////////////////////////////////////////////////////////////////////////////ENDE
