// JavaScript Document
function check_contactform(){
	if(document.form.namecont.value == ""){
		alert("Please enter your name.");
		document.form.namecont.focus();
		return false;
	}
	
	if(document.form.zippcont.value == ""){
		alert("Please enter the zip code.");
		document.form.zippcont.focus();
		return false;
	}
	
	if(document.form.mailcont.value == ""){
		alert("Please enter your email address.");
		document.form.mailcont.focus();
		return false;
	}else{
		var theEmail = document.form.mailcont.value;
		var atLoc = theEmail.indexOf("@", 1);
		var dotLoc = theEmail.indexOf(".", atLoc+2);
		var len = theEmail.length;
		if(atLoc > 0 && dotLoc > 0 && len > dotLoc+2){
			
		}
		else{
			alert("Please enter your email address properly.");
			document.form.mailcont.focus();
			return false;
		}
	}
}

function confirm_cancel(){
	ok = confirm("Are you sure you want to reset the form?");
	if(ok){
		document.form.reset();
		return true;
	}else{
		return false;
	}
}
