<!--
// CALCULATE ORDER INFORMATION TOTALS:''''''''''''''''''''''''''''''''''''''''''''
   function startCalc(){
      interval = setInterval("runCalc()",1);
   }
    function runCalc(){
      SizePrice     = document.CalcForm.SizePrice.value;
      PicPrice  = document.CalcForm.PicPrice.value;
      RunTimePrice     = document.CalcForm.RunTimePrice.value;
      AdTotal       = (SizePrice * 1)+(PicPrice * 1)+(RunTimePrice * 1)
      AdTotal       = AdTotal.toFixed(2)
      document.CalcForm.OrderTotal.value = AdTotal;
   }
   function stopCalc(){
     interval = setInterval("runCalc()",1);
     clearInterval(interval);
   }

// //AD FORM WORD AND CHARACTER COUNTER'''''''''''''''''''''''''''''''''''''''''''''
//  var submitcount=0;
//  function checkSubmit() {
//     if (submitcount == 0)
//     {
//     submitcount++;
//     document.Surv.submit();
//     }
//  }
//
//  function wordCounter(field, countfield, maxlimit) {
//  wordcounter=0;
//  for (x=0;x<field.value.length;x++) {
//        // Counts the spaces while ignoring double spaces, usually one in between each word.
//        if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ")  {wordcounter++} 
//        if (wordcounter > 250) {field.value = field.value.substring(0, x);}
//        else {countfield.value = maxlimit - wordcounter;}
//        }
//     }
//
//  function textCounter(field, countfield, maxlimit) {
//    if (field.value.length > maxlimit)
//        {field.value = field.value.substring(0, maxlimit);}
//        else
//        {countfield.value = maxlimit - field.value.length;}
//    }

//AD MAIN FORM''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function AdInfoForm_Validator(theForm)
{

  //BodySize:
    if (theForm.SizePrice.value == "0")
    {
      alert("Please enter an ad size.");
      theForm.SizePrice.focus();
      return (false);
    }

  //PicPrice:
    if (theForm.PicPrice.value == "")
    {
      alert("Please select Yes or No to a picture for your ad.");
      theForm.PicPrice.focus();
      return (false);
    }

  //RunTimePrice:
    if (theForm.RunTimePrice.value == "0")
    {
      alert("Please enter ad run time.");
      theForm.RunTimePrice.focus();
      return (false);
    }

  //Contact Name:
    if (theForm.CustomerName.value == "")
    {
      alert("Please enter a contact name.");
      theForm.CustomerName.focus();
      return (false);
    }

  //Contact Phone:
    if (theForm.CustomerPhone.value == "")
    {
      alert("Please enter a contact phone.");
      theForm.CustomerPhone.focus();
      return (false);
    }

    //EMAILADDRESS:
      var str=theForm.CustomerEmail.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.CustomerEmail.focus();
        return (false);
        }

  //Password:
    if (theForm.CustomerPW.value == "")
    {
      alert("Please enter a password.");
      theForm.CustomerPW.focus();
      return (false);
    }
  //Repeat Password:
    if (theForm.CustomerPW2.value != theForm.CustomerPW.value)
    {
      alert("Passwords do not match.");
      theForm.CustomerPW2.focus();
      return (false);
    }

    return (true);
}
//-->