function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
		return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	    return false
	}
    if (str.indexOf(at,(lat+1))!=-1){
	    return false
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	    return false
    }
	if (str.indexOf(dot,(lat+2))==-1){
	    return false
	}
	if (str.indexOf(" ")!=-1){
	    return false
	}
    return true					
}


function Validate() 
{
    
	var hh = document.form1;
	//var captcha = document.getElementById('captcha').value
	if(hh.txtName.value=="")
	{
		alert("Please enter your name");
		hh.txtName.focus();
		return false;
	}
	
	/*if(hh.txtDesignation.value=="")
	{
		alert("Please enter Designation Name.");
		hh.txtDesignation.focus();
		return false;
	}
	
	if(hh.txtCompanyName.value=="")
	{
		alert("Please enter Company Name.");
		hh.txtCompanyName.focus();
		return false;
	}
	if(hh.txtCompanyURL.value=="")
	{
		alert("Please enter Company Url.");
		hh.txtCompanyURL.focus();
		return false;
	}
	if(hh.txtAddress.value=="")
	{
		alert("Please enter address.");
		hh.txtAddress.focus();
		return false;
	}
	if(hh.txtCountry.value=="")
	{
		alert("Please enter Country name.");
		hh.txtCountry.focus();
		return false;
	}
	
	if(hh.phone.value=="")
	{
		alert("Please enter your Phone No.");
		hh.phone.focus();
		return false;
	} */
	
	if(hh.email.value =="")
	{
		alert("Please enter email address.");
		hh.email.focus();
		return false
	}
	
	if(validateEmail(hh.email.value)==false)
	{
			alert("Invalid email address.");
			hh.email.focus();
			return false
	}

   /*
	if (echeck(hh.txtYahoo.value)==false)
	{
		alert("Please enter your Yahoo id");
		hh.txtYahoo.focus();
		return false;
	}
	
	if (echeck(hh.txtMSN.value)==false)
	{
		alert("Please enter your MSN id");
		hh.txtMSN.focus();
		return false;
	}
	
	if (echeck(hh.txtAOL.value)==false)
	{
		alert("Please enter your MSN id");
		hh.txtAOL.focus();
		return false;
	}
	
	if (echeck(hh.txtSkype.value)==false)
	{
		alert("Please enter your MSN id");
		hh.txtSkype.focus();
		return false;
	}
	*/
	if(hh.txtRequirement.value=="")
	{
		alert("Please enter your requirement");
		hh.txtRequirement.focus();
		return false;
	}
    if(hh.security_code.value=="")
    {
        alert("Please enter security code");
        hh.security_code.focus();
        return false;
    }/*
    if(hh.security_code.value!="")
    {
        getParam(hh);
 
       return false;
    }
	if(hh.txtSkype.value=="")
	{
		alert("Please enter your skype name");
		hh.txtSkype.focus();
		return false;
	}
	
	if(hh.txtPlan.value=="")
	{
		alert("Please enter your plan");
		hh.txtPlan.focus();
		return false;
	}
	if(hh.txtHearNDDW.value=="")
	{
		alert("Please enter How you hear");
		hh.txtHearNDDW.focus();
		return false;
	}	 
	
	if(captchaValue != captcha)
	{
		alert("Please enter the correct code.");
		hh.captcha.focus();
		return false;
	} */ 
	
return true;
}
function validateEmail(elementValue){   
   var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; 
    
   return emailPattern.test(elementValue);   
}