function validate_required(field,alerttxt){
	with (field){
		if (value==null||value==""||value=="seqarator"){
			alert(alerttxt);return false
		}
		else {return true}
	}
}
function validate_email(field,alerttxt){
	with (field){
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2){
			alert(alerttxt);return false}
		else {return true}
	}
}

function validate_form(thisform){
	with (thisform){
		// First Name
		if (validate_required(gname,"Please fill in all necessary information.")==false){
			gname.focus();return false}
		// Last Name
		if (validate_required(fname,"Please fill in all necessary information.")==false){
			fname.focus();return false}
		// EMail
		if (validate_required(email,"Please fill in all necessary information.")==false){
			email.focus();return false}
		if (validate_email(email,"We will be sent the product information to you by mail, \nso please provide a correct e-mail address.")==false){
			email.focus();return false}
	}
}