function verify_email(str) {



		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert("Invalid Email Address")

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert("Invalid Email Address")

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    alert("Invalid Email Address")

		    return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		    alert("Invalid Email Address")

		    return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    alert("Invalid Email Address")

		    return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		    alert("Invalid Email Address")

		    return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		    alert("Invalid Email Address")

		    return false

		 }



 		 return true					

	}

	

function IsNumeric(expression) {



var nums = "0123456789";



if (expression.length==0)return(false);



for (var n=0; n < expression.length; n++){



if(nums.indexOf(expression.charAt(n))==-1)return(false);





}



return(true);



}

function ValidateForm()

{

	var	Contact_Person=document.RQ.Contact_Person

	var	Address=document.RQ.Address

	var	CityTown=document.RQ.CityTown

	var	State=document.RQ.State

	var	ZipCode=document.RQ.ZipCode

	

	var	Phone=document.RQ.Phone

	var emailID=document.RQ.Email

	

	var	ddlCountry=document.RQ.ddlCountry

	var	Comments=document.RQ.Comments

	

	if (Contact_Person.value=="")

	{

		alert("Please Enter Contact Person")

		Contact_Person.focus()

		return false

	}

	

	/*if (Address.value=="")

	{

		alert("Please Enter Address ")

		Address.focus()

		return false

	}

	

	if (CityTown.value=="")

	{

		alert("Please Enter City/Town")

		CityTown.focus()

		return false

	}

	

	if (State.value=="")

	{

		alert("Please Enter State ")

		State.focus()

		return false

	}

	

	if (ZipCode.value=="")

	{

		alert("Please Enter Zip Code ")

		ZipCode.focus()

		return false

	}

	*/

	if (ZipCode.value=="") {

	}

	else

	{

	if (IsNumeric(ZipCode.value)==false)

	{

		alert("Please Correct Zip Code")

		ZipCode.focus()

		return false

	}

	}

	/*

	if (ddlCountry.value=="")

	{

		alert("Please Select Country")

		ddlCountry.focus()

		return false

	}

	*/

	if (Phone.value=="")

	{

		alert("Please Enter Phone Number")

		Phone.focus()

		return false

	}

	/*

	if ((emailID.value==null)||(emailID.value=="")){

		alert("Please Enter your Email Address")

		emailID.focus()

		return false

	}

	*/

	if ((emailID.value==null)||(emailID.value=="")){

	}

	else

	{

	if (verify_email(emailID.value)==false){

		//alert("Please Correct your Email Address")

		emailID.focus()

		return false

	}

	}

	

	if (Comments.value=="")

	{

		alert("Please Enter Your Comments")

		Comments.focus()

		return false

	}

	return true

 }