function is_email(email)
{
	if(!email.match(/^[A-Za-z0-9\._\-+]+@[A-Za-z0-9_\-+]+(\.[A-Za-z0-9_\-+]+)+$/))
		return false;
	return true;
}


function validateQuickContact()
{
    var obj = document.qcontact;	 
	
	if(obj.quname.value=='Name' || obj.quname.value==''){
		alert('please fill the name field');
		obj.quname.focus();
		return false;
	}
	if(obj.qphone.value=='Phone' || obj.qphone.value==''){
		alert('please fill the phone field');
		obj.qphone.focus();
		return false;
	} 
	if(obj.qemail.value=='Email' || obj.qemail.value==''){
		alert('please fill the email field');
		obj.qemail.focus();
		return false;
	}
	if(!is_email(obj.qemail.value)){
		alert('please fill the proper email');
		obj.qemail.focus();
		return false;
	}
    obj.submit();
}

function validateContactUs()
{
    var obj = document.ContactUs;	
	if(obj.fname.value==''){
		alert('please fill the first name field');
		obj.fname.focus();
		return false;
	} 
	if(obj.cemail.value==''){
		alert('please fill the email field');
		obj.cemail.focus();
		return false;
	}
	if(!is_email(obj.cemail.value)){
		alert('please fill the proper email');
		obj.cemail.focus();
		return false;
	}
	if(obj.comments.value==''){
		alert('please fill the Enquiry field');
		obj.comments.focus();
		return false;
	}
    obj.submit();
}

function validateTrailfrm()
{
    var obj = document.trialfrm;	 
	if(obj.tfname.value==''){
		alert('please fill the name field');
		obj.tfname.focus();
		return false;
	}
	if(obj.tphone.value==''){
		alert('please fill the phone field');
		obj.tphone.focus();
		return false;
	} 
	if(obj.temail.value==''){
		alert('please fill the email field');
		obj.temail.focus();
		return false;
	}
	if(!is_email(obj.temail.value)){
		alert('please fill the proper email');
		obj.temail.focus();
		return false;
	}

}

