function searchSubmit() {

if(document.itemsearch.search.value=="" || document.itemsearch.search.value=="Art. No.") {
return false;
}
document.itemsearch.submit() 
}

function checkEmailAddress(field) {

var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.biz)|(\..{2,2}))$)\b/gi);

if (goodEmail){
return false;
} else {
return true;
}
}

function VerifySignupData() {

if (document.signupform.company.value=="") {
		document.signupform.company.focus()
		alert("Vul u aub uw bedijfsnaam in.\n")
		return false;
	}
	
if (document.signupform.lastname.value=="") {
		document.signupform.lastname.focus()
		alert("Vul u aub uw (achter)naam in.\n")
		return false;
	}
	
if (document.signupform.email.value=="") {
		document.signupform.email.focus()
		alert("Vul u aub uw emailadres in.\n")
		return false;
	}
if (document.signupform.email.value!=document.signupform.emailverify.value) {
		document.signupform.email.focus()
		alert("De ingevulde email-adressen komen niet overeen.\n")
		return false;
	}
	
if(checkEmailAddress(document.signupform.email)) {
		document.signupform.email.focus()
		alert("Het ingevulde email-adres is niet correct.\n")
		return false;
}

if (document.signupform.phone.value=="") {
		document.signupform.phone.focus()
		alert("Vul u aub uw telefoon-nummer in.\n")
		return false;
	}
		
if (document.signupform.address.value=="") {
		document.signupform.address.focus()
		alert("Vul u aub uw adres in.\n")
		return false;
	}

if (document.signupform.postal_code.value=="") {
		document.signupform.postal_code.focus()
		alert("Vul u aub uw postcode in.\n")
		return false;
	}

if (document.signupform.city.value=="") {
		document.signupform.city.focus()
		alert("Vul u aub uw woonplaats in.\n")
		return false;
	}

if (document.signupform.btw_no.value=="") {
		document.signupform.btw_no.focus()
		alert("Vul u aub uw BTW-nummer in.\n")
		return false;
	}
	
if (document.signupform.password.value=="") {
		document.signupform.password.focus()
		alert("Vult u aub een wachtwoord in van tenminste 5 characters.\n")
		return false;
	}

if (!document.signupform.password.value==document.signupform.password2.value) {
		document.signupform.password2.focus()
		alert("De wachtwoorden komen niet overeen.\n")
		return false;
	}

if (document.signupform.terms.checked == false) {
		alert("Om verder te gaan dient u akkoord te gaan met de voorwaarden door de optie onderaan het formulier aan te vinken.\n")
		return false;
	}

document.signupform.submit() 
}



function VerifyContactData() {
// to verify contact-form on contact.php


if (document.contactform.name.value == "") {
		document.contactform.name.focus()
		alert("Vul u aub uw naam in.\n")
		return false;
	}

if (document.contactform.email.value == "") {
		document.contactform.email.focus()
		alert("Vul u aub uw email-adres in.\n")
		return false;
	}
	
if(checkEmailAddress(document.contactform.email)) {
		document.contactform.email.focus()
		alert("Uw email-adres is niet correct.\n")
		return false;
}


if (document.contactform.remarks.value == "") {
		document.contactform.remarks.focus()
		alert("U heeft geen opmerking ingevuld.\n")
		return false;
	}
	

document.contactform.submit() 
}
	

function requestNewPassword(){
	
	var my_email	= window.prompt("Vul uw email-adres in waarmee u geregistreerd staat, en u ontvangt een nieuw wachtwoord.\n", "");

			if(my_email) {
				iframe.location.href='http://www.ivy-art.com/requestNewPassword.php?email=' + my_email;
			}
}	
