function ValidateForm(){

var first = document.form1.FirstName.value
var second= document.form1.LastName.value
var phone = document.form1.Phone.value
var email = document.form1.Email.value
var at="@"
var dot="."
var lat=email.indexOf(at)
var lstr=email.length
var ldot=email.indexOf(dot)
var comment = document.form1.Comments.value

if ((first==null)||(first=="")){
alert("Please Enter your First Name")
document.form1.FirstName.focus();
return false;
}

if ((second==null)||(second=="")){
alert("Please Enter your Last Name")
document.form1.LastName.focus()
return false;
}

if ((phone==null)||(phone=="")){
alert("Please Enter your Phone Number")
document.form1.Phone.focus()
return false;
}

if ((email==null)||(email=="")){
alert("Please Enter your Email Address")
document.form1.Email.focus()
return false;
}

		if (email.indexOf(at)==-1){
		   alert("Invalid E-mail Address")
		   document.form1.Email.select()
		   return false
		}

		if (email.indexOf(at)==-1 || email.indexOf(at)==0 || email.indexOf(at)==lstr){
		   alert("Invalid E-mail Address")
		   document.form1.Email.select()
		   return false
		}

		if (email.indexOf(dot)==-1 || email.indexOf(dot)==0 || email.indexOf(dot)==lstr){
		    alert("Invalid E-mail Address")
		    document.form1.Email.select()
			return false
		}

		 if (email.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail Address")
		    document.form1.Email.select()
			return false
		 }

		 if (email.substring(lat-1,lat)==dot || email.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail Address")
		    document.form1.Email.select()
			return false
		 }

		 if (email.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail Address")
		    document.form1.Email.select()
			return false
		 }
		
		 if (email.indexOf(" ")!=-1){
		    alert("Invalid E-mail Address")
		    document.form1.Email.select()
			return false
		 }

if ((comment==null)||(comment=="")){
alert("Please Type your Message in the box provided")
document.form1.Comments.focus()
return false;
}

return true
}