// how to call:
// <form method="POST" action="demo.html" name="myForm" onSubmit="return validate()">
function chk_form(){
	with(document.val_form){
		var urlPat = /^http:\/\//;
		var emailPat = /^([a-zA-Z_0-9-.]+)@([a-zA-Z_0-9-.]+)\.([a-z]{2,4})$/;
		if(category.value==""){
			alert("Please select the website category.");
			category.focus();
			return false;
		}
		if(link_name.value==""){
			alert("Name of website required.");
			link_name.focus();
			return false;
		}
		/*if(description.value==""){
			alert("Website description required.");
			description.focus();
			return false;
		}*/
		if(!link_url.value.match(urlPat)){
			alert("Complete website address required.");
			link_url.focus();
			return false;
		}		
		return true;
	}// end with
}
//-->
