<!--
function Response_Form_Validator(theForm)
{

//FIRST NAME:
  if (theForm.first_name.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.first_name.focus();
    return (false);
  }

  if (theForm.first_name.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Last Name\" field.");
    theForm.first_name.focus();
    return (false);
  }

//LAST NAME:
  if (theForm.last_name.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.last_name.focus();
    return (false);
  }

  if (theForm.last_name.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Last Name\" field.");
    theForm.last_name.focus();
    return (false);
  }

//PHONE:
  if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.phone.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Phone\" field.");
    theForm.phone.focus();
    return (false);
  }

//STREET:
 if (theForm.street.value == "")
  {
    alert("Please enter a value for the \"Street Address\" field.");
    theForm.street.focus();
    return (false);
  }

  if (theForm.street.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Street Address\" field.");
    theForm.street.focus();
    return (false);
  }

//CITY:
  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City Address\" field.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.city.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"City Address\" field.");
    theForm.city.focus();
    return (false);
  }

//STATE:
  if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }

  if (theForm.state.value.length > 25)
  {
    alert("Please enter at most 25 characters in the \"State\" field.");
    theForm.state.focus();
    return (false);
  }

//ZIP:
  if (theForm.zipcode.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.zipcode.focus();
    return (false);
  }

  if (theForm.zipcode.value.length > 15)
  {
    alert("Please enter at most 15 characters in the \"Zip Code\" field.");
    theForm.zipcode.focus();
    return (false);
  }

//COUNTRY:
  if (theForm.country.value == "")
  {
    alert("Please enter a value for the \"Country (USA for United States)\" field.");
    theForm.country.focus();
    return (false);
  }

  if (theForm.country.value.length > 25)
  {
    alert("Please enter at most 25 characters in the \"Country (USA for United States)\" field.");
    theForm.country.focus();
    return (false);
  }

//EMAIL:
  var str=theForm.email.value
  var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  if (filter.test(str))
  testresults=true
  else{
  alert("Please input a valid email address!")
  theForm.email.focus();
  return (false);
  }


//QTY VIDEOS:
//  if (theForm.qty_videos.value == "")
//  {
//    alert("Please enter a value for the \"Real World Design Book\" field.");
//    theForm.qty_videos.focus();
//    return (false);
//  }
//
//  if (theForm.qty_videos.value.length < 1)
//  {
//    alert("Please enter at least 1 characters in the \"Real World Design Book\" field.");
//    theForm.qty_videos.focus();
//    return (false);
//  }
//
//  if (theForm.qty_videos.value.length > 2)
//  {
//    alert("Please enter at most 2 characters in the \"Real World Design Book\" field.");
//    theForm.qty_videos.focus();
//    return (false);
//  }
//
//  var checkOK = "0123456789-";
//  var checkStr = theForm.qty_videos.value;
//  var allValid = true;
//  var decPoints = 0;
//  var allNum = "";
//  for (i = 0;  i < checkStr.length;  i++)
//  {
//    ch = checkStr.charAt(i);
//    for (j = 0;  j < checkOK.length;  j++)
//      if (ch == checkOK.charAt(j))
//        break;
//    if (j == checkOK.length)
//    {
//      allValid = false;
//      break;
//    }
//    allNum += ch;
//  }
//  if (!allValid)
//  {
//    alert("Please enter only digit characters in the \"Real World Design Book\" field.");
//    theForm.qty_videos.focus();
//    return (false);
//  }
//
//  if (theForm.qty_vals_book.value == "")
//  {
//    alert("Please enter a value for the \"Val's Book\" field.");
//    theForm.qty_vals_book.focus();
//    return (false);
//  }
//
//QTY VALS BOOK:
//  if (theForm.qty_vals_book.value.length < 1)
//  {
//    alert("Please enter at least 1 characters in the \"Val's Book\" field.");
//    theForm.qty_vals_book.focus();
//    return (false);
//  }
//
//  if (theForm.qty_vals_book.value.length > 2)
//  {
//    alert("Please enter at most 2 characters in the \"Val's Book\" field.");
//    theForm.qty_vals_book.focus();
//    return (false);
//  }
//
//  var checkOK = "0123456789-";
//  var checkStr = theForm.qty_vals_book.value;
//  var allValid = true;
//  var decPoints = 0;
//  var allNum = "";
//  for (i = 0;  i < checkStr.length;  i++)
//  {
//    ch = checkStr.charAt(i);
//    for (j = 0;  j < checkOK.length;  j++)
//      if (ch == checkOK.charAt(j))
//        break;
//    if (j == checkOK.length)
//    {
//      allValid = false;
//      break;
//    }
//    allNum += ch;
//  }
//  if (!allValid)
//  {
//    alert("Please enter only digit characters in the \"Val's Book\" field.");
//    theForm.qty_vals_book.focus();
//    return (false);
//  }
//
//  var chkVal = allNum;
//  var prsVal = parseInt(allNum);
//  if (chkVal != "" && !(prsVal >= "0" && prsVal < "100"))
//  {
//    alert("Please enter a value greater than \"0\" and less than \"100\" in the \"Val's Book\" field.");
//    theForm.qty_vals_book.focus();
//    return (false);
//  }

// CREDIT CARD VALIDATION''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//
//  // Credit card digit 1 must be:
//  // American Express = 3
//  // Visa             = 4
//  // Mastercard       = 5
//  // Discover         = ?
//
//  // NOTHING ENTERED?
//  if (theForm.ccard_no.value == "")
//  {
//    alert("Please enter a CreditCard number.");
//    theForm.ccard_no.focus();
//    return (false);
//  }
//
//	//NOT = CORRECT NUMBER OF DIGITS?
//	var cardNameID = theForm.ccard_type.value.substring(0,4);
//  if (((cardNameID  == "AMER")&&(theForm.ccard_no.value.length != 15))
//     ||((cardNameID == "VISA")&&(theForm.ccard_no.value.length != 16))
//     ||((cardNameID == "MAST")&&(theForm.ccard_no.value.length != 16))
//     ||((cardNameID == "DISC")&&(theForm.ccard_no.value.length != 16)))
//  {
//    alert("Credit Card Error please re-enter (correct first digit, proper digits qty, no spaces).");
//    theForm.ccard_no.focus();
//    return (false);
//  }
//
// //NOT NUMERIC CHARACTERS ONLY?
//  var checkOK = "0123456789-";
//  var checkStr = theForm.ccard_no.value;
//  var allValid = true;
//  var decPoints = 0;
//  var allNum = "";
//  for (i = 0;  i < checkStr.length;  i++)
//  {
//    ch = checkStr.charAt(i);
//    for (j = 0;  j < checkOK.length;  j++)
//      if (ch == checkOK.charAt(j))
//        break;
//    if (j == checkOK.length)
//    {
//      allValid = false;
//      break;
//    }
//    allNum += ch;
//  }
//  if (!allValid)
//  {
//    alert("Please enter only digit characters in the creditcard field.");
//    theForm.ccard_no.focus();
//  }
//
//	//CARD DIGIT ONE IMPROPER?
//	var cardNumbID = theForm.ccard_no.value.substring(0,1);
//	var cardNameID = theForm.ccard_type.value.substring(0,4);
//  if (((cardNameID  == "AMER")&&(cardNumbID != 3))
//     ||((cardNameID == "VISA")&&(cardNumbID != 4))
//     ||((cardNameID == "MAST")&&(cardNumbID != 5)))
//  {
//    alert("Card number incorrect for card type.");
//    theForm.ccard_type.focus();
//    return (false);
//  }
//
//
////NAME ON CCARD:
//  if (theForm.ccard_name.value == "")
//  {
//    alert("Please enter a value for the \"Credit Card Name\" field.");
//    theForm.ccard_name.focus();
//    return (false);
//  }
//
//  if (theForm.ccard_name.value.length > 50)
//  {
//    alert("Please enter at most 50 characters in the \"Credit Card Name\" field.");
//    theForm.ccard_name.focus();
//    return (false);
//  }
  return (true);
}
//-->
