
<!--
function form_validator( theForm ) {

  var checkOK   = "0123456789-.";
  var checkStr  = theForm.Item_1_Qty.value;
  var checkStr2 = theForm.Item_2_Qty.value;
  var checkStr3 = theForm.Item_3_Qty.value;
  var allValid  = true;
  var decPoints = 0;
  var allNum    = "";

  // Validate the quantity entered for the ArcAngel Pro

  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;
    }

    if ( ch == "." ) {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }

  if ( !allValid ) {
    alert( "Please only enter digit characters for the quantity of ArcAngel Pro." );
    theForm.Item_1_Qty.focus();
    return (false);
  }

  if ( decPoints > 1 ) {
    alert( "Please enter a valid number in the ArcAngel Pro quantity field." );
    theForm.Item_1_Qty.focus();
    return ( false );
  }

  // Validate the quantity entered for the ArcAngel Sport

  allValid  = true;

  for ( i = 0;  i < checkStr2.length;  i++ ) {
    ch = checkStr2.charAt( i );

    for ( j = 0;  j < checkOK.length;  j++ )
      if ( ch == checkOK.charAt( j ) )
        break;

    if ( j == checkOK.length ) {
      allValid = false;
      break;
    }

    if ( ch == "." ) {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;

  }

  if ( !allValid ) {
    alert( "Please only enter digit characters for the quantity of ArcAngel Sport.");
    theForm.Item_2_Qty.focus();
    return ( false );
  }

  if ( decPoints > 1 ) {
    alert( "Please enter a valid number in the ArcAngel Sport quantity field." );
    theForm.Item_2_Qty.focus();
    return ( false );
  }

  // Validate the quanitity entered for the Instructional Video

  allValid  = true;

  for ( i = 0;  i < checkStr3.length;  i++ ) {
    ch = checkStr3.charAt( i );

    for ( j = 0;  j < checkOK.length;  j++ )
      if ( ch == checkOK.charAt( j ) )
        break;

    if ( j == checkOK.length ) {
      allValid = false;
      break;
    }

    if ( ch == "." ) {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;

  }

  if ( !allValid ) {
    alert( "Please only enter digit characters for the quantity of Instructional Videos.");
    theForm.Item_2_Qty.focus();
    return ( false );
  }

  if ( decPoints > 1 ) {
    alert( "Please enter a valid number in the Instructional Video quantity field." );
    theForm.Item_2_Qty.focus();
    return ( false );
  }

  // Validate the rest of the form

  if ( theForm.Shipping_Name.value == "" ) {
    alert( "Please enter the name of the individual who will recieve the shipment.");
    theForm.Shipping_Name.focus();
    return ( false );
  }

  if ( theForm.Shipping_Address1.value == "" ) {
    alert( "Please enter the shipping address." );
    theForm.Shipping_Address1.focus();
    return ( false );
  }

  if ( theForm.Shipping_City.value == "" ) {
    alert( "Please enter the city where the shipment is to be sent." );
    theForm.Shipping_City.focus();
    return ( false );
  }

  if ( theForm.Shipping_State.value == "" ) {
    alert( "Please enter the state where the shipment is to be sent." );
    theForm.Shipping_State.focus();
    return ( false );
  }

  if ( theForm.Shipping_State.value.length < 2 ) {
    alert( "Please enter at least 2 characters for the state." );
    theForm.Shipping_State.focus();
    return ( false );
  }

  if ( theForm.Shipping_State.value.length > 2 ) {
    alert( "Please enter at most 2 characters for the state." );
    theForm.Shipping_State.focus();
    return ( false );
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.Shipping_State.value;
  var allValid = true;

  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;
    }
  }

  if ( !allValid ) {
    alert( "Please enter only letter characters for the state." );
    theForm.Shipping_State.focus();
    return (false);
  }

  if ( theForm.Shipping_Zip.value == "" ) {
    alert( "Please enter a shipping zip code." );
    theForm.Shipping_Zip.focus();
    return ( false );
  }

  if ( theForm.Shipping_Zip.value.length < 5 ) {
    alert( "Please enter at least 5 characters for the zip code." );
    theForm.Shipping_Zip.focus();
    return ( false );
  }

  if ( theForm.Daytime_Number.value == "" ) {
    alert( "Please enter your daytime phone number." );
    theForm.Daytime_Number.focus();
    return ( false );
  }

  if ( theForm.Daytime_Number.value.length < 8 ) {
    alert( "Please enter at least 8 characters for your daytime phone number." );
    theForm.Daytime_Number.focus();
    return ( false );
  }

  if ( theForm.Daytime_Number.value.length > 14 ) {
    alert( "The daytime phone number you entered is too long." );
    theForm.Daytime_Number.focus();
    return ( false );
  }

  if ( theForm.Evening_Number.value == "" ) {
    alert( "Please enter your evening phone number." );
    theForm.Evening_Number.focus();
    return ( false );
  }

  if ( theForm.Evening_Number.value.length < 8 ) {
    alert("Please enter at least 8 characters for your evening phone number.");
    theForm.Evening_Number.focus();
    return ( false );
  }

  if ( theForm.Evening_Number.value.length > 14 ) {
    alert( "The evening phone number you entered is too long." );
    theForm.Evening_Number.focus();
    return ( false );
  }

  if ( theForm.Card_Name.value == "" ) {
    alert( "Please enter the name which appears on your credit card." );
    theForm.Card_Name.focus();
    return ( false );
  }

  if ( theForm.Card_Number.value == "" ) {
    alert( "Please enter your credit card number." );
    theForm.Card_Number.focus();
    return ( false );
  }

  // Validate the credit card number

  if ( theForm.Card_Ex_Month.selectedIndex < 0 || theForm.Card_Ex_Year.selectedIndex < 0 ) {
    alert( "Please enter a complete expiration date for your credit card." );
    return ( false );
  }

  if ( theForm.Card_Type.selectedIndex < 0 ) {
    alert( "Please tell us what type of card you are giving us." );
    theForm.Card_Type.focus();
    return ( false );
  }

  return ( true );
}


function hall_o_fame_validator( theForm ) {

  var checkOK   = "0123456789-.";
  var allValid  = true;
  var decPoints = 0;
  var allNum    = "";

  // Validate the rest of the form

  if ( theForm.fullname.value == "" ) {
    alert( "Please enter your full name.");
    theForm.fullname.focus();
    return ( false );
  }

  if ( theForm.address_line1.value == "" ) {
    alert( "Please enter your address." );
    theForm.address_line1.focus();
    return ( false );
  }

  if ( theForm.city2.value == "" ) {
    alert( "Please enter your city." );
    theForm.city2.focus();
    return ( false );
  }

  if ( theForm.state.value == "" ) {
    alert( "Please enter you state." );
    theForm.state.focus();
    return ( false );
  }

  if ( theForm.state.value.length < 2 ) {
    alert( "Please enter at least 2 characters for the state." );
    theForm.state.focus();
    return ( false );
  }

  if ( theForm.state.value.length > 2 ) {
    alert( "Please enter at most 2 characters for the state." );
    theForm.state.focus();
    return ( false );
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.state.value;
  var allValid = true;

  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;
    }
  }

  if ( !allValid ) {
    alert( "Please enter only letter characters for the state." );
    theForm.state.focus();
    return (false);
  }

  if ( theForm.zip.value == "" ) {
    alert( "Please enter your zip code." );
    theForm.zip.focus();
    return ( false );
  }

  if ( theForm.zip.value.length < 5 ) {
    alert( "Please enter at least 5 characters for the zip code." );
    theForm.zip.focus();
    return ( false );
  }

  if ( theForm.email.value == "" ) {
    alert( "Please enter your email address." );
    theForm.email.focus();
    return ( false );
  }
  
  checkOK = checkOK + "-_";
  //"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  checkStr = theForm.email.value;
  allValid = true;
  var atpos = -1;
  var dotpos1 = -1;
  var dotpos2 = -1;
  
  for ( i = 0; i < checkStr.length; i++ ) {
    ch = checkStr.charAt(i);
    
    if ( ch == '@' ) {
      if ( atpos == -1 && i > 0 && i-1 != dotpos1 ) {
        atpos = i;      
      } else {
        allValid = false;
        break;
 
      }
    }else if ( ch  == '.' ) {
      if ( atpos == -1 ) {
        if ( dotpos1 == i - 1 ) {
          allValid = false;
          break;

        } else {
          dotpos1 = i;
        }
        
      } else {
        if ( dotpos2 == i - 1 || atpos == i - 1 ) {
          allValid = false;
          break;
        
        } else {
          dotpos2 = i;
        }
        
      }
      
    } else {
      for ( j = 0; j < checkOK.length; j++ ) {
        if ( ch == checkOK.charAt(j) ) {
          break;
        }
      }
      
      if ( j == checkOK.length) {
        allValid = false;
        break;  
      }
    
    }
    
  }  // end for
  
  if ( dotpos2 == i - 1 || dotpos2 == -1 ) {
    allValid = false;
  }
  
  if ( !allValid ) {
    alert( "Please enter a valid email address." );
    theForm.email.focus();
    return (false);
  }
  

  if ( theForm.day_phone.value == "" ) {
    alert( "Please enter your daytime phone number." );
    theForm.day_phone.focus();
    return ( false );
  }

  if ( theForm.day_phone.value.length < 10 ) {
    alert( "Please enter at least 10 characters for your daytime phone number." );
    theForm.day_phone.focus();
    return ( false );
  }

  if ( theForm.day_phone.value.length > 14 ) {
    alert( "The daytime phone number you entered is too long." );
    theForm.day_phone.focus();
    return ( false );
  }

  if ( theForm.evening_phone.value.length < 10 && theForm.evening_phone.value.length != 0) {
    alert("Please enter at least 10 characters for your evening phone number.");
    theForm.evening_phone.focus();
    return ( false );
  }

  if ( theForm.evening_phone.value.length > 14 ) {
    alert( "The evening phone number you entered is too long." );
    theForm.evening_phone.focus();
    return ( false );
  }

  return ( true );
}


//-->
