function removeAlOptions()
		{

			var i;
			for(i=document.forms['contact'].V_product.options.length-1;i>=0;i--)
			{
				document.forms['contact'].V_product.remove(i);
			}
		}


function addOptions(value, text )
{

    var length = document.forms['contact'].V_product.length;
   document.forms['contact'].V_product.options[length] = new Option (text,value);
}


function populateProductsforYear()
{
	removeAlOptions();
	addOptions("", " -Select-");
	if(document.contact.V_year.value == '2006')
	{	

		addOptions("TaxCut Standard", "TaxCut Standard");
		addOptions("TaxCut Basic", "TaxCut Basic");
		addOptions("TaxCut Premium", "TaxCut Premium");
		addOptions("TaxCut Premium + State", "TaxCut Premium + State");
		addOptions("TaxCut Premium + State + e-file", "TaxCut Premium + State + e-file");
		addOptions("TaxCut For MacinTosh", "TaxCut For Macintosh");
		addOptions("TaxCut State", "TaxCut State");
		addOptions("TaxCut Business", "TaxCut Business");
		addOptions("TaxCut Business State", "TaxCut Business State");
		addOptions("TaxCut Online", "TaxCut Online");
		addOptions("DeductionPro", "DeductionPro");
		addOptions("WILLPower", "WILLPower");
		addOptions("Home and Business Attorney", "Home and Business Attorney");			


	}

	if(document.contact.V_year.value == '2005')
	{	

		addOptions("TaxCut Standard", "TaxCut Standard");
		addOptions("TaxCut Deluxe", "TaxCut Deluxe");
		addOptions("TaxCut Premium", "TaxCut Premium");
		addOptions("TaxCut EZ", "TaxCut EZ");
		addOptions("TaxCut for Business", "TaxCut for Business");
		addOptions("TaxCut State", "TaxCut State");
		addOptions("TaxCut Premium State", "TaxCut Premium State");
		addOptions("TaxCut Business State", "TaxCut Business State");
		addOptions("DeductionPro", "DeductionPro");
		addOptions("LegalPro", "LegalPro");
		addOptions("WILLPower", "WILLPower");
		addOptions("Home and Business Attorney", "Home and Business Attorney");			


	}			

	if(document.contact.V_year.value == '2004')
	{	

		addOptions("TaxCut Standard", "TaxCut Standard");
		addOptions("TaxCut Deluxe", "TaxCut Deluxe");
		addOptions("TaxCut Premium", "TaxCut Premium");
		addOptions("TaxCut Premium Plus For Home", "TaxCut Premium Plus for Home");
		addOptions("TaxCut EZ", "TaxCut EZ");
		addOptions("TaxCut for Business", "TaxCut for Business");
		addOptions("TaxCut State", "TaxCut State");
		addOptions("TaxCut Premium State", "TaxCut Premium State");
		addOptions("TaxCut Business State", "TaxCut Business State");
		addOptions("H&R Block Signature Software", "H&R Block Signature Software");
		addOptions("DeductionPro", "DeductionPro");
		addOptions("WILLPower", "WILLPower");
		addOptions("Home and Business Attorney", "Home and Business Attorney");			


	}			

}

		
function doValid()
	{
		if(valid())
    	{
			document.contact.submit();
		}
	}

function doReset()
	{
		document.contact.reset();

	}

	
function valid()
	{
		if (document.contact.V_product.value == "") 
			{
		      alert("Please select a Product.");
     	      document.contact.V_product.focus();
	    	  return false;
 		   }
		if (document.contact.V_year.value == "") 
			{
			   alert("Please select a Year.");
			   document.contact.V_year.focus();
			   return false;
 		   }
		if (document.contact.V_comments.value == "")
			{
			   alert("Please enter your comments.");
			   document.contact.V_comments.focus();
			   return false;
 		   }
		  var a=document.contact.V_comments.value
		  var InvalidChar = "@";
		  if(document.contact.V_comments_valid.value=="0")
		  {
			  for(i=0;i<a.length;i++)
			  {
			  if (a.indexOf(InvalidChar,0) != -1)
				  {
					  alert("We see that you may have entered an email address in your comments. Please note that you will not receive a response. If you still want to send us your comments, click OK and then click Submit again on the Comments form. If you need a response click OK and click on the Coustomer Support link at the top of the page.");
			
					document.contact.V_comments_valid.value="1";
					document.contact.V_comments.focus();
					//alert(contact.V_comments_valid.value)
					  return false;
				  }
			  }
		  }
		  return true
	}

