function check_form() {
	for (var i = 0; i < document.forms['quote_form'].elements.length; i++) {
		var FormElement = document.forms['quote_form'].elements[i].name
		 var j;
		 var radio_button_checked;
		 var radio_set;
		 
		
	 	
		if (FormElement == "company") {
				if (document.forms['quote_form'].elements[i].value.length == 0)
				{
					alert("You must provide your company name!")
					return false
				}
			}	
		if (FormElement == "fullname") {
				
				if (document.forms['quote_form'].elements[i].value.length == 0)
				{
					alert("You must provide your full name!")
					return false
				}
			}
		if (FormElement == "busPhone") {
				
				if (document.forms['quote_form'].elements[i].value.length == 0)
				{
					alert("You must provide your business phone!")
					return false
				}
			}	
			
		if (FormElement == "fax") {
				
				if (document.forms['quote_form'].elements[i].value.length == 0)
				{
					alert("You must provide your fax number!")
					return false
				}
			}		
		
			
		
		if (FormElement == "state") {
				if (document.forms['quote_form'].elements[i].selectedIndex == 0)
				{
					alert("You must select a state!");
					return false
				}
			}
		
		
		if (FormElement == "num_emps") {
				if (document.forms['quote_form'].elements[i].value.length == 0)
				{
					alert("You must provide your number of employees!")
					return false
				}
			}	
					
		if (FormElement =="email") {
				var vlength
    			  	vlength=document.forms['quote_form'].elements[i].value.length-1
				if (document.forms['quote_form'].elements[i].value.length == 0)
				{
					alert("You must enter a valid email address.  Example:  Name@aiuinc.com")
					return false
				}

  				// Check for a valid email address (Does it contain a "@" and ".")
  				if(document.forms['quote_form'].elements[i].value.indexOf('@', 0) == -1 || document.forms['quote_form'].elements[i].value.indexOf('.',0)==-1)
				{
					alert("You must enter a valid email address.  Example:  Name@aiuinc.com")
					return false
				}
 				// Check for a valid email address ("@" or "." cannot be first character)
				if(document.forms['quote_form'].elements[i].value.charAt(0)=='@' || document.forms['quote_form'].elements[i].value.charAt(0)=='.')
				{
					alert("You must enter a valid email address.  Example:  Name@aiuinc.com")
					return false
				}
				// Check for a valid email address ("@" or "." cannot be last character)
				if(document.forms['quote_form'].elements[i].value.charAt(vlength)=='@' || document.forms['quote_form'].elements[i].value.charAt(vlength)=='.')
				{
					alert("You must enter a valid email address.  Example:  Name@aiuinc.com")
					return false
				}
  				// Check for a valid email address (Cannot have "@." or ".@")
				if(document.forms['quote_form'].elements[i].value.indexOf('@.')!=-1 || document.forms['quote_form'].elements[i].value.indexOf('.@')!=-1)
				{
					alert("You must enter a valid email address.  Example:  Name@aiuinc.com")
					return false
				}
			
			}
	}

	return true	

}
