 /*
  * PAGE ONE FORM VALIDATION
  */
 function ValidatePage1Form( form ) {
  var propertyStateCodeObject = form.propertyStateCode;
  var typeOfLoanObject        = form.typeOfLoan;

  var isValidForm             = true;
  var isValidStateCode        = validateSelectbox( propertyStateCodeObject );
  var isValidTypeOfLoan       = validateSelectbox( typeOfLoanObject );

  // Validate form field
  // If field is not valid display alert, set focus and reinit flag
  if ( !isValidStateCode ) {
   alert( "Please select your Property State." );
   propertyStateCodeObject.focus();
   isValidForm = false;
  }
  else if ( !isValidTypeOfLoan ) {
   alert( "Please select your Type of Loan." );
   typeOfLoanObject.focus();
   isValidForm = false;
  }

  return isValidForm;
 }

 /*
  * Validate the dropdown box being passed in
  * If the dropdown box is not selected display alert with message
  */
 function validateSelectbox( selectObject ) {
  var isValidEntry = true;

  if ( selectObject.value.length == 0 ) {
   isValidEntry = false;
  }

  return isValidEntry;
}
