// JavaScript Document
function checkform() {
	if (document.myform.name.value.length == 0){
		alert('Please insert your name.');
		document.myform.name.focus();
		return false;
	} 
	if (document.myform.email.value.length == 0) {
		alert('Please insert your email.');
		document.myform.email.focus();
		return false;
	} 
	var x = document.myform.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x)) {
		alert('Invalid email address. Please enter a valid email address');
		document.myform.email.focus();
		return false;
	}
	if (document.myform.comments.value.length == 0)  {
		alert('Please fill in the comments section. Thank you.');
		document.myform.comments.focus();
		return false;
	}
	return true;
}
				
/***********************************************
* Textarea Maxlength script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}
