function CheckBestellungNutzungsbestimmungen () {
	if (document.AboVerlaengerungFormular.nutzungsbestimmungen.checked == false) {
		alert("Bitte akzeptieren Sie die Nutzungsbestimmungen.");
		return false;
	}
}
function openImpressum(){
	impressum = window.open("http://www.grundschulmaterial.de/norewrite/impressum.htm","impressum","width=340, height=540");
}
function openImageinfo(){
	imageinfo = window.open("/norewrite/imageinfo.htm","imageinfo","width=400, height=600");
}
function closeImageinfo(URL) {
	this.window.close();
	opener.location.href = URL;
}
function openDRegistrierung(){
	dregistrierung = window.open("/formular/dregistrierung.htm","dregistrierung","width=430, height=770");
}
function openHilfe(){
	hilfe = window.open("http://www.grundschulmaterial.de/inc/hilfe/hilfepopup.php","hilfe", "scrollbars=yes, width=600, height=750");
}
/*function openNewUser() {
	sOpt = "toolbar=no,scrollbars=yes,status=no,menubar=no,resizable=yes,location=no,dependent=yes,width=500,height=700";
	window.open("http://62.75.136.250:8080/Cumulus_D/Standard/UserForm.jsp", "EMail", sOpt);
}*/

function openNutzungsbestimmungen(){
	opener.location.href = "/nutzungsbestimmungen.htm";
}

function clearUser() {
	document.login.user.value = "";
}

function clearPassword() {
	document.login.password.value = "";
}

function clearKontaktformNachricht() {
	if(document.Kontaktform.Nachricht.value == "Ihre Nachricht...")
	document.Kontaktform.Nachricht.value = "";
}

function clearPasswortformularNachricht() {
	if(document.Passwortformular.Nachricht.value == "Optionale Nachricht...")
	document.Passwortformular.Nachricht.value = "";
}

function clearWeiterempfehlenformularNachricht() {
	if(document.WeiterempfehlenFormular.Nachricht.value == "Optionale Nachricht...")
	document.WeiterempfehlenFormular.Nachricht.value = "";
}

function clearNachricht() {
	if(document.AboVerlaengerungFormular.Nachricht.value == "Optionale Nachricht...")
	document.AboVerlaengerungFormular.Nachricht.value = "";
}

function clearEintrag() {
	if(document.Gaestebuchformular.Text.value == "Ihr Eintrag...")
	document.Gaestebuchformular.Text.value = "";
}

function clearNewsletter() {
	if(document.newsletter.email.value == "eMail")
	document.newsletter.email.value = "";
}

function change(id,klasse) {
document.getElementById(id).className = klasse;
}

function openDRegistrierung(){
	dregistrierung = window.open("/formular/dregistrierung.htm","dregistrierung","width=430, height=770");
}

function chkFormular() {
	if(document.registrierung.FirstName.value == "") {
	window.location.href = "error.htm";
	return(false);
	}
	if(document.registrierung.LastName.value == "") {
	window.location.href = "error.htm";
	return(false);
	}
	if(document.registrierung.Description.options[document.registrierung.Description.options.selectedIndex].text == "- Bitte wählen -") {
	window.location.href = "error.htm";
	return(false);
	}	
	if((document.registrierung.BillingAddress.value.split(/@/).length != 2) || (document.registrierung.BillingAddress.value.split(/@/))[0] == "" || (document.registrierung.BillingAddress.value.split(/@/))[1] == "") {
	window.location.href = "error.htm";
	return(false);
	}
	if(document.registrierung.Nutzungsbestimmungen.checked == false) {
	window.location.href = "error.htm";
	return(false);
	}	
	return(true);
}

function chkKontaktformular() {
	if((document.Kontaktformular.eMail.value.split(/@/).length != 2) || (document.Kontaktformular.eMail.value.split(/@/))[0] == "" || (document.Kontaktformular.eMail.value.split(/@/))[1] == "") {
	window.location.href = "/kontakt/error.htm";
	return(false);
	}
	else if((document.Kontaktformular.Nachricht.value == "") || (document.Kontaktformular.Nachricht.value == "Ihre Nachricht...")) {
	window.location.href = "/kontakt/error.htm";
	return(false);
	}
	//return(true);
}

function chkGaestebuchformular() {
	if(document.Gaestebuchformular.Name.value == "") {
	window.location.href = "/gaestebuch/error.htm";
	return(false);
	}
	else if((document.Gaestebuchformular.Text.value == "") || (document.Gaestebuchformular.Text.value == "Ihr Eintrag...")) {
	window.location.href = "/gaestebuch/error.htm";
	return(false);
	}
	//return(true);
}

function email(name, prefix, style) {
	var domain = "grundschulmaterial.de";
	document.write('<a href=\"mailto:' + prefix + '@' + domain + '\" class="'+ style +'">' + name + '</a>');
}

function chkWeiterempfehlen() {
	if((document.Weiterempfehlen.send_to.value.split(/@/).length != 2) || (document.Weiterempfehlen.send_to.value.split(/@/))[0] == "" || (Weiterempfehlen.send_to.value.split(/@/))[1] == "") {
	window.location.href = "/weiterempfehlen/error.htm";
	return(false);
	}
	else if((document.Weiterempfehlen.send_from.value.split(/@/).length != 2) || (document.Weiterempfehlen.send_from.value.split(/@/))[0] == "" || (Weiterempfehlen.send_from.value.split(/@/))[1] == "") {
	window.location.href = "/weiterempfehlen/error.htm";
	return(false);
	}
	//return(true);
}