// how to call:
// <form method="POST" action="demo.html" name="myForm" onSubmit="return validate()">
function chk_guestbook(){
	with(document.gbook_Form){
		var emailPat = /^([a-zA-Z_0-9-.]+)@([a-zA-Z_0-9-.]+)\.([a-z]{2,4})$/;
		if(txtName.value==""){
			alert("Please enter your name.");
			txtName.focus();
			return false;
		}
		if(txtLoc.value==""){
			alert("Please enter your location.");
			txtLoc.focus();
			return false;
		}
		if(!txtEmail.value.match(emailPat)){
			alert("Please complete your email address.");
			txtEmail.focus();
			return false;
		}
		if(mtxMessage.value==""){
			alert("Please enter your message.");
			mtxMessage.focus();
			return false;
		}
		return true;
	}// end with
}
//-->
