// JS und JQuery für NewForms
// --------------------------

// Globale Check-Variablen, für Senden-Stop bei vorzeitigem Enter
var GlobalCheck = 0;
var GlobalCheck2 = 0;

var Erkennung;

// Überprüfung der Pflichtfelder
// -----------------------------
function FehlerCheck()
{
	// Daten Array erstellen und bereits vorabfüllen
	var ReturnDaten = new Array();
	ReturnDaten["Schicken"] = false;
	ReturnDaten["Fehlermeldung"] = "";
	Status = 0;
	Schicken = false;
	
	// Check Funktion definieren
	function CheckElements(Status)
	{
		// RegEx kreieren und bei Email-Check einbinden
		Email_RegEx = /^([a-zA-Z0-9-])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9-])+(\.[a-zA-Z0-9_-]+)+$/;
		
		// RegEx für PLZ
		PLZ_RegEx = /^\d{4}$/;
		
		if (document.Prospekt.Anrede.value == '')
		{
			document.Prospekt.Anrede.style.border = "red 1px solid";
			document.Prospekt.Anrede.style.background = "red";
			document.Prospekt.Vorname.style.width = "189px";
			document.Prospekt.Vorname.style.height = "24px";
			document.getElementById("Anrede_Label").style.color = "red";
			
			// Animiere das Einblenden
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("Anrede_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Anrede\n";
		}
		else
		{
			document.Prospekt.Anrede.style.border = "#7F9DB9 1px solid";
			document.Prospekt.Anrede.style.background = "white";
			document.Prospekt.Vorname.style.width = "189px";
			document.Prospekt.Vorname.style.height = "24px";
			document.getElementById("Anrede_Label").style.color = "white";
			document.getElementById("FehlerSeite2").style.display = "none";
			document.getElementById("FehlerS2").style.display = "none";
			document.getElementById("Anrede_F").style.display = "none";
			Status += 1;
		}
		if (document.Prospekt.Vorname.value == '')
		{
			document.Prospekt.Vorname.style.border = "red 1px solid";
			document.Prospekt.Vorname.style.background = "red";
			document.Prospekt.Vorname.style.width = "189px";
			document.Prospekt.Vorname.style.height = "22px";
			document.getElementById("Vorname_Label").style.color = "red";
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("Vorname_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Vorname\n";
		}
		else
		{
			document.Prospekt.Vorname.style.border = "#7F9DB9 1px solid";
			document.Prospekt.Vorname.style.background = "white";
			document.Prospekt.Vorname.style.width = "189px";
			document.Prospekt.Vorname.style.height = "22px";
			document.getElementById("Vorname_Label").style.color = "white";
			document.getElementById("FehlerSeite2").style.display = "none";
			document.getElementById("FehlerS2").style.display = "none";
			document.getElementById("Vorname_F").style.display = "none";
			Status += 1;
		}
		if (document.Prospekt.Nachname.value == '')
		{
			document.Prospekt.Nachname.style.border = "red 1px solid";
			document.Prospekt.Nachname.style.background = "red";
			document.Prospekt.Nachname.style.width = "189px";
			document.Prospekt.Nachname.style.height = "22px";
			document.getElementById("Nachname_Label").style.color = "red";
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("Name_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Nachname\n";
		}
		else
		{
			document.Prospekt.Nachname.style.border = "#7F9DB9 1px solid";
			document.Prospekt.Nachname.style.background = "white";
			document.Prospekt.Nachname.style.width = "189px";
			document.Prospekt.Nachname.style.height = "22px";
			document.getElementById("Nachname_Label").style.color = "white";
			document.getElementById("FehlerSeite2").style.display = "none";
			document.getElementById("FehlerS2").style.display = "none";
			document.getElementById("Name_F").style.display = "none";
			Status += 1;
		}
		if (document.Prospekt.Strasse.value == '')
		{
			document.Prospekt.Strasse.style.border = "red 1px solid";
			document.Prospekt.Strasse.style.background = "red";
			document.Prospekt.Strasse.style.width = "189px";
			document.Prospekt.Strasse.style.height = "22px";
			document.getElementById("Strasse_Label").style.color = "red";
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("Strasse_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Strasse\n\n";
		}
		else
		{
			document.Prospekt.Strasse.style.border = "#7F9DB9 1px solid";
			document.Prospekt.Strasse.style.background = "white";
			document.Prospekt.Strasse.style.width = "189px";
			document.Prospekt.Strasse.style.height = "22px";
			document.getElementById("Strasse_Label").style.color = "white";
			document.getElementById("FehlerSeite2").style.display = "none";
			document.getElementById("FehlerS2").style.display = "none";
			document.getElementById("Strasse_F").style.display = "none";
			Status += 1;
		}
		if (document.Prospekt.PLZ.value == '' || !PLZ_RegEx.test(document.Prospekt.PLZ.value)) // PLZ auf 4 Zahlen prüfen
		{
			document.Prospekt.PLZ.style.border = "red 1px solid";
			document.Prospekt.PLZ.style.background = "red";
			document.Prospekt.PLZ.style.width = "60px";
			document.Prospekt.PLZ.style.height = "22px";
			document.getElementById("PLZ_Label").style.color = "red";
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("PLZ_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Gültige PLZ\n";
		}
		else
		{
			document.Prospekt.PLZ.style.border = "#7F9DB9 1px solid";
			document.Prospekt.PLZ.style.background = "white";
			document.Prospekt.PLZ.style.width = "60px";
			document.Prospekt.PLZ.style.height = "22px";
			document.getElementById("PLZ_Label").style.color = "white";
			document.getElementById("FehlerSeite2").style.display = "none";
			document.getElementById("FehlerS2").style.display = "none";
			document.getElementById("PLZ_F").style.display = "none";
			Status += 1;
		}
		if (document.Prospekt.Ort1.value == '')
		{
			document.Prospekt.Ort1.style.border = "red 1px solid";
			document.Prospekt.Ort1.style.background = "red";
			document.Prospekt.Ort1.style.width = "124px";
			document.Prospekt.Ort1.style.height = "22px";
			document.getElementById("Ort1_Label").style.color = "red";
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("Ort_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Ort\n\n";
		}
		else
		{
			document.Prospekt.Ort1.style.border = "#7F9DB9 1px solid";
			document.Prospekt.Ort1.style.background = "white";
			document.Prospekt.Ort1.style.width = "124px";
			document.Prospekt.Ort1.style.height = "22px";
			document.getElementById("Ort1_Label").style.color = "white";
			document.getElementById("FehlerSeite2").style.display = "none";
			document.getElementById("FehlerS2").style.display = "none";
			document.getElementById("Ort_F").style.display = "none";
			Status += 1;
		}
		if (document.Prospekt.Email.value == '' || !Email_RegEx.test(document.Prospekt.Email.value))
		{
			document.Prospekt.Email.style.border = "red 1px solid";
			document.Prospekt.Email.style.background = "red";
			document.Prospekt.Email.style.width = "189px";
			document.Prospekt.Email.style.height = "22px";
			document.getElementById("Email_Label").style.color = "red";
			$(document).ready(function() {
			$("#FehlerSeite2, #FehlerS2").fadeIn("normal");
			});
			document.getElementById("Email_F").style.display = "inline";
			ReturnDaten["Fehlermeldung"] += "- Gültige Email\n";
		}
		else
		{
			document.Prospekt.Email.style.border = "#7F9DB9 1px solid";
			document.Prospekt.Email.style.background = "white";
			document.Prospekt.Email.style.width = "189px";
			document.Prospekt.Email.style.height = "22px";
			document.getElementById("Email_Label").style.color = "white";
			document.getElementById("Email_F").style.display = "none";
			document.getElementById("FehlerSeite2").style.display = "block";
			document.getElementById("FehlerS2").style.display = "inline";
			Status += 1;
		}
		
		if (Captcha_Check())
		{
			Status += 1;
		}
		
		return Status;
	}
	
	// Zusatzfunktion für Captcha
	function Captcha_Check()
	{
		if (document.getElementById("Captcha_Input").value == '')
		{
			document.Prospekt.captcha_code.style.border = "red 1px solid";
			document.Prospekt.captcha_code.style.background = "red";
			document.Prospekt.captcha_code.style.width = "100px";
			document.Prospekt.captcha_code.style.height = "24px";
			document.getElementById("Captcha_Label").style.color = "red";
			return false;
		}
		else
		{
			document.Prospekt.captcha_code.style.border = "#7F9DB9 1px solid";
			document.Prospekt.captcha_code.style.background = "white";
			document.Prospekt.captcha_code.style.width = "100px";
			document.Prospekt.captcha_code.style.height = "24px";
			document.getElementById("Captcha_Label").style.color = "white";
			return true;
		}
	}
	
	if (CheckElements(Status) == 8)
	{
		document.getElementById("FehlerSeite2").style.display = "none";
		Schicken = true;
		GlobalCheck += 1;
		GlobalCheck2 += 1;
		NavForwardS2();
	}
	else Schicken = false;
	return Schicken;
}

// Navigationsfunktionen
function NavBackS2()
{
	document.getElementById("Seite1_Auswahl").style.display = "inline";
	document.getElementById("Seite2_Personalien").style.display = "none";
	GlobalCheck -= 1;
	GlobalCheck2 -= 1;
}

function NavBackS3()
{
	document.getElementById("Seite2_Personalien").style.display = "inline";
	document.getElementById("Seite3_Check").style.display = "none";
	GlobalCheck2 -= 1;
	GlobalCheck -= 1;
}

function NavForwardS1(FormType)
{
	if (document.Prospekt.Modell.value == '')
	{
		$(document).ready(function() {
			$("#FehlerSeite1").fadeIn("normal");
		});
		document.Prospekt.Modell.style.border = "red solid 1px";
		document.Prospekt.Modell.style.background = "red";
		document.Prospekt.Modell.style.height = "22px";
		document.getElementById("Modell-Label").style.color = "red";
	}
	else
	{
		document.Prospekt.Modell.style.border = "#7F9DB9 1px solid";
		document.Prospekt.Modell.style.background = "white";
		document.Prospekt.Modell.style.height = "22px";
		document.getElementById("Modell-Label").style.color = "white";
		document.getElementById("Seite1_Auswahl").style.display = "none";
		document.getElementById("Seite2_Personalien").style.display = "inline";
		document.getElementById("FehlerSeite1").style.display = "none";
		GlobalCheck += 1;
		GlobalCheck2 += 1;
		if (FormType == 'Prospekt')
		{
			Erkennung = "Prospekt";
		}
		else Erkennung = "Probefahrt";
	}
}

function NavForwardS2() // Bei Erkennungsübergabe auf _Probefahrt erweitern
{
	document.getElementById("Seite2_Personalien").style.display = "none";
	document.getElementById("Seite3_Check").style.display = "inline";
	document.getElementById("Submit").style.display = "inline";
	
	// Check-Site abfüllen
	
	// Prüfen, ob weitere Modelle gewählt; wenn ja, diese hinzufügen
	if (document.getElementById("Modell2").value != '')
	{
		Modell_Pre_2 = ", "+document.getElementById("Modell2").value;
	}
	else Modell_Pre_2 = "";
	if (document.getElementById("Modell3").value != '')
	{
		Modell_Pre_3 = ", "+document.getElementById("Modell3").value;
	}
	else Modell_Pre_3 = "";
	if (document.getElementById("Modell4").value != '')
	{
		Modell_Pre_4 = ", "+document.getElementById("Modell4").value;
	}
	else Modell_Pre_4 = "";
	
	// Modell String zusammensetzen
	Modell_Komplett = document.getElementById("Modell").value+Modell_Pre_2+Modell_Pre_3+Modell_Pre_4;
	
	// Eigentliches Abfüllen
	document.getElementById("Modell_Check").innerHTML = Modell_Komplett;
	document.getElementById("Anrede_Check").innerHTML = document.getElementById("Anrede").value;
	document.getElementById("Vorname_Check").innerHTML = document.getElementById("Vorname").value;
	document.getElementById("Firma_Check").innerHTML = document.getElementById("Firma").value;
	document.getElementById("Strasse_Check").innerHTML = document.getElementById("Strasse").value;
	document.getElementById("Telefon_Check").innerHTML = document.getElementById("Tel").value;
	document.getElementById("Nachname_Check").innerHTML = document.getElementById("Nachname").value;
	document.getElementById("Geburtstag_Check").innerHTML = document.getElementById("GT_Tag").value+"."+document.getElementById("GT_Monat").value+"."+document.getElementById("GT_Jahr").value;
	document.getElementById("PLZOrt_Check").innerHTML = document.getElementById("PLZ").value+", "+document.getElementById("Ort1").value;
	document.getElementById("Email_Check").innerHTML = document.getElementById("Email").value;
	
	// Zeitpunktangaben, alle Zustände prüfen, falls Probefahrt Formular aktiv
	if (Erkennung == "Probefahrt")
	{
		if (document.getElementById("Datum_PF").value != '' && document.getElementById("Zeit_PF").value != '' && document.getElementById("Zeit_PF2").value != '')
		{
			Zeitpunkt = document.getElementById("Datum_PF").value+", "+document.getElementById("Zeit_PF").value+":"+document.getElementById("Zeit_PF2").value+" h";
		}
		else if (document.getElementById("Datum_PF").value != '' && (document.getElementById("Zeit_PF").value != '' || document.getElementById("Zeit_PF2").value != ''))
		{
			Zeitpunkt = document.getElementById("Datum_PF").value;
		}
		else if (document.getElementById("Datum_PF").value != '' && (document.getElementById("Zeit_PF").value == '' && document.getElementById("Zeit_PF2").value == ''))
		{
			Zeitpunkt = document.getElementById("Datum_PF").value;
		}
		else Zeitpunkt = '--';
	
		// Zuweisung des korrekten Textes
		document.getElementById("Zeitpunkt_Check").innerHTML = Zeitpunkt;
	}
}

// Bilderwechsel
// -------------
function Bild_Change()
{
	// Speed Einstellung
	Speed = 500;
	
	if (document.Prospekt.Modell.value == "iQ")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/iq.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "AYGO")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aygo.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Yaris")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "NewYaris")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Urban Cruiser")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/uc.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Auris")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/auris.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Verso")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/verso.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Verso-S")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/versos.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Avensis")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/avensis.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Prius")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/prius.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "RAV4")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/rav.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Land Cruiser")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lc.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Land Cruiser V8")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lcv8.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Hilux")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hilux.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Hiace")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hiace.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Dyna")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/dyna.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "Auris Hybrid")
	{
		document.Prospekt.Modellbild.style.display = "inline";
		
		$("#Modellbild").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aurishsd.jpg')
	 		.load(function()
			{
				$('#Modellbild').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell.value == "") // Für den Fall, dass wieder auf "Bitte wählen" geschalten werden sollte
	{
		document.Prospekt.Modellbild.style.display = "none";
		Bild_PH = new Image();
		Bild_PH.src = "http://forms.toyota.ch/fileadmin/templates/v9forms/files/PH.jpg";
		document.Prospekt.Modellbild.src = Bild_PH.src;
	}
}

// Bild Change für die 2. Modellwahl
function Bild_Change2()
{
	// Speed Einstellung
	Speed = 500;
	
	if (document.Prospekt.Modell2.value == "iQ")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild2.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/iq.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "AYGO")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aygo.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Yaris")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "NewYaris")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild2.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Urban Cruiser")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/uc.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Auris")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/auris.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Verso")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/verso.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Verso-S")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/versos.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Avensis")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/avensis.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Prius")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/prius.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "RAV4")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/rav.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Land Cruiser")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lc.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Land Cruiser V8")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lcv8.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Hilux")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hilux.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Hiace")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hiace.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Dyna")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/dyna.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "Auris Hybrid")
	{
		document.Prospekt.Modellbild2.style.display = "inline";
		
		$("#Modellbild2").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild2").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aurishsd.jpg')
	 		.load(function()
			{
				$('#Modellbild2').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell2.value == "") // Für den Fall, dass wieder auf "Bitte wählen" geschalten werden sollte
	{
		document.Prospekt.Modellbild2.style.display = "none";
		Bild_PH = new Image();
		Bild_PH.src = "http://forms.toyota.ch/fileadmin/templates/v9forms/files/PH.jpg";
		document.Prospekt.Modellbild2.src = Bild_PH.src;
	}
}

// Bild Change für die 3. Modellwahl
function Bild_Change3()
{
	// Speed Einstellung
	Speed = 500;
	
	if (document.Prospekt.Modell3.value == "iQ")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild3.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/iq.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "AYGO")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aygo.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Yaris")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "NewYaris")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild3.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Urban Cruiser")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/uc.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Auris")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/auris.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Verso")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/verso.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Verso-S")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/versos.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Avensis")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/avensis.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Prius")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/prius.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "RAV4")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/rav.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Land Cruiser")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lc.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Land Cruiser V8")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lcv8.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Hilux")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hilux.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Hiace")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hiace.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Dyna")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/dyna.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "Auris Hybrid")
	{
		document.Prospekt.Modellbild3.style.display = "inline";
		
		$("#Modellbild3").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild3").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aurishsd.jpg')
	 		.load(function()
			{
				$('#Modellbild3').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell3.value == "") // Für den Fall, dass wieder auf "Bitte wählen" geschalten werden sollte
	{
		document.Prospekt.Modellbild3.style.display = "none";
		Bild_PH = new Image();
		Bild_PH.src = "http://forms.toyota.ch/fileadmin/templates/v9forms/files/PH.jpg";
		document.Prospekt.Modellbild3.src = Bild_PH.src;
	}
}

// Bild Change für die 4. und letzte Modellwahl
function Bild_Change4()
{
	// Speed Einstellung
	Speed = 500;
	
	if (document.Prospekt.Modell4.value == "iQ")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild4.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/iq.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "AYGO")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aygo.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Yaris")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "NewYaris")
	{
		// Element sichtbar machen
		document.Prospekt.Modellbild4.style.display = "inline";
		
		// Element animieren inkl der Src-Zuweisung
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/yaris2011.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Urban Cruiser")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/uc.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Auris")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/auris.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Verso")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/verso.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Verso-S")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/versos.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Avensis")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/avensis.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Prius")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/prius.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "RAV4")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/rav.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Land Cruiser")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lc.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Land Cruiser V8")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/lcv8.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Hilux")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hilux.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Hiace")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/hiace.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Dyna")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/dyna.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "Auris Hybrid")
	{
		document.Prospekt.Modellbild4.style.display = "inline";
		
		$("#Modellbild4").animate({opacity: 0.0}, "fast",function()
		{	
			$("#Modellbild4").attr("src", 'http://forms.toyota.ch/fileadmin/templates/v9forms/files/Cars/aurishsd.jpg')
	 		.load(function()
			{
				$('#Modellbild4').animate({opacity: 1.0}, Speed);                      
			}); 
		});
	}
	if (document.Prospekt.Modell4.value == "") // Für den Fall, dass wieder auf "Bitte wählen" geschalten werden sollte
	{
		document.Prospekt.Modellbild4.style.display = "none";
		Bild_PH = new Image();
		Bild_PH.src = "http://forms.toyota.ch/fileadmin/templates/v9forms/files/PH.jpg";
		document.Prospekt.Modellbild4.src = Bild_PH.src;
	}
}

// Weitere Modelle - Funktionen
// ----------------------------

function WeiteresModell()
{
	$("#ModellZusatz1").slideDown("normal");
	$("#LinkZusatz").slideUp("normal");
	$("#LinkZusatz1").show();
}
function WeiteresModell2()
{
	$("#ModellZusatz2").slideDown("normal");
	$("#LinkZusatz1").slideUp("normal");
	$("#LinkZusatz2").show();
}
function WeiteresModell3()
{
	$("#ModellZusatz3").slideDown("normal");
	$("#LinkZusatz2").slideUp("normal");
}
function ZusatzModelle()
{
	$("#ModellZusatz1").hide();
	$("#ModellZusatz2").hide();
	$("#ModellZusatz3").hide();
	$("#LinkZusatz").show();
}

// PimpUp da Form with JQuery
// --------------------------
$(document).ready(function() {
	$("#Seite1_Auswahl").fadeIn("normal");
	$("#Modellbild").hide();
	$("#Seite2_Personalien").hide();
	$("#fourth-ul").hide();
	$("#Akt-ul").hide();
	$("#PF_Optional").hide();
	$("#ModellZusatz1").hide();
	$("#ModellZusatz2").hide();
	$("#ModellZusatz3").hide();
});

// DP Aufruf und Konfig
// --------------------
function DP_Call()
{
	displayDatePicker('Datum_PF', false, 'dmy', '.');
}

// Submit Check; nur true, wenn alle Check-Funktionen i.O. sind
// ------------------------------------------------------------
function Abschicken()
{
	if (GlobalCheck == 2)
	{
		return true;
	}
	else
	{
		return false;
	}
}

// Probefahrt Formular
function Abschicken2()
{
	if (GlobalCheck2 == 2)
	{
		return true;
	}
	else
	{
		return false;
	}
}

// Close Funktionen für Formular-Schliessmechanismus
// -------------------------------------------------
function Close()
{
	window.parent.location.href = 'http://de.toyota.ch';
}
function Close_F()
{
	window.parent.location.href = 'http://fr.toyota.ch';
}
function Close_I()
{
	window.parent.location.href = 'http://it.toyota.ch';
}

// Open Close Funktionen für die optionalen Angaben Vertreter, Heutiges Fahrzeug und Probefahrt
// --------------------------------------------------------------------------------------------


function OC_Vertreter()
{
	if (document.getElementById("fourth-ul").style.display == "block")
	{
		$("#fourth-ul").slideUp("fast");
		// Button auf Plus setzen
		Button_P = new Image();
		Button_P.src = "fileadmin/templates/v9forms/files/plus.gif";
		document.getElementById("Button_OCV").src = Button_P.src;
	}
	else if (document.getElementById("fourth-ul").style.display == "none")
	{
		$("#fourth-ul").slideDown("slow");
		// Button auf Minus setzen
		Button_M = new Image();
		Button_M.src = "fileadmin/templates/v9forms/files/minus.gif";
		document.getElementById("Button_OCV").src = Button_M.src;
	}
}

function OC_HFz()
{
	if (document.getElementById("Akt-ul").style.display == "block")
	{
		$("#Akt-ul").slideUp("fast");
		// Button auf Plus setzen
		Button_P = new Image();
		Button_P.src = "fileadmin/templates/v9forms/files/plus.gif";
		document.getElementById("Button_OCH").src = Button_P.src;
	}
	else if (document.getElementById("Akt-ul").style.display == "none")
	{
		$("#Akt-ul").slideDown("slow");
		// Button auf Minus setzen
		Button_M = new Image();
		Button_M.src = "fileadmin/templates/v9forms/files/minus.gif";
		document.getElementById("Button_OCH").src = Button_M.src;
	}
}

function OC_PF()
{
	if (document.getElementById("PF_Optional").style.display == "block")
	{
		$("#PF_Optional").slideUp("fast");
		// Button auf Plus setzen
		Button_P = new Image();
		Button_P.src = "fileadmin/templates/v9forms/files/plus.gif";
		document.getElementById("Button_OCPF").src = Button_P.src;
	}
	else if (document.getElementById("PF_Optional").style.display == "none")
	{
		$("#PF_Optional").slideDown("slow");
		// Button auf Minus setzen
		Button_M = new Image();
		Button_M.src = "fileadmin/templates/v9forms/files/minus.gif";
		document.getElementById("Button_OCPF").src = Button_M.src;
	}
}

