// JavaScript Document
function ValidateFreeQuote()
{
    var name = document.FreeQuote.name;
	var company = document.FreeQuote.Company;
    var phone = document.FreeQuote.Phone;
	var email = document.FreeQuote.email;
	var projecttype = document.FreeQuote.projecttype;
	var domain = document.FreeQuote.domain;
	var hosting = document.FreeQuote.hosting;
	var projectbudget = document.FreeQuote.projectbudget;
    var description = document.FreeQuote.description;
	var timeframe = document.FreeQuote.timeframe;
	var question = document.FreeQuote.question;
	var captcha_code = document.FreeQuote.captcha_code;

    if (name.value == "")
    {
        window.alert("Please enter your name.");
        name.focus();
        return false;
    }
     
	     if (company.value == "")
    {
        window.alert("Please enter your company name.");
        company.focus();
        return false;
    }
	
	   if ((phone.checked == false) && (phone.value == ""))
    {
        window.alert("Please enter your phone number.");
        phone.focus();
        return false;
    }

    if(phone.value.search("[^0-9 ,/+-]")!=-1)
	{
        alert("Please enter only digits in phone no");
		phone.focus();
		return false;
	}

   if(phone.value.length < 10)
	{
        alert("Please enter a valid phone no");
		phone.focus();
		return false;
	}
	 if (email.value == "")
    {
        window.alert("Please enter your email address.");
        email.focus();
        return false;
    }
	
    if (email.value.indexOf("@", 0) < 0)
    {
        window.alert("Please enter a valid e-mail address.");
        email.focus();
        return false;
    }
	
    if (email.value.indexOf(".", 0) < 0)
    {
        window.alert("Please enter a valid e-mail address.");
        email.focus();
        return false;
    }

   if (projecttype.selectedIndex == 0)
  {
    window.alert("Please select service of your interest.");
    projecttype.focus();
    return false;
  }
  
     if (projecttype.selectedIndex == 1)
  {
    window.alert("This is not a valid selection.");
    projecttype.focus();
    return false;
  }
  
     if (domain.selectedIndex == 0)
  {
    window.alert("Please select domain status.");
    domain.focus();
    return false;
  }
  
       if (domain.selectedIndex == 1)
  {
    window.alert("This is not a valid selection.");
    domain.focus();
    return false;
  }
  
     if (hosting.selectedIndex == 0)
  {
    window.alert("Please select hosting status.");
    hosting.focus();
    return false;
  }
  
      if (hosting.selectedIndex == 1)
  {
    window.alert("This is not a valid selection.");
    hosting.focus();
    return false;
  }
  
  if (projectbudget.selectedIndex == 0)
  {
    window.alert("Please tell us about your budget.");
    projectbudget.focus();
    return false;
  }

    if (description.value == "")
    {
        window.alert("Please describe your project requirement.");
        description.focus();
        return false;
    }
	
	  if (timeframe.selectedIndex == 0)
  {
    window.alert("Please select a project time frame");
    timeframe.focus();
    return false;
  }
  
    if (question.selectedIndex == 0)
  {
    window.alert("How did you hear about us.");
    question.focus();
    return false;
  }

    if (captcha_code.value == "")
    {
        window.alert("Please enter image verification code.");
        captcha_code.focus();
        return false;
    }
	
  
    return true;
}
