function validateform()
{

	var typeofproject = document.quote.typeofproject;
	var requirement=document.quote.requirement.value;
	var name=document.quote.name.value;
	var email=document.quote.email.value;
	var emailLength = email.length;
	var atPos = email.indexOf('@');
	var firstDotPos = email.indexOf('.');
	var lastDotPos = email.lastIndexOf('.');	
	var phone=document.quote.phone.value;
	var country=document.quote.country.value;


	if(typeofproject.value == "select")
	{
		alert("Please Select Type of project");
		document.quote.typeofproject.focus();
		return false;
	}
	if(requirement=="" || requirement==null)
	{
		alert("Please enter Project Requirement");
		document.quote.requirement.focus();
		return false;
	}
	   
	if(requirement.length < 50)
	{
		alert("Description should be minimum 50 Char.");
		document.quote.requirement.focus();
		return false;
	}
	if(name=="" || name=="null")
	{
		alert("Please enter your contact name.");
		document.quote.name.focus();
		return false;
	}
	if(email=="" || email==null)
		{
		alert ("Valid Email should not be blank");
		document.quote.email.focus();
		return false;
		}
	if (emailLength < 7)
		{
		alert("Not valid Email!!");
		document.quote.email.focus();
		return false;                // minimum email address length ("x@xx.xx")
		}
	if (atPos < 1)
		{
		alert("Not valid Email!!");
		document.quote.email.focus();
		return false;                    // traps for no @, or @ as first character
		}
	if (firstDotPos < 1)
		{
		alert("Not valid Email!!");
		document.quote.email.focus();
		return false;                // traps for no ., or . as first character
		}
	if (atPos == emailLength-1)
		{
		alert("Not valid Email!!");
		document.quote.email.focus();
		return false;        // traps for @ as penultimate or last character
		}
	if (lastDotPos >= emailLength-2)
		{
		alert("Not valid Email!!");
		document.quote.email.focus();
		return false;    // traps for too few digits after last . (must be at least 2)
		}
		// traps for @ character next to . character
    if (email.charAt(atPos-1) == '.' || email.charAt(atPos+1) == '.')
		{
		alert("Not valid Email!!");
		document.quote.email.focus();
		return false;
		}
	if (phone == "" || phone == "null")
		{
		alert("Please enter your phone number");
		document.quote.phone.focus();
		return false;
		}
	if (country == "" || country == "null")
		{
		alert("Please enter your Country Name");
		document.quote.country.focus();
		return false;
		}
return true;
}