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 apply_Validation() 
{ 
		var hh = document.Quoteform;
		if(hh.name.value=="")
		{
			alert("Please Enter Your Name.");
			hh.name.focus();
			return false;
		}		
						
		if(hh.email.value=="")
		{
			alert("Please Enter Your Email address.");
			hh.email.focus();
		return false;
		}
		
		if (echeck(hh.email.value)==false)
		{
			alert("Invalid email Address.");
			hh.email.focus();
		return false;
		}

		
		if(hh.web_add.value=="")
		{
			alert("Please Enter Your Website Address.");
			hh.web_add.focus();
			return false;
		}
		
		if(hh.msg.value=="")
		{
			alert("Please Enter Your Message");
			hh.msg.focus();
			return false;
		}
		
		if(hh.result.value!='10')
		{
			alert("Please Enter Correct Answer");
			hh.result.focus();
			return false;
		}
		
	return true;
}



function apply_Validation1() 
{ 
		var hh = document.requestform;
		if(hh.name.value=="")
		{
			alert("Please Enter Your Name.");
			hh.name.focus();
			return false;
		}		
						
		if(hh.email.value=="")
		{
			alert("Please Enter Your Email address.");
			hh.email.focus();
		return false;
		}
		
		if (echeck(hh.email.value)==false)
		{
			alert("Invalid email Address.");
			hh.email.focus();
		return false;
		}

		
		if(hh.tel.value=="")
		{
			alert("Please Enter Your Website Address.");
			hh.tel.focus();
			return false;
		}
		
		if(hh.web_add.value=="")
		{
			alert("Please Enter Your Message");
			hh.web_add.focus();
			return false;
		}
		
		if(hh.company_name.value=="")
		{
			alert("Please Enter Your Message");
			hh.company_name.focus();
			return false;
		}
		
		if(hh.result.value !='10')
		{
			alert("Please Enter Correct Answer");
			hh.result.focus();
			return false;
		}
		
	return true;
}


