
/*********************************************/
/***** Formular Check ************************/
/*********************************************/


function checkform(){
	errortext = "";
	if (document.castingform.formfield51[0].checked == false && document.castingform.formfield51[1].checked == false){
		errortext = "Bitte geben Sie Ihr Geschlecht an!\n";
		var error = 1;
	}
	if (document.castingform.formfield01.value == ""){
		errortext = errortext + "Bitte geben Sie Ihrem Vornamen an!\n";
		var error = 1;
	}
	if (document.castingform.formfield02.value == ""){
		errortext = errortext + "Bitte geben Sie Ihrem Nachnamen an!\n";
		var error = 1;
	}
	if (document.castingform.formfield03.value == ""){
		errortext = errortext + "Bitte geben Sie Strasse an!\n";
		var error = 1;
	}
	if (document.castingform.formfield04.value == ""){
		errortext = errortext + "Bitte geben Sie Ihre PLZ an!\n";
		var error = 1;
	}
	if (document.castingform.formfield05.value == ""){
		errortext = errortext + "Bitte geben Sie Ihren Ort an!\n";
		var error = 1;
	}
	if (document.castingform.formfield13.value == ""){
		errortext = errortext + "Bitte geben Sie Ihr Geburtsdatum an!\n";
		var error = 1;
	}
	if (document.castingform.formfield06.value == "" && document.castingform.formfield07.value == ""){
		errortext = errortext + "Bitte geben Sie mind. eine gültige Telefonnummer an!\n";
		var error = 1;
	}
	if (document.castingform.formfield09.value == ""){
		errortext = errortext + "Bitte geben Sie Ihre E-Mail-Adresse an!\n";
		var error = 1;
	}
	
	if (document.castingform.formfield18.value == ""){
		errortext = errortext + "Bitte geben Sie Ihre Größe an!\n";
		var error = 1;
	}
	if (document.castingform.formfield19.value == ""){
		errortext = errortext + "Bitte geben Sie Ihr Gewicht an!\n";
		var error = 1;
	}
	if (document.castingform.formfield21.value == ""){
		errortext = errortext + "Bitte geben Sie Ihre Haarfarbe an!\n";
		var error = 1;
	}
	if (document.castingform.formfield22.value == ""){
		errortext = errortext + "Bitte geben Sie Konfektion an!\n";
		var error = 1;
	}
	if (document.castingform.formfield20.value == ""){
		errortext = errortext + "Bitte geben Sie Ihre Augenfarbe an!\n";
		var error = 1;
	}
	if (document.castingform.formfield24.value == ""){
		errortext = errortext + "Bitte geben Sie Ihre Schuhgröße an!\n";
		var error = 1;
	}
	
	if ((document.castingform.formfield61.value == '"')||(document.castingform.formfield11.value == '"')||(document.castingform.formfield48.value == '"')){
		errortext = errortext + 'Bitte verwenden Sie im Text keine Anführungsstriche!\n';
		var error = 1;
	}
	
	
	if (error != 1){
		document.castingform.submit();
	} else {
		alert("Folgende Fehler sind aufgetreten:\n\n" + errortext);
	}
}

function checkform2(){
	errortext = "";
	error = "";
	if (document.castingform.userfile1.value == ""){
		errortext = errortext + "Bitte fügen Sie ein Bild ein!\n";
		var error = 1;
	}
	if (document.castingform.einverstanden.checked == false){
		errortext = errortext + "Sie könne sich nur eintragen wenn die Bedingungen akzeptiert werden!\n";
		var error = 1;
	}
	
	if ((document.castingform.formfield14.value == '"')||(document.castingform.formfield15.value == '"')||(document.castingform.formfield37.value == '"')||(document.castingform.formfield39.value == '"')||(document.castingform.formfield47.value == '"')||(document.castingform.formfield46.value == '"')||(document.castingform.formfield49.value == '"')){
		errortext = errortext + 'Bitte verwenden Sie im Text keine Anführungsstrich!\n';
		var error = 1;
	}
	
	if (error != 1){
		window.open('/fileadmin/formular_wait.php','form_wait','width=200,height=200');
		window.setTimeout("submit_form()", 5000);
	} else {
		alert("Folgende Fehler sind aufgetreten:\n\n" + errortext);
	}
}

function submit_form(){
	document.castingform.submit();
}

function open_form(){
	openWindow = window.open('/fileadmin/formular_neu.php','castingform','width=453,height=700,scrollbars=yes,menubar=no,status=no,scrollbars=yes,resizable=no,toolbar=no,location=no');
}
		
/*********************************************************/
/*********** Navimage Rollover ***************************/
/*********************************************************/

var imgArray = new Array (
	"/fileadmin/global/img/nav/nav2_act.gif",
	"/fileadmin/global/img/nav/nav2_pas.gif",
	"/fileadmin/global/img/nav/nav2_roll.gif",
	"/fileadmin/global/img/nav/nav3_act.gif",
	"/fileadmin/global/img/nav/nav3_pas.gif",
	"/fileadmin/global/img/nav/nav3_roll.gif",
	"/fileadmin/global/img/nav/nav1_act.gif",
	"/fileadmin/global/img/nav/nav1_pas.gif",
	"/fileadmin/global/img/nav/nav1_roll.gif"
);

var imgList = new Array();
for (i=0;i<10;i++){
	imgList[i] = new Image();
	imgList[i].src = imgArray[i];
}

var navArrayde = new Array('11.0.html','102.0.html','10.0.html');

var url = document.location.href;
var start = url.lastIndexOf("/")+1;
var end = url.lastIndexOf(".html");
var ID = url.substring(start,end);
var lang = 'de';

function navMainRollover(bereich){
//	if (ID == 10){
	if (bereich == 'models' ){
		document.write('<td id="navCell1Pas"><a href="11.html"><img src="/fileadmin/global/img/nav/nav2_act.gif" width="106" height="62" alt="" border="0" name="image1"></a></td><td id="navCellSpacer"><img src="/fileadmin/global/img/spacer.gif" width="4" height="1" alt=""></td>');
	} else {
		document.write('<td id="navCell1Pas"><a href="11.html" onmouseover="image1.src=\'/fileadmin/global/img/nav/nav2_roll.gif\'" onmouseout="image1.src=\'/fileadmin/global/img/nav/nav2_pas.gif\'"><img src="/fileadmin/global/img/nav/nav2_pas.gif" width="106" height="62" alt="" border="0" name="image1"></a><td id="navCellSpacer"><img src="/fileadmin/global/img/spacer.gif" width="4" height="1" alt=""></td>');
	}

//	if (ID == 102){
	if (bereich == 'featured_extras' ){
		document.write('<td id="navCell1Pas"><a href="102.html"><img src="/fileadmin/global/img/nav/nav3_act.gif" width="106" height="62" alt="" border="0" name="image2"></a></td><td id="navCellSpacer"><img src="/fileadmin/global/img/spacer.gif" width="4" height="1" alt=""></td>');
	} else {
		document.write('<td id="navCell1Pas"><a href="102.html" onmouseover="image2.src=\'/fileadmin/global/img/nav/nav3_roll.gif\'" onmouseout="image2.src=\'/fileadmin/global/img/nav/nav3_pas.gif\'"><img src="/fileadmin/global/img/nav/nav3_pas.gif" width="106" height="62" alt="" border="0" name="image2"></a><td id="navCellSpacer"><img src="/fileadmin/global/img/spacer.gif" width="4" height="1" alt=""></td>');
	}

//	if (ID == 12){
	if (bereich == 'komparsen' ){
		document.write('<td id="navCell1Pas"><a href="10.html"><img src="/fileadmin/global/img/nav/nav1_act.gif" width="106" height="62" alt="" border="0" name="image3"></a></td><td id="navCellSpacer"><img src="/fileadmin/global/img/spacer.gif" width="4" height="1" alt=""></td>');
	} else {
		document.write('<td id="navCell1Pas"><a href="10.html" onmouseover="image3.src=\'/fileadmin/global/img/nav/nav1_roll.gif\'" onmouseout="image3.src=\'/fileadmin/global/img/nav/nav1_pas.gif\'"><img src="/fileadmin/global/img/nav/nav1_pas.gif" width="106" height="62" alt="" border="0" name="image3"></a><td id="navCellSpacer"><img src="/fileadmin/global/img/spacer.gif" width="4" height="1" alt=""></td>');
	}
}		

var path = document.location;

function berechnen(){
	document.bestellung.action.value="berechnen";
	document.bestellung.submit();
}

function bestellen(){
	document.bestellung.action.value="bestellen";
	document.bestellung.submit();
}

