// JavaScript Document
function check_form(){
	if(document.form.name.value == ""){
		alert("Please enter your full name");
		document.form.name.focus();
		return false;
	}
	if(document.form.mail.value == ""){
		alert("Please enter your email address.");	
		document.form.mail.focus();
		return false;
	}else{
		//email validation//////////////////////////////////
		var theEmail = document.form.mail.value;
		var atLoc = theEmail.indexOf("@", 1);
		var dotLoc = theEmail.indexOf(".", atLoc+2);
		var len = theEmail.length;
		if(atLoc > 0 && dotLoc > 0 && len > dotLoc+2){
			//return true;
		}else{
			alert("Email format that you entered is not correct.\r\n Please enter correct one.");
			document.form.mail.focus();
			return false;
		}
		//////////////////////////////////////////////////////	
	}
}