// JavaScript Document
<!--- =========== This script validates the form fields have been entered ========= --->
function validateForm() {
  var okSoFar=true;  //-- Changes to false when bad field found. 
  if (document.Quote.pType.value=='' && okSoFar) {
    okSoFar=false;
    alert ('Please select a Project Type');
    }
  if (document.Quote.pTimeframe.value=='none' && okSoFar) {
    okSoFar=false
    alert ('Please select a timeframe for your project');
    document.Quote.pTimeframe.focus(); 
    }
  if (document.Quote.FirstName.value=='' && okSoFar) {
    okSoFar=false;
    alert ('Please enter your First Name');
    document.Quote.FirstName.focus();
    }
  if (document.Quote.LastName.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please enter your Last Name')
    document.Quote.LastName.focus() 
    }
  if (document.Quote.Email.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please enter your Email Address')
    document.Quote.Email.focus() 
    }
  if (document.Quote.Phone.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please enter your Phone Number')
    document.Quote .Phone.focus() 
    }
  if (document.Quote.ReachWhen.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please select WHEN you would prefer to be contacted by Strategraphic') 
    }
  if (document.Quote.ReachHow.value=='none' && okSoFar) {
    okSoFar=false
    alert ('Please select HOW you would prefer to be contacted by Strategraphic') 
    }
  if (okSoFar==true) {
    document.Quote.submit()
    return true;}
  else {
    return false;}
}

<!--- =========== This function checks the No Preference checkbox ========= --->	
function NoPreferenceChecked(bNoPref)
{
	var FileLoop2;
	var vLength;
	
	//Set vLength to last position, aka NoPreference checkbox
	vLength = document.Quote.ReachWhen.length - 1;
	if (bNoPref == true)
	{
		// Uncheck all other Reach When checkboxes
		for (FileLoop2 = 0; FileLoop2 < vLength; FileLoop2++)
		{
			document.Quote.ReachWhen[FileLoop2].checked = false;
			//document.requestinfo.Control[FileLoop2].disabled = true;
		}
	}
	else
	{
		// Uncheck No Pref checkbox
		document.Quote.ReachWhen[vLength].checked = false;	
	}
}


<!--- =========== This script validates the form fields have been entered ========= --->
function validateReportForm() {
  var okSoFar=true;  //-- Changes to false when bad field found. 
  if (document.Quote.FirstName.value=='' && okSoFar) {
    okSoFar=false;
    alert ('Please enter your First Name');
    document.Quote.FirstName.focus();
    }
  if (document.Quote.LastName.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please enter your Last Name')
    document.Quote.LastName.focus() 
    }
  if (document.Quote.Email.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please enter your Email Address')
    document.Quote.Email.focus() 
    }
  if (document.Quote.Phone.value=='' && okSoFar) {
    okSoFar=false
    alert ('Please enter your Phone Number')
    document.Quote .Phone.focus() 
    }
  if (okSoFar==true) {
    document.Quote.submit()
    return true;}
  else {
    return false;}
}
