function FlashMovie(src, movie, width, height, version, quality, menu, bgcolor, flashvars)
{
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+",0,0,0' width='" +width+ "' height='" +height+ "' id='" +movie+ "'>");
  document.write("<param name='wmode' value='transparent' />");
	document.write("<param name='movie' value='" +src+ "' />");
	document.write("<param name='FlashVars' value='" +flashvars+ "'>");
	document.write("<param name='quality' value='" +quality+ "' />");
	document.write("<param name='menu' value='" +menu+ "' />");
	document.write("<param name='bgcolor' value='" +bgcolor+ "' />");
  document.write("<embed src='" +src+ "' swLiveConnect='true' menu='" +menu+ "' FlashVars='" +flashvars+ "' quality='" +quality+ "' bgcolor='" +bgcolor+ "' width='" +width+ "' height='" +height+ "' name='" +movie+ "' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function centeredWindow(path,breite,hoehe,scrollbars) {
var breite = breite;
var hoehe = hoehe;
var seite = (screen.availWidth - breite) / 2;
var oben = (screen.availHeight - hoehe) / 2;
params = ('width='+ breite
+',height='+ hoehe +',left='
+ seite +',top='+ oben +', scrollbars='+ scrollbars);
Fenster = window.open
(path,'name',params);
}


function formcheck(meldung) {
	if(window.document.buchung.ort.value=="" || window.document.buchung.treffpunkt.value=="" || window.document.buchung.termin.value=="" || window.document.buchung.dauer.value=="" || window.document.buchung.kundenname.value=="" || window.document.buchung.str_nr.value=="" || window.document.buchung.plz_ort.value=="" || window.document.buchung.telefon.value=="" || window.document.buchung.mail.value=="" || window.document.buchung.welchen_kontakt.value=="" || window.document.buchung.wann_kontakt.value=="" || window.document.buchung.anrufzeit.value=="" ||  window.document.buchung.agb_check.checked==false) {
		alert(meldung);
		return false;
	}
}


function formcheck_bewerbung(meldung) {
	voll=true;
	anzahlFelder=18;
	for(n=0; n < anzahlFelder; n++) {
		if(window.document.bewerbung.elements[n].value== "")
			voll=false;
	}
	if(!voll) alert(meldung);
	return voll;
}


function getVorname() {
    document.getElementById("vorname_span").innerText = document.getElementById("vorname").value;

    document.getElementById("vorname_span").textContent = document.getElementById("vorname").value;
}

function showInserts(teilnehmer) {
    if(teilnehmer == '5'){
	    document.getElementById("t6").style.display = 'none';
	    document.getElementById("t7").style.display = 'none';
	    document.getElementById("t8").style.display = 'none';
	}
	if(teilnehmer == '6'){
	    document.getElementById("t6").style.display = 'none';
	    document.getElementById("t7").style.display = 'none';
	    document.getElementById("t8").style.display = 'none';

	    document.getElementById("t6").style.display = 'block';
	}
	if(teilnehmer == '7'){
	    document.getElementById("t6").style.display = 'none';
	    document.getElementById("t7").style.display = 'none';
	    document.getElementById("t8").style.display = 'none';

	    document.getElementById("t6").style.display = 'block';
	    document.getElementById("t7").style.display = 'block';
	}
	if(teilnehmer == '8'){
	    document.getElementById("t6").style.display = 'none';
	    document.getElementById("t7").style.display = 'none';
	    document.getElementById("t8").style.display = 'none';

	    document.getElementById("t6").style.display = 'block';
	    document.getElementById("t7").style.display = 'block';
	    document.getElementById("t8").style.display = 'block';
	}
}
