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.txtCountry.value=="")
	{
		alert("Please enter Country name.");
		hh.txtCountry.focus();
		return false;
	}
	
	if(hh.txtPhone.value=="")
	{
		alert("Please enter your Phone No.");
		hh.txtPhone.focus();
		return false;
	} */
	
	if(hh.txtEmail.value == "")
	{
			alert("Please Enter email address.");
			hh.txtEmail.focus();
			return false
	}
	
	if (validateEmail(hh.txtEmail.value)==false)
	{
			alert("Invalid email address.");
			hh.txtEmail.focus();
			return false
	}

	
	if(hh.txtRequirement.value=="")
	{
		alert("Please enter your Reqierement");
		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;
    }
    */
    return true;
}
function validateEmail(elementValue){   
   var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; 
    
   return emailPattern.test(elementValue);   
}