Solved

URGENT :: Can't figure out why the form submits IF the ccard doesnt check or the radiobutton isnt clicked

Posted on 2004-10-26
297 Views
Last Modified: 2013-12-03
I have figured out that the issue somehow resideds in the form its self , not the form handler.
There are 2 javascripts that would STOP or should stop the form from being submited.
1. Credit card checker
2. radio button checker

but what it does it reset the form...or send it.. I would like it stoped..as I have written the code to do...

thanks for your help ..

here is the entire page..muahah


=====================================

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
<style>
<!--
.medium{
                  font-size:7pt;
            font-weight:normal;
            font-style:normal;
            color:5F5F5F;
            font-family:verdana,helvetica,arial;  
            line-height:10pt;        
                  }

-->
</style>
</head>

<body>

<script language="javascript">
<!--
var message="";

function clickIE4(){
if (event.button==2){
//alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
//alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false")


// -->
</script>

<script>

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>

<script type="text/javascript" language="javascript">
function swapEm(ndx)
{
  var theSource = theSource2 = ""
  var theText = ""
  switch (ndx)
  {
  case 0:
       theSource = "images/blankimage.gif";
       theSource2 = "images/blankimage.gif";
       theText = ""
       break;
     case 1:
       theSource = "images/icon_visa.gif";
       theSource2 = "images/visaverification.gif";
       theText = "(On the back of your card, locate the final 3 digit number)"
       break;
     case 2:
       theSource = "images/icon_mastercard.gif";
       theSource2 = "images/mastercardverification.gif";
       theText = "(On the back of your card, locate the final 3 digit number)"
       break;
     case 3:
       theSource = "images/icon_discover.gif";
       theSource2 = "images/discoververification.gif";
       theText = "(On the back of your card, locate the final 3 digit number)"
       break;
     case 4:
       theSource = "images/icon_amex.gif";
       theSource2 = "images/amexverification.gif";
       theText = "(On the front of your card, locate the final 4 digit number)"
       break;
   }
   document.images['cardImg1'].src = theSource;
   document.images['cardImg2'].src = theSource2;
   document.getElementById('imgText').innerHTML = theText

 

}
</script>

<script type="text/javaScript">  

  function checkCheckBox(){  
    if(!document.getElementsByName('agree')[0].checked) {  
      alert("You must Agree with the Service Agreement and Polices to open a service contract\nPlease select AGREE on the form to continue")  
       return false;
    }  
      document.getElementById("DIV1").style.display = "";  
      //document.getElementById("B1").disabled = true;
      return true;
  }

</script>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var Cards = new makeArray(8);
Cards[0] = new cc_type("MasterCard", "51,52,53,54,55", "16");
var MasterCard = Cards[0];
Cards[1] = new cc_type("VisaCard", "4", "13,16");
var VisaCard = Cards[1];
Cards[2] = new cc_type("AmExCard", "34,37", "15");
var AmExCard = Cards[2];
Cards[3] = new cc_type("DinersClubCard", "30,36,38", "14");
var DinersClubCard = Cards[3];
Cards[4] = new cc_type("DiscoverCard", "6011", "16");
var DiscoverCard = Cards[4];
Cards[5] = new cc_type("enRouteCard", "2014,2149", "15");
var enRouteCard = Cards[5];
Cards[6] = new cc_type("JCBCard", "3088,3096,3112,3158,3337,3528", "16");
var JCBCard = Cards[6];
var LuhnCheckSum = Cards[7] = new cc_type();

/*************************************************************************\
Checkcc_number(form)
function called when users click the "check" button.
\*************************************************************************/
function Checkcc_number(form) {
var tmpyear;
if (form.cc_number.value.length == 0) {
alert("Please enter a Card Number.");
form.cc_number.focus();
return false;
}
if (form.expdate_year.value.length == 0) {
alert("Please enter the Expiration Year.");
form.expdate_year.focus();
return false;
}
if (form.expdate_year.value > 96)
tmpyear = "19" + form.expdate_year.value;
else if (form.expdate_year.value < 21)
tmpyear = "20" + form.expdate_year.value;
else {
alert("The Expiration Year is not valid.");
return false;
}
tmpmonth = form.expdate_month.options[form.expdate_month.selectedIndex].value;
// The following line doesn't work in IE3, you need to change it
// to something like "(new cc_type())...".
// if (!cc_type().isExpiryDate(tmpyear, tmpmonth)) {
if (!(new cc_type()).isExpiryDate(tmpyear, tmpmonth)) {
alert("This card has already expired.");
return false;
}
card = form.cc_type.options[form.cc_type.selectedIndex].value;
var retval = eval(card + ".checkcc_number(\"" + form.cc_number.value +
"\", " + tmpyear + ", " + tmpmonth + ");");
cardname = "";
if (retval);

// comment this out if used on an order form
//alert("This card number appears to be valid.");

else {
// The cc_number has the valid luhn checksum, but we want to know which
// cc_type it belongs to.
for (var n = 0; n < Cards.size; n++) {
if (Cards[n].checkcc_number(form.cc_number.value, tmpyear, tmpmonth)) {
cardname = Cards[n].getcc_type();
break;
   }
}
if (cardname.length > 0) {
alert("This looks like a " + cardname + " number, not a " + card + " number.");
return false;
}
else {
alert("This card number is not valid.");
return false;
      }
   }
}
/*************************************************************************\
Object cc_type([String cc_type, String rules, String len, int year,
                                        int month])
cc_type    : type of card, eg: MasterCard, Visa, etc.
rules       : rules of the cc_number, eg: "4", "6011", "34,37".
len         : valid length of cc_number, eg: "16,19", "13,16".
year        : year of expiry date.
month       : month of expiry date.
eg:
var VisaCard = new cc_type("Visa", "4", "16");
var AmExCard = new cc_type("AmEx", "34,37", "15");
\*************************************************************************/
function cc_type() {
var n;
var argv = cc_type.arguments;
var argc = cc_type.arguments.length;

this.objname = "object cc_type";

var tmpcc_type = (argc > 0) ? argv[0] : "CardObject";
var tmprules = (argc > 1) ? argv[1] : "0,1,2,3,4,5,6,7,8,9";
var tmplen = (argc > 2) ? argv[2] : "13,14,15,16,19";

this.setcc_number = setcc_number;  // set cc_number method.
this.setcc_type = setcc_type;  // setcc_type method.
this.setLen = setLen;  // setLen method.
this.setRules = setRules;  // setRules method.
this.setExpiryDate = setExpiryDate;  // setExpiryDate method.

this.setcc_type(tmpcc_type);
this.setLen(tmplen);
this.setRules(tmprules);
if (argc > 4)
this.setExpiryDate(argv[3], argv[4]);

this.checkcc_number = checkcc_number;  // checkcc_number method.
this.getExpiryDate = getExpiryDate;  // getExpiryDate method.
this.getcc_type = getcc_type;  // getcc_type method.
this.iscc_number = iscc_number;  // iscc_number method.
this.isExpiryDate = isExpiryDate;  // isExpiryDate method.
this.luhnCheck = luhnCheck;// luhnCheck method.
return this;
}

/*************************************************************************\
boolean checkcc_number([String cc_number, int year, int month])
return true if cc_number pass the luhncheck and the expiry date is
valid, else return false.
\*************************************************************************/
function checkcc_number() {
var argv = checkcc_number.arguments;
var argc = checkcc_number.arguments.length;
var cc_number = (argc > 0) ? argv[0] : this.cc_number;
var year = (argc > 1) ? argv[1] : this.year;
var month = (argc > 2) ? argv[2] : this.month;

this.setcc_number(cc_number);
this.setExpiryDate(year, month);

if (!this.iscc_number())
return false;
if (!this.isExpiryDate())
return false;

return true;
}
/*************************************************************************\
String getcc_type()
return the cc_type.
\*************************************************************************/
function getcc_type() {
return this.cc_type;
}
/*************************************************************************\
String getExpiryDate()
return the expiry date.
\*************************************************************************/
function getExpiryDate() {
return this.month + "/" + this.year;
}
/*************************************************************************\
boolean iscc_number([String cc_number])
return true if cc_number pass the luhncheck and the rules, else return
false.
\*************************************************************************/
function iscc_number() {
var argv = iscc_number.arguments;
var argc = iscc_number.arguments.length;
var cc_number = (argc > 0) ? argv[0] : this.cc_number;
if (!this.luhnCheck())
return false;

for (var n = 0; n < this.len.size; n++)
if (cc_number.toString().length == this.len[n]) {
for (var m = 0; m < this.rules.size; m++) {
var headdigit = cc_number.substring(0, this.rules[m].toString().length);
if (headdigit == this.rules[m])
return true;
}
return false;
}
return false;
}

/*************************************************************************\
boolean isExpiryDate([int year, int month])
return true if the date is a valid expiry date,
else return false.
\*************************************************************************/
function isExpiryDate() {
var argv = isExpiryDate.arguments;
var argc = isExpiryDate.arguments.length;

year = argc > 0 ? argv[0] : this.year;
month = argc > 1 ? argv[1] : this.month;

if (!isNum(year+""))
return false;
if (!isNum(month+""))
return false;
today = new Date();
expiry = new Date(year, month);
if (today.getTime() > expiry.getTime())
return false;
else
return true;
}

/*************************************************************************\
boolean isNum(String argvalue)
return true if argvalue contains only numeric characters,
else return false.
\*************************************************************************/
function isNum(argvalue) {
argvalue = argvalue.toString();

if (argvalue.length == 0)
return false;

for (var n = 0; n < argvalue.length; n++)
if (argvalue.substring(n, n+1) < "0" || argvalue.substring(n, n+1) > "9")
return false;

return true;
}

/*************************************************************************\
boolean luhnCheck([String cc_number])
return true if cc_number pass the luhn check else return false.
Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
\*************************************************************************/
function luhnCheck() {
var argv = luhnCheck.arguments;
var argc = luhnCheck.arguments.length;

var cc_number = argc > 0 ? argv[0] : this.cc_number;

if (! isNum(cc_number)) {
return false;
  }

var no_digit = cc_number.length;
var oddoeven = no_digit & 1;
var sum = 0;

for (var count = 0; count < no_digit; count++) {
var digit = parseInt(cc_number.charAt(count));
if (!((count & 1) ^ oddoeven)) {
digit *= 2;
if (digit > 9)
digit -= 9;
}
sum += digit;
}
if (sum % 10 == 0)
return true;
else
return false;
}

/*************************************************************************\
ArrayObject makeArray(int size)
return the array object in the size specified.
\*************************************************************************/
function makeArray(size) {
this.size = size;
return this;
}

/*************************************************************************\
cc_type setcc_number(cc_number)
return the cc_type object.
\*************************************************************************/
function setcc_number(cc_number) {
this.cc_number = cc_number;
return this;
}

/*************************************************************************\
cc_type setcc_type(cc_type)
return the cc_type object.
\*************************************************************************/
function setcc_type(cc_type) {
this.cc_type = cc_type;
return this;
}

/*************************************************************************\
cc_type setExpiryDate(year, month)
return the cc_type object.
\*************************************************************************/
function setExpiryDate(year, month) {
this.year = year;
this.month = month;
return this;
}

/*************************************************************************\
cc_type setLen(len)
return the cc_type object.
\*************************************************************************/
function setLen(len) {
// Create the len array.
if (len.length == 0 || len == null)
len = "13,14,15,16,19";

var tmplen = len;
n = 1;
while (tmplen.indexOf(",") != -1) {
tmplen = tmplen.substring(tmplen.indexOf(",") + 1, tmplen.length);
n++;
}
this.len = new makeArray(n);
n = 0;
while (len.indexOf(",") != -1) {
var tmpstr = len.substring(0, len.indexOf(","));
this.len[n] = tmpstr;
len = len.substring(len.indexOf(",") + 1, len.length);
n++;
}
this.len[n] = len;
return this;
}

/*************************************************************************\
cc_type setRules()
return the cc_type object.
\*************************************************************************/
function setRules(rules) {
// Create the rules array.
if (rules.length == 0 || rules == null)
rules = "0,1,2,3,4,5,6,7,8,9";
 
var tmprules = rules;
n = 1;
while (tmprules.indexOf(",") != -1) {
tmprules = tmprules.substring(tmprules.indexOf(",") + 1, tmprules.length);
n++;
}
this.rules = new makeArray(n);
n = 0;
while (rules.indexOf(",") != -1) {
var tmpstr = rules.substring(0, rules.indexOf(","));
this.rules[n] = tmpstr;
rules = rules.substring(rules.indexOf(",") + 1, rules.length);
n++;
}
this.rules[n] = rules;
return this;
}
//  End -->
</script>


<form name="cds" action="orderform.php" method="post" onSubmit="checkCheckBox();submitonce(this);">
 </form>
 <[SERVER FORM FIELDS]>

<div align="center">
  <center>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="788" id="AutoNumber23" height="1098">
  <tr>
    <td width="280" height="24">
    <div align="center">
      <p align="left">




<font size="1" face="Verdana">This transaction is processed on a
<font color="#FF0000">secure server</font> through PayPal.</font></div>
    </td>
  </tr>
  <tr>
    <td width="280" height="19">&nbsp;</td>

  </tr>
  <tr>
    <td width="788" height="24" colspan="3">

    <div align="center">
      <center>
      <p>&nbsp;</p>
      </center>
    </div>
    </td>
  </tr>
  <tr>
    <td width="280" height="4"></td>
    <td width="508" height="4" colspan="2"></td>
  </tr>
  <tr>
    <td width="788" height="14" colspan="3"><b><font face="Verdana" size="2">Service Details</font></b></td>

  </tr>
  <tr>
    <td width="788" height="3" colspan="3"></td>

  </tr>
  <tr>
    <td width="788" height="1" colspan="3">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber34">
      <tr>
        <td width="35%"><font face="Verdana" size="2">Select Username</font></td>
        <td width="65%">

            <font face="Verdana" size="1">
            <input type="text" name="username" size="29" ></font></td>
      </tr>
    </table>
    </td>

  </tr>
  <tr>
    <td width="788" height="1" colspan="3">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber35">
      <tr>
        <td width="35%"><font face="Verdana" size="2">Select Password</font></td>
        <td width="65%">

            <font face="Verdana" size="1">
            <input type="text" name="password" size="29" ></font></td>
      </tr>
    </table>
    </td>

  </tr>
  <tr>
    <td width="788" height="2" colspan="3">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber36">
      <tr>
        <td width="35%"><font face="Verdana" size="2">Confirm Password</font></td>
        <td width="65%">

            <font face="Verdana" size="1">
            <input type="text" name="confirmpassword" size="29" ></font></td>
      </tr>
    </table>
    </td>

  </tr>
  <tr>
    <td width="788" height="6" colspan="3">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="788" id="AutoNumber29">
      <tr>
        <td width="279"><font face="Verdana" size="2">How
    was our service?</font></td>
        <td width="509">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber30" height="1">
                <tr>

                  <td width="25%" height="1">
                  <input type="radio" value="excellent_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px" checked><font size="1" face="Verdana">
                  Excellent</font></td>
                  <td width="25%" height="1">
                  <input type="radio" value="good_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                  Good</font></td>
                  <td width="25%" height="1">
                  <input type="radio" value="average_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">

                  Average</font></td>
                  <td width="25%" height="1">
                  <input type="radio" value="poor_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                  Poor</font></td>
                </tr>
              </table>
              </td>
      </tr>
    </table>
    </td>

  </tr>
  <tr>
    <td width="280" height="1"></td>
    <td width="508" height="1" colspan="2"></td>
  </tr>
  <tr>
    <td width="280" height="22"><font face="Verdana" size="2">Current/Desired Url</font></td>
    <td width="508" height="22" colspan="2">

            <font face="Verdana" size="1">
            <input type="text" name="surl" size="29" ></font></td>
  </tr>
  <tr>
    <td width="280" height="96"></td>
    <td width="508" height="96" colspan="2">
             <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber11" height="78">
                <tr>
                  <td width="100%" colspan="2" height="16">

                  <p style="margin-top: 0; margin-bottom: 0">
                  <font face="Verdana" size="2">Logon information for web host
                  server.</font></p>
                  <p style="margin-top: 0; margin-bottom: 0">
                  <font face="Verdana" color="#FF6666" style="font-size: 7pt; font-weight: 700">
                  If you don't have or know this, just skip.</font></p>
                  <p style="margin-top: 0; margin-bottom: 0">
                  <font face="Verdana" color="#FF6666" style="font-size: 7pt; font-weight: 700">
                  If we already have this information, no need to re-enter</font></p>

                  <p style="margin-top: 0; margin-bottom: 0">
                  <font face="Verdana" size="1">(Blank will not perform any
                  unauthorized changes/services to your website)</font></td>
                </tr>
                <tr>
                  <td width="28%" height="20"><font face="Verdana" size="2"><b>Username</b> :
                  </font> </td>
                  <td width="72%" height="20">

            <font face="Verdana" size="1">
            <input type="text" name="suname" size="16" ></font></td>
                </tr>
                <tr>
                  <td width="28%" height="22"><font face="Verdana" size="2"><b>Password</b> :
                  </font> </td>
                  <td width="72%" height="22">
            <font face="Verdana" size="1">

            <input type="text" name="spwd" size="16" ></font></td>
                </tr>
              </table>
              </td>
  </tr>
  <tr>
    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"></td>
  </tr>

  <tr>
    <td width="280" height="11"><font face="Verdana" size="2">Instant Messenger
    Contact Information</font></td>
    <td width="508" height="11" colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber27">
      <tr>
        <td width="20%">
        <p align="left">
                <select name="im_choice">
                  <option value="msn">MSN</option>
                  <option value="aol">Aol</option>
                  <option value="yahoo">Yahoo</option>
                  <option>ICQ</option>

                </select></td>
        <td width="80%">
            <font face="Verdana" size="1">

            <input type="text" name="im_name" size="25" ></font></td>
      </tr>
    </table>
    </td>
  </tr>

  <tr>
    <td width="280" height="11"><font face="Verdana" size="2">Secondary Email</font></td>
    <td width="508" height="11" colspan="2">
    <input type="text" name="secondary_email" id="email0" maxlength="64" value="" size="30"></td>
  </tr>
  <tr>
    <td width="788" colspan="3" height="73"><font face="Verdana" size="2">Please enter the following information exactly as it appears on your credit card statement and click <span class="ppem106">Continue Checkout</span> below. Your financial information will be kept secure.
    </font>
    <p> <font face="Verdana" size="2"> <span class="ppsmalltext">How does CDS keep my information safe?</a></span></font></td>

  </tr>
  <tr>
    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"></td>
  </tr>
  <tr>
    <td width="280" height="35"><font face="Verdana" size="2" color="#008000">Card Type</font></td>
    <td width="508" height="35" colspan="2">

                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber26" height="35">
              <tr>
                <td width="24%" height="35">
                  <font face="Verdana">
                  <select name='cc_type' onchange='if (this.selectedIndex != 0 ) swapEm(this.selectedIndex)'>
                        <option selected>Select Card Type</option>
                        <option value="MasterCard">MasterCard
                        <option value="VisaCard">Visa
                        <option value="AmExCard">American Express
                        <option value="DiscoverCard">Discover
                  <!--<option value="DinersClubCard">Diners Club
                        <option value="enRouteCard">enRoute
                        <option value="JCBCard">JCB -->
                  </select></font></td>
                <td width="76%" height="35">
                <img name="cardImg1" src="images/blankimage.gif" width="39" height="26"></td>
              </tr>
            </table>
    </td>
  </tr>

  <tr>
    <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Credit Card Number</font></td>
    <td width="508" height="22" colspan="2"><font face="Verdana"><input size="30" maxlength="19" type="text" name="cc_number" id="cc_number" value=""></font></td>
  </tr>
  <tr>
    <td width="280" height="22"><font face="Verdana" size="2" color="#008000"><label for="expdate_month">Expiration Date</label></font></td>
    <td width="62" height="22">
                  <font face="Verdana">

                  <SELECT name="expdate_month" id="expdate_month">
                        <OPTION value="1" >01
                        <OPTION value="2" >02
                        <OPTION value="3" >03
                        <OPTION value="4" >04
                        <OPTION value="5" >05
                        <OPTION value="6" >06
                        <OPTION value="7" >07
                        <OPTION value="8" >08
                        <OPTION value="9" >09
                        <OPTION value="10" >10
                        <OPTION value="11" >11
                        <OPTION value="12" >12
                  </SELECT></font></td>
    <td width="446" height="22">

                  <font face="Verdana">
                  <SELECT name="expdate_year">
                        <OPTION value="04" >2004
                        <OPTION value="05" >2005
                        <OPTION value="06" >2006
                        <OPTION value="07" >2007
                        <OPTION value="08" >2008
                        <OPTION value="09" >2009
                        <OPTION value="10" >2010
                        <OPTION value="11" >2011
                        <OPTION value="12" >2012
                  </SELECT></font></td>
  </tr>

  <tr>
    <td width="280" height="56"><font face="Verdana" size="2" color="#008000"><label for="cvv2_number">Card Verification <br>
    Number</label>:</font></td>
    <td width="508" height="56" colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber25" height="52">
      <tr>
        <td width="9%" height="52">

    <font face="Verdana">
    <input size="5" maxlength="19" type="text" name="cc_vnumber" id="cc_number0" value=""></font></td>
        <td width="11%" height="52">
        <img name="cardImg2" src="images/blankimage.gif" width="51" height="31">
        <font face="Verdana" size="2"><br></font></td>
        <td width="80%" height="52"><div id='imgText'></div></td>
      </tr>
    </table>
    </td>

  </tr>
  <tr>
    <td width="280" height="32"><font face="Verdana" size="2" color="#008000">First Name <label for="first_name"><span class="ppsmalltext">(as it appears on card)</span></label></font></td>
    <td width="508" height="32" colspan="2"><font face="Verdana"><input size="30" maxlength="32" type="text" name="fname" id="first_name" value=""></font></td>
  </tr>
  <tr>
    <td width="280" height="32"><font face="Verdana" size="2" color="#008000">Last Night <span class="ppsmalltext">(as it appears on card)</span></font></td>

    <td width="508" height="32" colspan="2"><input size="30" maxlength="32" type="text" name="lname" id="last_name" value=""></td>
  </tr>
  <tr>
    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"></td>
  </tr>
  <tr>
    <td width="788" height="32" colspan="3"><font face="Verdana" size="2">
    <font color="#008000"><b>Email Address</b></font> - CDS will use your email address to send you a receipt of this transaction
    and to communicate. Your email address will be kept private and will not be shared.</font></td>

  </tr>
  <tr>
    <td width="280" height="22"><font face="Verdana" size="2">Email Address</font></td>
    <td width="508" height="22" colspan="2"><input type="text" name="email" id="email" maxlength="64" value="" size="30"></td>
  </tr>
  <tr>
    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"></td>

  </tr>
  <tr>
    <td width="788" height="18" colspan="3"><font face="Verdana" size="2">
    <font color="#008000"><b>Credit Card Billing Address</b></font> - Enter the address where you receive your credit card bills.</font></td>
  </tr>
  <tr>
    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"></td>

  </tr>
  <tr>
    <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Address 1</font></td>
    <td width="508" height="22" colspan="2">
                        <input type='text' name="address1" id="address1" value="" size='25' maxlength='100' class="address"></td>
  </tr>
  <tr>
    <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Address 2</font></td>

    <td width="508" height="22" colspan="2">
                        <input type='text' name="address2" id="address2" value="" size='25' maxlength='100' class="address"></td>
  </tr>
  <tr>
    <td width="280" height="22"><font face="Verdana" size="2" color="#008000">City</font></td>
    <td width="508" height="22" colspan="2">
                        <input type='text' name="city" id="city" value="" size='25' maxlength='40' class="address"></td>
  </tr>

  <tr>
    <td width="280" height="23"><font face="Verdana" size="2" color="#008000">State</font></td>
    <td width="508" height="23" colspan="2">
                        <select name="state" id="state">
                              <option value>
                              <option value="AK" >AK
                              <option value="AL" >AL
                              <option value="AR" >AR
                              <option value="AZ" >AZ
                              <option value="CA" >CA
                              <option value="CO" >CO
                              <option value="CT" >CT
                              <option value="DC" >DC
                              <option value="DE" >DE
                              <option value="FL" >FL
                              <option value="GA" >GA
                              <option value="HI" >HI
                              <option value="IA" >IA
                              <option value="ID" >ID
                              <option value="IL" >IL
                              <option value="IN" >IN
                              <option value="KS" >KS
                              <option value="KY" >KY
                              <option value="LA" >LA
                              <option value="MA" >MA
                              <option value="MD" >MD
                              <option value="ME" >ME
                              <option value="MI" >MI
                              <option value="MN" >MN
                              <option value="MO" >MO
                              <option value="MS" >MS
                              <option value="MT" >MT
                              <option value="NC" >NC
                              <option value="ND" >ND
                              <option value="NE" >NE
                              <option value="NH" >NH
                              <option value="NJ" >NJ
                              <option value="NM" >NM
                              <option value="NV" >NV
                              <option value="NY" >NY
                              <option value="OH" >OH
                              <option value="OK" >OK
                              <option value="OR" >OR
                              <option value="PA" >PA
                              <option value="RI" >RI
                              <option value="SC" >SC
                              <option value="SD" >SD
                              <option value="TN" >TN
                              <option value="TX" >TX
                              <option value="UT" >UT
                              <option value="VA" >VA
                              <option value="VT" >VT
                              <option value="WA" >WA
                              <option value="WI" >WI
                              <option value="WV" >WV
                              <option value="WY" >WY
                              <option value="AA" >AA
                              <option value="AE" >AE
                              <option value="AP" >AP
                              <option value="AS" >AS
                              <option value="PR" >PR
                              <option value="FM" >FM
                              <option value="GU" >GU
                              <option value="MH" >MH
                              <option value="MP" >MP
                              <option value="PW" >PW
                              <option value="VI" >VI
                        </select>
                  </td>
  </tr>
  <tr>
    <td width="280" height="23"><font face="Verdana" size="2" color="#008000">Zip Code</font></td>
    <td width="508" height="23" colspan="2">
                        <input type="text" name="zip" id="zip" value="" size="10" maxlength="10" class="zip">
    (5 or 9 Digits)</td>
  </tr>
  <tr>

    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"></td>
  </tr>
  <tr>
    <td width="788" height="48" colspan="3"><font face="Verdana" size="2">
    <font color="#008000"><b>Phone Number</b></font> - Enter the phone number you use for billing contact on this credit card. This information will be kept confidential, and will only be used to authorize this payment or to provide customer service. CDS will not share your phone number.</font></td>
  </tr>
  <tr>

    <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Home Phone</font></td>
    <td width="508" height="22" colspan="2">
                        <input type='text' name="phone" id="city0" value="" size='25' maxlength='40' class="address"></td>
  </tr>
  <tr>
    <td width="280" height="9"></td>
    <td width="508" height="9" colspan="2"></td>
  </tr>

  <tr>
    <td width="280" height="2"><b><font face="Verdana" size="2">Shipping
    Information -</font></b>:</td>
    <td width="508" height="2" colspan="2"></td>
  </tr>

  <tr>
    <td width="280" height="2"></td>
    <td width="508" height="2" colspan="2"></td>
  </tr>

  <tr>
    <td width="280" height="1"><font face="Verdana" size="2">Address 1</font></td>
    <td width="508" height="1" colspan="2">
                        <input type='text' name="shipping_address" id="address4" value="" size='25' maxlength='100' class="address"></td>
  </tr>

  <tr>
    <td width="280" height="1"><font face="Verdana" size="2">Address 2</font></td>
    <td width="508" height="1" colspan="2">
                        <input type='text' name="shipping_address2" id="address3" value="" size='25' maxlength='100' class="address"></td>
  </tr>

  <tr>
    <td width="280" height="1"><font face="Verdana" size="2">City</font></td>
    <td width="508" height="1" colspan="2">
                        <input type='text' name="shipping_city" id="city1" value="" size='25' maxlength='40' class="address"></td>
  </tr>

  <tr>
    <td width="280" height="1"><font face="Verdana" size="2">State</font></td>
    <td width="508" height="1" colspan="2">
                        <select name="shipping_state" id="state0">
                              <option value>
                              <option value="AK" >AK
                              <option value="AL" >AL
                              <option value="AR" >AR
                              <option value="AZ" >AZ
                              <option value="CA" >CA
                              <option value="CO" >CO
                              <option value="CT" >CT
                              <option value="DC" >DC
                              <option value="DE" >DE
                              <option value="FL" >FL
                              <option value="GA" >GA
                              <option value="HI" >HI
                              <option value="IA" >IA
                              <option value="ID" >ID
                              <option value="IL" >IL
                              <option value="IN" >IN
                              <option value="KS" >KS
                              <option value="KY" >KY
                              <option value="LA" >LA
                              <option value="MA" >MA
                              <option value="MD" >MD
                              <option value="ME" >ME
                              <option value="MI" >MI
                              <option value="MN" >MN
                              <option value="MO" >MO
                              <option value="MS" >MS
                              <option value="MT" >MT
                              <option value="NC" >NC
                              <option value="ND" >ND
                              <option value="NE" >NE
                              <option value="NH" >NH
                              <option value="NJ" >NJ
                              <option value="NM" >NM
                              <option value="NV" >NV
                              <option value="NY" >NY
                              <option value="OH" >OH
                              <option value="OK" >OK
                              <option value="OR" >OR
                              <option value="PA" >PA
                              <option value="RI" >RI
                              <option value="SC" >SC
                              <option value="SD" >SD
                              <option value="TN" >TN
                              <option value="TX" >TX
                              <option value="UT" >UT
                              <option value="VA" >VA
                              <option value="VT" >VT
                              <option value="WA" >WA
                              <option value="WI" >WI
                              <option value="WV" >WV
                              <option value="WY" >WY
                              <option value="AA" >AA
                              <option value="AE" >AE
                              <option value="AP" >AP
                              <option value="AS" >AS
                              <option value="PR" >PR
                              <option value="FM" >FM
                              <option value="GU" >GU
                              <option value="MH" >MH
                              <option value="MP" >MP
                              <option value="PW" >PW
                              <option value="VI" >VI
                        </select></td>
  </tr>

  <tr>
    <td width="280" height="0"><font face="Verdana" size="2">Zip Code</font></td>
    <td width="508" height="0" colspan="2">
                        <input type="text" name="shipping_zip" id="zip0" value="" size="10" maxlength="10" class="zip">
    (5 or 9 Digits)</td>
  </tr>

  <tr>
    <td width="280" height="0"><font face="Verdana" size="2">Shipping
    Instructions/comments :</font></td>
    <td width="508" height="0" colspan="2">
    <textarea name="shipping_instructions" cols="50" rows="5"></textarea></td>
  </tr>

  <tr>
    <td width="280" height="0">&nbsp;</td>
    <td width="508" height="0" colspan="2">&nbsp;</td>
  </tr>

  <tr>
    <td width="280" height="1">
              <font face="Verdana" size="2"><b>Half</b> of Contract Amount :</font></td>
    <td width="508" height="1" colspan="2">
            <font face="Verdana" size="1">
            <input type="text" name="half_amount" size="8" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></font></td>
  </tr>

  <tr>
    <td width="280" height="27">
              <p style="margin-top: 0; margin-bottom: 0">
              <b><font face="Verdana" size="2">Total</font></b><font face="Verdana" size="2">
              Contract Amount </font></p>
              </td>

    <td width="508" height="27" colspan="2">
            <font face="Verdana" size="1">
            <input type="text" name="amount" size="8" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></font></td>
  </tr>

  <tr>
    <td width="280" height="28">
              <font face="Verdana" size="2">Auto Debit</font></td>

    <td width="508" height="28" colspan="2">
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber28">
              <tr>
                <td width="23%"><font face="Verdana">
                <input type="radio" value="auto_debit_yes" name="auto_debit"><font size="2">
                Yes</font></font></td>
                <td width="77%"><font face="Verdana">
                <input type="radio" value="auto_debit_no" checked name="auto_debit"><font size="2">
                No</font></font></td>
              </tr>
            </table>
    </td>
  </tr>
  <tr>
    <td width="280" height="18"></td>
    <td width="508" height="18" colspan="2"><font face="Verdana" size="2">
    Service Comments</font></td>

  </tr>
  <tr>
    <td width="280" height="84"></td>
    <td width="508" height="84" colspan="2"><textarea name="note" cols="50" rows="5"></textarea></td>
  </tr>
  <tr>
    <td width="280" height="9"></td>
    <td width="508" height="9" colspan="2"></td>
  </tr>

  <tr>
    <td width="280" height="5">
              <font face="Verdana" size="2">Testimonials :</font></td>
    <td width="508" height="5" colspan="2">
    <textarea name="testimonials" cols="50" rows="5"></textarea></td>
  </tr>

  <tr>
    <td width="280" height="2"><font face="Verdana" size="2">How did you hear
    about us?</font></td>
    <td width="508" height="2" colspan="2">
                  <select name="how_did_you_hear_about_us" style="font-family: verdana,arial,helvetica; width: 330px; background-color: #cccccc; color: #000000; font-size: 12px; border:1px #968E86 dashed; padding:1px;">
                  <option value="not_specified">Not Specified</option>
                  <option value="google">Google</option>
                  <option value="yahoo">Yahoo</option>
                  <option value="aol">AOL</option>
                  <option value="altavista">Altavista</option>
                  <option value="other_search_engine">Other Search Engine</option>                                  
                  <option value="newspaper">Newspaper</option>
                  <option value="advertisement">Advertisement</option>                  
                  <option value="tv">TV</option>
                  <option value="radio">Radio</option>
                  <option value="Other">Other</option>                                    
                        </option>
                </select></td>
  </tr>

  <tr>
    <td width="280" height="1"><font face="Verdana" size="2">Will you
              use our services again?</font></td>
    <td width="508" height="1" colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="200" id="AutoNumber31">
                <tr>
                  <td width="33%">
                  <input type="radio" value="yes_will_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px" checked><font size="1" face="Verdana">
                  Yes</font></td>
                  <td width="33%">
                  <input type="radio" value="no_will_not_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                  No</font></td>

                  <td width="34%">
                  <input type="radio" value="might_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                  Maybe</font></td>
                </tr>
              </table>
              </td>
  </tr>

  <tr>
    <td width="280" height="1"></td>
    <td width="508" height="1" colspan="2"></td>
  </tr>

  <tr>
    <td width="280" height="16"><font size="2" face="Verdana">The best
              way to contact you?</font></td>
    <td width="508" height="16" colspan="2">
                <select name="how_to_contact">
                  <option value="home_phone">Phone</option>
                  <option value="instant_messenager">IM</option>
                  <option value="mobile">Cell</option>
                  <option value="email" selected>Email</option>

                </select></td>
  </tr>

  <tr>
    <td width="280" height="16"><font face="Verdana" size="2">Add me to the
    mailing list</font></td>
    <td width="508" height="16" colspan="2">
                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber33" height="48">
                  <tr>
                    <td width="38%" height="48">
                    <p align="right"><font face="Verdana">
              <input type="radio" value="addmetolist" name="mailist"><font size="2"> Yes,
                    please  </font></font></td>
                    <td width="62%" height="48"><font face="Verdana">
              <input type="radio" value="dontaddmetolist" name="mailist"><font size="2"> No
                    thanks</font></font></td>
                  </tr>
                </table>
    </td>
  </tr>
</table>

  </center>
</div>
<div align="center">
  <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750" id="AutoNumber22" height="195">
        <tr>
          <td width="100%" height="78">

          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber32">
            <tr>
              <td width="100%" colspan="2">
              <p align="center">
              <font face="verdana,arial,helvetica" color="#5f5f5f" size="1">
              <span class="medium">Are you 18 years old or older. (21 in AL, MS,
              NE or WY)?</span></font></td>
            </tr>
            <tr>
              <td width="50%">
              <p align="right"><font face="Verdana">
              <input type="radio" value="ofage" name="age"><font size="2"> Yes</font></font></td>
              <td width="50%"><font face="Verdana">
              <input type="radio" value="underage" checked name="age"><font size="2">
              No</font></font></td>
            </tr>
          </table>
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber12" height="18">
            <tr>
              <td width="100%" colspan="2" height="21">
              <p align="center"><font face="Verdana" size="1">You must Agree
              with the Service Agreement and Polices to open a service contract</font></td>
            </tr>
            <tr>
              <td width="50%" height="12">
              <p align="right">

                  <font size="1" face="Verdana">
                  <input type="radio" name="agree" value="I_agree">
                  Agree   </font></td>
              <td width="50%" height="12">
                  <font size="1" face="Verdana">
                  <input type="radio" name="agree" value="I_disagree"> Disagree</font></td>
            </tr>

            <tr>
              <td width="100%" height="1" colspan="2">
<p align="center">
              </td>
            </tr>
          </table>
          </td>

        </tr>
        <tr>
          <td width="100%" height="66" align="center">
     <div id="DIV1" style="display:none">
     <img src='images/loading.gif' width="220" height="34" />
        <br><b><font color="#FF0000" face="Verdana">Please wait processing your order.....</font>
         </div>
         
         
         
          </td>

        </tr>
        <tr>
          <td width="100%" height="27">
          <p align="center">
          <input type="submit" value="Checkout" name="B1"  OnClick="Checkcc_number(this.form)" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px">     <input type="reset" value="Reset" name="B2" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></td>
        </tr>
        <tr>
          <td width="100%" height="27">
    <p align="right"><font face="Verdana" size="2"><b>
    Service Agreement and Policies</b></font></td>
        </tr>
        </table>
      </center>

</form>
</body>

</html>
0
Question by:Caiapfas
    16 Comments
     
    LVL 5

    Expert Comment

    by:Dragonmen
    I think i found your problem.
    The form that is defined somewhere at the top of the page is closed in the next line.
    When you've click submit you aren't in the form so the browser display a message that there is no object. This is becouse you don't have a form properly defined.

    Replacing this bottom code with your existing solves the problem with cc_number field:

    <p align="center">
            <form name="cds" action="orderform.php" method="post" onSubmit="checkCheckBox();submitonce(this);">       
            <input size="30" maxlength="19" type="text" name="cc_number" id="cc_number" value="">
              <input type="submit" value="Checkout" name="B1"  OnClick="Checkcc_number(this.form)" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px">     <input type="reset" value="Reset" name="B2" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></td>
            </tr>
            <tr>
              <td width="100%" height="27">
        <p align="right"><font face="Verdana" size="2"><b>
        Service Agreement and Policies</b></font></td>
            </tr>
            </table>
          </center>
    </form>
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    no thats not it...that was my bad on the real form I dont have it clsing like that..

    frontpage and all its glory added that in....but even with that out..it still submits instead of stoping submission untill the form is complete..

    and i cant move where the form starts i need all those feilds...

    more help please
    0
     
    LVL 5

    Expert Comment

    by:Hammadian2
    as simple as this:

    replace

    OnClick="Checkcc_number(this.form)"

    with:

    OnClick="return Checkcc_number(this.form)"
    0
     
    LVL 2

    Author Comment

    by:Caiapfas







    Hammadian2,

    ok that worked to an extint, it still will submit on the other errors, expired card, bad card, bad month...the only one it stops for sure on is no card number...

    can you check it out?
    ==================================================

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title></title>
    <style>
    <!--
    .medium{
                      font-size:7pt;
                font-weight:normal;
                font-style:normal;
                color:5F5F5F;
                font-family:verdana,helvetica,arial;  
                line-height:10pt;        
                      }

    -->
    </style>
    </head>

    <body>

    <script language="javascript">
    <!--
    var message="";

    function clickIE4(){
    if (event.button==2){
    //alert(message);
    return false;
    }
    }

    function clickNS4(e){
    if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
    //alert(message);
    return false;
    }
    }
    }

    if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
    }
    else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
    }

    document.oncontextmenu=new Function("return false")


    // -->
    </script>

    <script>

    function submitonce(theform){
    //if IE 4+ or NS 6+
    if (document.all||document.getElementById){
    //screen thru every element in the form, and hunt down "submit" and "reset"
    for (i=0;i<theform.length;i++){
    var tempobj=theform.elements[i]
    if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
    //disable em
    tempobj.disabled=true
    }
    }
    }
    </script>

    <script type="text/javascript" language="javascript">
    function swapEm(ndx)
    {
      var theSource = theSource2 = ""
      var theText = ""
      switch (ndx)
      {
      case 0:
           theSource = "images/blankimage.gif";
           theSource2 = "images/blankimage.gif";
           theText = ""
           break;
         case 1:
           theSource = "images/icon_visa.gif";
           theSource2 = "images/visaverification.gif";
           theText = "(On the back of your card, locate the final 3 digit number)"
           break;
         case 2:
           theSource = "images/icon_mastercard.gif";
           theSource2 = "images/mastercardverification.gif";
           theText = "(On the back of your card, locate the final 3 digit number)"
           break;
         case 3:
           theSource = "images/icon_discover.gif";
           theSource2 = "images/discoververification.gif";
           theText = "(On the back of your card, locate the final 3 digit number)"
           break;
         case 4:
           theSource = "images/icon_amex.gif";
           theSource2 = "images/amexverification.gif";
           theText = "(On the front of your card, locate the final 4 digit number)"
           break;
       }
       document.images['cardImg1'].src = theSource;
       document.images['cardImg2'].src = theSource2;
       document.getElementById('imgText').innerHTML = theText

     

    }
    </script>

    <script type="text/javaScript">  

      function checkCheckBox(){  
        if(!document.getElementsByName('agree')[0].checked) {  
          alert("You must Agree with the Service Agreement and Polices to open a service contract\nPlease select AGREE on the form to continue")  
           return false;
        }  
          document.getElementById("DIV1").style.display = "";  
          //document.getElementById("B1").disabled = true;
          return true;
      }

    </script>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    var Cards = new makeArray(8);
    Cards[0] = new cc_type("MasterCard", "51,52,53,54,55", "16");
    var MasterCard = Cards[0];
    Cards[1] = new cc_type("VisaCard", "4", "13,16");
    var VisaCard = Cards[1];
    Cards[2] = new cc_type("AmExCard", "34,37", "15");
    var AmExCard = Cards[2];
    Cards[3] = new cc_type("DinersClubCard", "30,36,38", "14");
    var DinersClubCard = Cards[3];
    Cards[4] = new cc_type("DiscoverCard", "6011", "16");
    var DiscoverCard = Cards[4];
    Cards[5] = new cc_type("enRouteCard", "2014,2149", "15");
    var enRouteCard = Cards[5];
    Cards[6] = new cc_type("JCBCard", "3088,3096,3112,3158,3337,3528", "16");
    var JCBCard = Cards[6];
    var LuhnCheckSum = Cards[7] = new cc_type();

    /*************************************************************************\
    Checkcc_number(form)
    function called when users click the "check" button.
    \*************************************************************************/
    function Checkcc_number(form) {
    var tmpyear;
    if (form.cc_number.value.length == 0) {
    alert("Please enter a Card Number.");
    form.cc_number.focus();
    return;
    }
    if (form.expdate_year.value.length == 0) {
    alert("Please enter the Expiration Year.");
    form.expdate_year.focus();
    return;
    }
    if (form.expdate_year.value > 96)
    tmpyear = "19" + form.expdate_year.value;
    else if (form.expdate_year.value < 21)
    tmpyear = "20" + form.expdate_year.value;
    else {
    alert("The Expiration Year is not valid.");
    return;
    }
    tmpmonth = form.expdate_month.options[form.expdate_month.selectedIndex].value;
    // The following line doesn't work in IE3, you need to change it
    // to something like "(new cc_type())...".
    // if (!cc_type().isExpiryDate(tmpyear, tmpmonth)) {
    if (!(new cc_type()).isExpiryDate(tmpyear, tmpmonth)) {
    alert("This card has already expired.");
    return;
    }
    card = form.cc_type.options[form.cc_type.selectedIndex].value;
    var retval = eval(card + ".checkcc_number(\"" + form.cc_number.value +
    "\", " + tmpyear + ", " + tmpmonth + ");");
    cardname = "";
    if (retval);

    // comment this out if used on an order form
    //alert("This card number appears to be valid.");

    else {
    // The cc_number has the valid luhn checksum, but we want to know which
    // cc_type it belongs to.
    for (var n = 0; n < Cards.size; n++) {
    if (Cards[n].checkcc_number(form.cc_number.value, tmpyear, tmpmonth)) {
    cardname = Cards[n].getcc_type();
    break;
       }
    }
    if (cardname.length > 0) {
    alert("This looks like a " + cardname + " number, not a " + card + " number.");
    }
    else {
    alert("This card number is not valid.");
          }
       }
    }
    /*************************************************************************\
    Object cc_type([String cc_type, String rules, String len, int year,
                                            int month])
    cc_type    : type of card, eg: MasterCard, Visa, etc.
    rules       : rules of the cc_number, eg: "4", "6011", "34,37".
    len         : valid length of cc_number, eg: "16,19", "13,16".
    year        : year of expiry date.
    month       : month of expiry date.
    eg:
    var VisaCard = new cc_type("Visa", "4", "16");
    var AmExCard = new cc_type("AmEx", "34,37", "15");
    \*************************************************************************/
    function cc_type() {
    var n;
    var argv = cc_type.arguments;
    var argc = cc_type.arguments.length;

    this.objname = "object cc_type";

    var tmpcc_type = (argc > 0) ? argv[0] : "CardObject";
    var tmprules = (argc > 1) ? argv[1] : "0,1,2,3,4,5,6,7,8,9";
    var tmplen = (argc > 2) ? argv[2] : "13,14,15,16,19";

    this.setcc_number = setcc_number;  // set cc_number method.
    this.setcc_type = setcc_type;  // setcc_type method.
    this.setLen = setLen;  // setLen method.
    this.setRules = setRules;  // setRules method.
    this.setExpiryDate = setExpiryDate;  // setExpiryDate method.

    this.setcc_type(tmpcc_type);
    this.setLen(tmplen);
    this.setRules(tmprules);
    if (argc > 4)
    this.setExpiryDate(argv[3], argv[4]);

    this.checkcc_number = checkcc_number;  // checkcc_number method.
    this.getExpiryDate = getExpiryDate;  // getExpiryDate method.
    this.getcc_type = getcc_type;  // getcc_type method.
    this.iscc_number = iscc_number;  // iscc_number method.
    this.isExpiryDate = isExpiryDate;  // isExpiryDate method.
    this.luhnCheck = luhnCheck;// luhnCheck method.
    return this;
    }

    /*************************************************************************\
    boolean checkcc_number([String cc_number, int year, int month])
    return true if cc_number pass the luhncheck and the expiry date is
    valid, else return false.
    \*************************************************************************/
    function checkcc_number() {
    var argv = checkcc_number.arguments;
    var argc = checkcc_number.arguments.length;
    var cc_number = (argc > 0) ? argv[0] : this.cc_number;
    var year = (argc > 1) ? argv[1] : this.year;
    var month = (argc > 2) ? argv[2] : this.month;

    this.setcc_number(cc_number);
    this.setExpiryDate(year, month);

    if (!this.iscc_number())
    return false;
    if (!this.isExpiryDate())
    return false;

    return true;
    }
    /*************************************************************************\
    String getcc_type()
    return the cc_type.
    \*************************************************************************/
    function getcc_type() {
    return this.cc_type;
    }
    /*************************************************************************\
    String getExpiryDate()
    return the expiry date.
    \*************************************************************************/
    function getExpiryDate() {
    return this.month + "/" + this.year;
    }
    /*************************************************************************\
    boolean iscc_number([String cc_number])
    return true if cc_number pass the luhncheck and the rules, else return
    false.
    \*************************************************************************/
    function iscc_number() {
    var argv = iscc_number.arguments;
    var argc = iscc_number.arguments.length;
    var cc_number = (argc > 0) ? argv[0] : this.cc_number;
    if (!this.luhnCheck())
    return false;

    for (var n = 0; n < this.len.size; n++)
    if (cc_number.toString().length == this.len[n]) {
    for (var m = 0; m < this.rules.size; m++) {
    var headdigit = cc_number.substring(0, this.rules[m].toString().length);
    if (headdigit == this.rules[m])
    return true;
    }
    return false;
    }
    return false;
    }

    /*************************************************************************\
    boolean isExpiryDate([int year, int month])
    return true if the date is a valid expiry date,
    else return false.
    \*************************************************************************/
    function isExpiryDate() {
    var argv = isExpiryDate.arguments;
    var argc = isExpiryDate.arguments.length;

    year = argc > 0 ? argv[0] : this.year;
    month = argc > 1 ? argv[1] : this.month;

    if (!isNum(year+""))
    return false;
    if (!isNum(month+""))
    return false;
    today = new Date();
    expiry = new Date(year, month);
    if (today.getTime() > expiry.getTime())
    return false;
    else
    return true;
    }

    /*************************************************************************\
    boolean isNum(String argvalue)
    return true if argvalue contains only numeric characters,
    else return false.
    \*************************************************************************/
    function isNum(argvalue) {
    argvalue = argvalue.toString();

    if (argvalue.length == 0)
    return false;

    for (var n = 0; n < argvalue.length; n++)
    if (argvalue.substring(n, n+1) < "0" || argvalue.substring(n, n+1) > "9")
    return false;

    return true;
    }

    /*************************************************************************\
    boolean luhnCheck([String cc_number])
    return true if cc_number pass the luhn check else return false.
    Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
    \*************************************************************************/
    function luhnCheck() {
    var argv = luhnCheck.arguments;
    var argc = luhnCheck.arguments.length;

    var cc_number = argc > 0 ? argv[0] : this.cc_number;

    if (! isNum(cc_number)) {
    return false;
      }

    var no_digit = cc_number.length;
    var oddoeven = no_digit & 1;
    var sum = 0;

    for (var count = 0; count < no_digit; count++) {
    var digit = parseInt(cc_number.charAt(count));
    if (!((count & 1) ^ oddoeven)) {
    digit *= 2;
    if (digit > 9)
    digit -= 9;
    }
    sum += digit;
    }
    if (sum % 10 == 0)
    return true;
    else
    return false;
    }

    /*************************************************************************\
    ArrayObject makeArray(int size)
    return the array object in the size specified.
    \*************************************************************************/
    function makeArray(size) {
    this.size = size;
    return this;
    }

    /*************************************************************************\
    cc_type setcc_number(cc_number)
    return the cc_type object.
    \*************************************************************************/
    function setcc_number(cc_number) {
    this.cc_number = cc_number;
    return this;
    }

    /*************************************************************************\
    cc_type setcc_type(cc_type)
    return the cc_type object.
    \*************************************************************************/
    function setcc_type(cc_type) {
    this.cc_type = cc_type;
    return this;
    }

    /*************************************************************************\
    cc_type setExpiryDate(year, month)
    return the cc_type object.
    \*************************************************************************/
    function setExpiryDate(year, month) {
    this.year = year;
    this.month = month;
    return this;
    }

    /*************************************************************************\
    cc_type setLen(len)
    return the cc_type object.
    \*************************************************************************/
    function setLen(len) {
    // Create the len array.
    if (len.length == 0 || len == null)
    len = "13,14,15,16,19";

    var tmplen = len;
    n = 1;
    while (tmplen.indexOf(",") != -1) {
    tmplen = tmplen.substring(tmplen.indexOf(",") + 1, tmplen.length);
    n++;
    }
    this.len = new makeArray(n);
    n = 0;
    while (len.indexOf(",") != -1) {
    var tmpstr = len.substring(0, len.indexOf(","));
    this.len[n] = tmpstr;
    len = len.substring(len.indexOf(",") + 1, len.length);
    n++;
    }
    this.len[n] = len;
    return this;
    }

    /*************************************************************************\
    cc_type setRules()
    return the cc_type object.
    \*************************************************************************/
    function setRules(rules) {
    // Create the rules array.
    if (rules.length == 0 || rules == null)
    rules = "0,1,2,3,4,5,6,7,8,9";
     
    var tmprules = rules;
    n = 1;
    while (tmprules.indexOf(",") != -1) {
    tmprules = tmprules.substring(tmprules.indexOf(",") + 1, tmprules.length);
    n++;
    }
    this.rules = new makeArray(n);
    n = 0;
    while (rules.indexOf(",") != -1) {
    var tmpstr = rules.substring(0, rules.indexOf(","));
    this.rules[n] = tmpstr;
    rules = rules.substring(rules.indexOf(",") + 1, rules.length);
    n++;
    }
    this.rules[n] = rules;
    return this;
    }
    //  End -->
    </script>


    <form name="cds" action="orderform.php" method="post" onSubmit="return checkCheckBox();submitonce(this);">
     <[SERVER FORM FIELDS]>

    <div align="center">
      <center>

    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="788" id="AutoNumber23" height="1098">
      <tr>
        <td width="280" height="24">
        <div align="center">
          <p align="left">




    <font size="1" face="Verdana">This transaction is processed on a
    <font color="#FF0000">secure server</font> through PayPal.</font></div>
        </td>
      </tr>
      <tr>
        <td width="280" height="19">&nbsp;</td>

      </tr>
      <tr>
        <td width="788" height="24" colspan="3">

        <div align="center">
          <center>
          <p>&nbsp;</p>
          </center>
        </div>
        </td>
      </tr>
      <tr>
        <td width="280" height="4"></td>
        <td width="508" height="4" colspan="2"></td>
      </tr>
      <tr>
        <td width="788" height="14" colspan="3"><b><font face="Verdana" size="2">Service Details</font></b></td>

      </tr>
      <tr>
        <td width="788" height="3" colspan="3"></td>

      </tr>
      <tr>
        <td width="788" height="1" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber34">
          <tr>
            <td width="35%"><font face="Verdana" size="2">Select Username</font></td>
            <td width="65%">

                <font face="Verdana" size="1">
                <input type="text" name="username" size="29" ></font></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="788" height="1" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber35">
          <tr>
            <td width="35%"><font face="Verdana" size="2">Select Password</font></td>
            <td width="65%">

                <font face="Verdana" size="1">
                <input type="text" name="password" size="29" ></font></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="788" height="2" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber36">
          <tr>
            <td width="35%"><font face="Verdana" size="2">Confirm Password</font></td>
            <td width="65%">

                <font face="Verdana" size="1">
                <input type="text" name="confirmpassword" size="29" ></font></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="788" height="6" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="788" id="AutoNumber29">
          <tr>
            <td width="279"><font face="Verdana" size="2">How
        was our service?</font></td>
            <td width="509">
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber30" height="1">
                    <tr>

                      <td width="25%" height="1">
                      <input type="radio" value="excellent_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px" checked><font size="1" face="Verdana">
                      Excellent</font></td>
                      <td width="25%" height="1">
                      <input type="radio" value="good_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      Good</font></td>
                      <td width="25%" height="1">
                      <input type="radio" value="average_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">

                      Average</font></td>
                      <td width="25%" height="1">
                      <input type="radio" value="poor_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      Poor</font></td>
                    </tr>
                  </table>
                  </td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="280" height="1"></td>
        <td width="508" height="1" colspan="2"></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2">Current/Desired Url</font></td>
        <td width="508" height="22" colspan="2">

                <font face="Verdana" size="1">
                <input type="text" name="surl" size="29" ></font></td>
      </tr>
      <tr>
        <td width="280" height="96"></td>
        <td width="508" height="96" colspan="2">
                 <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber11" height="78">
                    <tr>
                      <td width="100%" colspan="2" height="16">

                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" size="2">Logon information for web host
                      server.</font></p>
                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" color="#FF6666" style="font-size: 7pt; font-weight: 700">
                      If you don't have or know this, just skip.</font></p>
                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" color="#FF6666" style="font-size: 7pt; font-weight: 700">
                      If we already have this information, no need to re-enter</font></p>

                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" size="1">(CDS will not perform any
                      unauthorized changes/services to your website)</font></td>
                    </tr>
                    <tr>
                      <td width="28%" height="20"><font face="Verdana" size="2"><b>Username</b> :
                      </font> </td>
                      <td width="72%" height="20">

                <font face="Verdana" size="1">
                <input type="text" name="suname" size="16" ></font></td>
                    </tr>
                    <tr>
                      <td width="28%" height="22"><font face="Verdana" size="2"><b>Password</b> :
                      </font> </td>
                      <td width="72%" height="22">
                <font face="Verdana" size="1">

                <input type="text" name="spwd" size="16" ></font></td>
                    </tr>
                  </table>
                  </td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="11"><font face="Verdana" size="2">Instant Messenger
        Contact Information</font></td>
        <td width="508" height="11" colspan="2">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber27">
          <tr>
            <td width="20%">
            <p align="left">
                    <select name="im_choice">
                      <option value="msn">MSN</option>
                      <option value="aol">Aol</option>
                      <option value="yahoo">Yahoo</option>
                      <option>ICQ</option>

                    </select></td>
            <td width="80%">
                <font face="Verdana" size="1">

                <input type="text" name="im_name" size="25" ></font></td>
          </tr>
        </table>
        </td>
      </tr>

      <tr>
        <td width="280" height="11"><font face="Verdana" size="2">Secondary Email</font></td>
        <td width="508" height="11" colspan="2">
        <input type="text" name="secondary_email" id="email0" maxlength="64" value="" size="30"></td>
      </tr>
      <tr>
        <td width="788" colspan="3" height="73"><font face="Verdana" size="2">Please enter the following information exactly as it appears on your credit card statement and click <span class="ppem106">Continue Checkout</span> below. Your financial information will be kept secure.
        </font>
        <p> <font face="Verdana" size="2"> <span class="ppsmalltext">How does CDS keep my information safe?</a></span></font></td>

      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>
      <tr>
        <td width="280" height="35"><font face="Verdana" size="2" color="#008000">Card Type</font></td>
        <td width="508" height="35" colspan="2">

                      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber26" height="35">
                  <tr>
                    <td width="24%" height="35">
                      <font face="Verdana">
                      <select name='cc_type' onchange='if (this.selectedIndex != 0 ) swapEm(this.selectedIndex)'>
                            <option selected>Select Card Type</option>
                            <option value="MasterCard">MasterCard
                            <option value="VisaCard">Visa
                            <option value="AmExCard">American Express
                            <option value="DiscoverCard">Discover
                      <!--<option value="DinersClubCard">Diners Club
                            <option value="enRouteCard">enRoute
                            <option value="JCBCard">JCB -->
                      </select></font></td>
                    <td width="76%" height="35">
                    <img name="cardImg1" src="images/blankimage.gif" width="39" height="26"></td>
                  </tr>
                </table>
        </td>
      </tr>

      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Credit Card Number</font></td>
        <td width="508" height="22" colspan="2"><font face="Verdana"><input size="30" maxlength="19" type="text" name="cc_number" id="cc_number" value=""></font></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000"><label for="expdate_month">Expiration Date</label></font></td>
        <td width="62" height="22">
                      <font face="Verdana">

                      <SELECT name="expdate_month" id="expdate_month">
                            <OPTION value="1" >01
                            <OPTION value="2" >02
                            <OPTION value="3" >03
                            <OPTION value="4" >04
                            <OPTION value="5" >05
                            <OPTION value="6" >06
                            <OPTION value="7" >07
                            <OPTION value="8" >08
                            <OPTION value="9" >09
                            <OPTION value="10" >10
                            <OPTION value="11" >11
                            <OPTION value="12" >12
                      </SELECT></font></td>
        <td width="446" height="22">

                      <font face="Verdana">
                      <SELECT name="expdate_year">
                            <OPTION value="04" >2004
                            <OPTION value="05" >2005
                            <OPTION value="06" >2006
                            <OPTION value="07" >2007
                            <OPTION value="08" >2008
                            <OPTION value="09" >2009
                            <OPTION value="10" >2010
                            <OPTION value="11" >2011
                            <OPTION value="12" >2012
                      </SELECT></font></td>
      </tr>

      <tr>
        <td width="280" height="56"><font face="Verdana" size="2" color="#008000"><label for="cvv2_number">Card Verification <br>
        Number</label>:</font></td>
        <td width="508" height="56" colspan="2">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber25" height="52">
          <tr>
            <td width="9%" height="52">

        <font face="Verdana">
        <input size="5" maxlength="19" type="text" name="cc_vnumber" id="cc_number0" value=""></font></td>
            <td width="11%" height="52">
            <img name="cardImg2" src="images/blankimage.gif" width="51" height="31">
            <font face="Verdana" size="2"><br></font></td>
            <td width="80%" height="52"><div id='imgText'></div></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="280" height="32"><font face="Verdana" size="2" color="#008000">First Name <label for="first_name"><span class="ppsmalltext">(as it appears on card)</span></label></font></td>
        <td width="508" height="32" colspan="2"><font face="Verdana"><input size="30" maxlength="32" type="text" name="fname" id="first_name" value=""></font></td>
      </tr>
      <tr>
        <td width="280" height="32"><font face="Verdana" size="2" color="#008000">Last Night <span class="ppsmalltext">(as it appears on card)</span></font></td>

        <td width="508" height="32" colspan="2"><input size="30" maxlength="32" type="text" name="lname" id="last_name" value=""></td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>
      <tr>
        <td width="788" height="32" colspan="3"><font face="Verdana" size="2">
        <font color="#008000"><b>Email Address</b></font> - CDS will use your email address to send you a receipt of this transaction
        and to communicate. Your email address will be kept private and will not be shared.</font></td>

      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2">Email Address</font></td>
        <td width="508" height="22" colspan="2"><input type="text" name="email" id="email" maxlength="64" value="" size="30"></td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>

      </tr>
      <tr>
        <td width="788" height="18" colspan="3"><font face="Verdana" size="2">
        <font color="#008000"><b>Credit Card Billing Address</b></font> - Enter the address where you receive your credit card bills.</font></td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>

      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Address 1</font></td>
        <td width="508" height="22" colspan="2">
                            <input type='text' name="address1" id="address1" value="" size='25' maxlength='100' class="address"></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Address 2</font></td>

        <td width="508" height="22" colspan="2">
                            <input type='text' name="address2" id="address2" value="" size='25' maxlength='100' class="address"></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">City</font></td>
        <td width="508" height="22" colspan="2">
                            <input type='text' name="city" id="city" value="" size='25' maxlength='40' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="23"><font face="Verdana" size="2" color="#008000">State</font></td>
        <td width="508" height="23" colspan="2">
                            <select name="state" id="state">
                                  <option value>
                                  <option value="AK" >AK
                                  <option value="AL" >AL
                                  <option value="AR" >AR
                                  <option value="AZ" >AZ
                                  <option value="CA" >CA
                                  <option value="CO" >CO
                                  <option value="CT" >CT
                                  <option value="DC" >DC
                                  <option value="DE" >DE
                                  <option value="FL" >FL
                                  <option value="GA" >GA
                                  <option value="HI" >HI
                                  <option value="IA" >IA
                                  <option value="ID" >ID
                                  <option value="IL" >IL
                                  <option value="IN" >IN
                                  <option value="KS" >KS
                                  <option value="KY" >KY
                                  <option value="LA" >LA
                                  <option value="MA" >MA
                                  <option value="MD" >MD
                                  <option value="ME" >ME
                                  <option value="MI" >MI
                                  <option value="MN" >MN
                                  <option value="MO" >MO
                                  <option value="MS" >MS
                                  <option value="MT" >MT
                                  <option value="NC" >NC
                                  <option value="ND" >ND
                                  <option value="NE" >NE
                                  <option value="NH" >NH
                                  <option value="NJ" >NJ
                                  <option value="NM" >NM
                                  <option value="NV" >NV
                                  <option value="NY" >NY
                                  <option value="OH" >OH
                                  <option value="OK" >OK
                                  <option value="OR" >OR
                                  <option value="PA" >PA
                                  <option value="RI" >RI
                                  <option value="SC" >SC
                                  <option value="SD" >SD
                                  <option value="TN" >TN
                                  <option value="TX" >TX
                                  <option value="UT" >UT
                                  <option value="VA" >VA
                                  <option value="VT" >VT
                                  <option value="WA" >WA
                                  <option value="WI" >WI
                                  <option value="WV" >WV
                                  <option value="WY" >WY
                                  <option value="AA" >AA
                                  <option value="AE" >AE
                                  <option value="AP" >AP
                                  <option value="AS" >AS
                                  <option value="PR" >PR
                                  <option value="FM" >FM
                                  <option value="GU" >GU
                                  <option value="MH" >MH
                                  <option value="MP" >MP
                                  <option value="PW" >PW
                                  <option value="VI" >VI
                            </select>
                      </td>
      </tr>
      <tr>
        <td width="280" height="23"><font face="Verdana" size="2" color="#008000">Zip Code</font></td>
        <td width="508" height="23" colspan="2">
                            <input type="text" name="zip" id="zip" value="" size="10" maxlength="10" class="zip">
        (5 or 9 Digits)</td>
      </tr>
      <tr>

        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>
      <tr>
        <td width="788" height="48" colspan="3"><font face="Verdana" size="2">
        <font color="#008000"><b>Phone Number</b></font> - Enter the phone number you use for billing contact on this credit card. This information will be kept confidential, and will only be used to authorize this payment or to provide customer service. CDS will not share your phone number.</font></td>
      </tr>
      <tr>

        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Home Phone</font></td>
        <td width="508" height="22" colspan="2">
                            <input type='text' name="phone" id="city0" value="" size='25' maxlength='40' class="address"></td>
      </tr>
      <tr>
        <td width="280" height="9"></td>
        <td width="508" height="9" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="2"><b><font face="Verdana" size="2">Shipping
        Information -</font></b>:</td>
        <td width="508" height="2" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="2"></td>
        <td width="508" height="2" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">Address 1</font></td>
        <td width="508" height="1" colspan="2">
                            <input type='text' name="shipping_address" id="address4" value="" size='25' maxlength='100' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">Address 2</font></td>
        <td width="508" height="1" colspan="2">
                            <input type='text' name="shipping_address2" id="address3" value="" size='25' maxlength='100' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">City</font></td>
        <td width="508" height="1" colspan="2">
                            <input type='text' name="shipping_city" id="city1" value="" size='25' maxlength='40' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">State</font></td>
        <td width="508" height="1" colspan="2">
                            <select name="shipping_state" id="state0">
                                  <option value>
                                  <option value="AK" >AK
                                  <option value="AL" >AL
                                  <option value="AR" >AR
                                  <option value="AZ" >AZ
                                  <option value="CA" >CA
                                  <option value="CO" >CO
                                  <option value="CT" >CT
                                  <option value="DC" >DC
                                  <option value="DE" >DE
                                  <option value="FL" >FL
                                  <option value="GA" >GA
                                  <option value="HI" >HI
                                  <option value="IA" >IA
                                  <option value="ID" >ID
                                  <option value="IL" >IL
                                  <option value="IN" >IN
                                  <option value="KS" >KS
                                  <option value="KY" >KY
                                  <option value="LA" >LA
                                  <option value="MA" >MA
                                  <option value="MD" >MD
                                  <option value="ME" >ME
                                  <option value="MI" >MI
                                  <option value="MN" >MN
                                  <option value="MO" >MO
                                  <option value="MS" >MS
                                  <option value="MT" >MT
                                  <option value="NC" >NC
                                  <option value="ND" >ND
                                  <option value="NE" >NE
                                  <option value="NH" >NH
                                  <option value="NJ" >NJ
                                  <option value="NM" >NM
                                  <option value="NV" >NV
                                  <option value="NY" >NY
                                  <option value="OH" >OH
                                  <option value="OK" >OK
                                  <option value="OR" >OR
                                  <option value="PA" >PA
                                  <option value="RI" >RI
                                  <option value="SC" >SC
                                  <option value="SD" >SD
                                  <option value="TN" >TN
                                  <option value="TX" >TX
                                  <option value="UT" >UT
                                  <option value="VA" >VA
                                  <option value="VT" >VT
                                  <option value="WA" >WA
                                  <option value="WI" >WI
                                  <option value="WV" >WV
                                  <option value="WY" >WY
                                  <option value="AA" >AA
                                  <option value="AE" >AE
                                  <option value="AP" >AP
                                  <option value="AS" >AS
                                  <option value="PR" >PR
                                  <option value="FM" >FM
                                  <option value="GU" >GU
                                  <option value="MH" >MH
                                  <option value="MP" >MP
                                  <option value="PW" >PW
                                  <option value="VI" >VI
                            </select></td>
      </tr>

      <tr>
        <td width="280" height="0"><font face="Verdana" size="2">Zip Code</font></td>
        <td width="508" height="0" colspan="2">
                            <input type="text" name="shipping_zip" id="zip0" value="" size="10" maxlength="10" class="zip">
        (5 or 9 Digits)</td>
      </tr>

      <tr>
        <td width="280" height="0"><font face="Verdana" size="2">Shipping
        Instructions/comments :</font></td>
        <td width="508" height="0" colspan="2">
        <textarea name="shipping_instructions" cols="50" rows="5"></textarea></td>
      </tr>

      <tr>
        <td width="280" height="0">&nbsp;</td>
        <td width="508" height="0" colspan="2">&nbsp;</td>
      </tr>

      <tr>
        <td width="280" height="1">
                  <font face="Verdana" size="2"><b>Half</b> of Contract Amount :</font></td>
        <td width="508" height="1" colspan="2">
                <font face="Verdana" size="1">
                <input type="text" name="half_amount" size="8" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></font></td>
      </tr>

      <tr>
        <td width="280" height="27">
                  <p style="margin-top: 0; margin-bottom: 0">
                  <b><font face="Verdana" size="2">Total</font></b><font face="Verdana" size="2">
                  Contract Amount </font></p>
                  </td>

        <td width="508" height="27" colspan="2">
                <font face="Verdana" size="1">
                <input type="text" name="amount" size="8" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></font></td>
      </tr>

      <tr>
        <td width="280" height="28">
                  <font face="Verdana" size="2">Auto Debit</font></td>

        <td width="508" height="28" colspan="2">
                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber28">
                  <tr>
                    <td width="23%"><font face="Verdana">
                    <input type="radio" value="auto_debit_yes" name="auto_debit"><font size="2">
                    Yes</font></font></td>
                    <td width="77%"><font face="Verdana">
                    <input type="radio" value="auto_debit_no" checked name="auto_debit"><font size="2">
                    No</font></font></td>
                  </tr>
                </table>
        </td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"><font face="Verdana" size="2">
        Service Comments</font></td>

      </tr>
      <tr>
        <td width="280" height="84"></td>
        <td width="508" height="84" colspan="2"><textarea name="note" cols="50" rows="5"></textarea></td>
      </tr>
      <tr>
        <td width="280" height="9"></td>
        <td width="508" height="9" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="5">
                  <font face="Verdana" size="2">Testimonials :</font></td>
        <td width="508" height="5" colspan="2">
        <textarea name="testimonials" cols="50" rows="5"></textarea></td>
      </tr>

      <tr>
        <td width="280" height="2"><font face="Verdana" size="2">How did you hear
        about us?</font></td>
        <td width="508" height="2" colspan="2">
                      <select name="how_did_you_hear_about_us" style="font-family: verdana,arial,helvetica; width: 330px; background-color: #cccccc; color: #000000; font-size: 12px; border:1px #968E86 dashed; padding:1px;">
                      <option value="not_specified">Not Specified</option>
                      <option value="google">Google</option>
                      <option value="yahoo">Yahoo</option>
                      <option value="aol">AOL</option>
                      <option value="altavista">Altavista</option>
                      <option value="other_search_engine">Other Search Engine</option>                                  
                      <option value="newspaper">Newspaper</option>
                      <option value="advertisement">Advertisement</option>                  
                      <option value="tv">TV</option>
                      <option value="radio">Radio</option>
                      <option value="Other">Other</option>                                    
                            </option>
                    </select></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">Will you
                  use our services again?</font></td>
        <td width="508" height="1" colspan="2">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="200" id="AutoNumber31">
                    <tr>
                      <td width="33%">
                      <input type="radio" value="yes_will_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px" checked><font size="1" face="Verdana">
                      Yes</font></td>
                      <td width="33%">
                      <input type="radio" value="no_will_not_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      No</font></td>

                      <td width="34%">
                      <input type="radio" value="might_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      Maybe</font></td>
                    </tr>
                  </table>
                  </td>
      </tr>

      <tr>
        <td width="280" height="1"></td>
        <td width="508" height="1" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="16"><font size="2" face="Verdana">The best
                  way to contact you?</font></td>
        <td width="508" height="16" colspan="2">
                    <select name="how_to_contact">
                      <option value="home_phone">Phone</option>
                      <option value="instant_messenager">IM</option>
                      <option value="mobile">Cell</option>
                      <option value="email" selected>Email</option>

                    </select></td>
      </tr>

      <tr>
        <td width="280" height="16"><font face="Verdana" size="2">Add me to the
        mailing list</font></td>
        <td width="508" height="16" colspan="2">
                    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber33" height="48">
                      <tr>
                        <td width="38%" height="48">
                        <p align="right"><font face="Verdana">
                  <input type="radio" value="addmetolist" name="mailist"><font size="2"> Yes,
                        please  </font></font></td>
                        <td width="62%" height="48"><font face="Verdana">
                  <input type="radio" value="dontaddmetolist" name="mailist"><font size="2"> No
                        thanks</font></font></td>
                      </tr>
                    </table>
        </td>
      </tr>
    </table>

      </center>
    </div>
    <div align="center">
      <center>
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750" id="AutoNumber22" height="195">
            <tr>
              <td width="100%" height="78">

              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber32">
                <tr>
                  <td width="100%" colspan="2">
                  <p align="center">
                  <font face="verdana,arial,helvetica" color="#5f5f5f" size="1">
                  <span class="medium">Are you 18 years old or older. (21 in AL, MS,
                  NE or WY)?</span></font></td>
                </tr>
                <tr>
                  <td width="50%">
                  <p align="right"><font face="Verdana">
                  <input type="radio" value="ofage" name="age"><font size="2"> Yes</font></font></td>
                  <td width="50%"><font face="Verdana">
                  <input type="radio" value="underage" checked name="age"><font size="2">
                  No</font></font></td>
                </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber12" height="18">
                <tr>
                  <td width="100%" colspan="2" height="21">
                  <p align="center"><font face="Verdana" size="1">You must Agree
                  with the Service Agreement and Polices to open a service contract</font></td>
                </tr>
                <tr>
                  <td width="50%" height="12">
                  <p align="right">

                      <font size="1" face="Verdana">
                      <input type="radio" name="agree" value="I_agree">
                      Agree   </font></td>
                  <td width="50%" height="12">
                      <font size="1" face="Verdana">
                      <input type="radio" name="agree" value="I_disagree"> Disagree</font></td>
                </tr>

                <tr>
                  <td width="100%" height="1" colspan="2">
    <p align="center">
                  </td>
                </tr>
              </table>
              </td>

            </tr>
            <tr>
              <td width="100%" height="66" align="center">
         <div id="DIV1" style="display:none">
         <img src='images/loading.gif' width="220" height="34" />
            <br><b><font color="#FF0000" face="Verdana">Please wait processing your order.....</font>
             </div>
             
             
             
              </td>

            </tr>
            <tr>
              <td width="100%" height="27">
              <p align="center">
              <input type="submit" value="Checkout" name="B1"  OnClick="return Checkcc_number(this.form)" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px">     <input type="reset" value="Reset" name="B2" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></td>
            </tr>
            <tr>
              <td width="100%" height="27">
        <p align="right"><font face="Verdana" size="2"><b>
        Service Agreement and Policies</b></font></td>
            </tr>
            </table>
          </center>

    </form>
    </body>

    </html>
    0
     
    LVL 5

    Expert Comment

    by:Hammadian2
    this is not the code u sent above
    checkcc_number() should return false on all cases not matching the ones u want (which is the case with the original code)

    in the original code it's written:

    if (form.cc_number.value.length == 0) {
    alert("Please enter a Card Number.");
    form.cc_number.focus();
    return false;
    }
    if (form.expdate_year.value.length == 0) {
    alert("Please enter the Expiration Year.");
    form.expdate_year.focus();
    return false;
    }


    now u'r asking about:


    if (form.cc_number.value.length == 0) {
    alert("Please enter a Card Number.");
    form.cc_number.focus();
    return;
    }
    if (form.expdate_year.value.length == 0) {
    alert("Please enter the Expiration Year.");
    form.expdate_year.focus();
    return;
    }


    it's not the same !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    here is where i got it from :
    http://javascript.internet.com/forms/val-credit-card.html


    I added the false...to try to make it stop form submit....take the above code and see what i mean...even though it shows the credit card errors it still submits...
    0
     
    LVL 5

    Expert Comment

    by:Hammadian2
    so just put those return false

    and in the end of the function add "return true"

    and in the onclick of the submit button add the word "return" before the function call
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    no it doesnt?

    if it did i wouldnt be asking for help?

    please take the code and try? thanks
    0
     
    LVL 5

    Expert Comment

    by:Hammadian2
    so here we go again

    the problem is that u added an option to the cards types and called it "Select card type" and made it the selected option
    this wasnt the case with the original code

    so to solve this
    u'll have to do one of 2 things:

    1. return to the original code

    <select name='cc_type' onchange='if (this.selectedIndex != 0 ) swapEm(this.selectedIndex)'>
    <option value="MasterCard">MasterCard

    instead of:
                   <select name='cc_type' onchange='if (this.selectedIndex != 0 ) swapEm(this.selectedIndex)'>
                        <option selected>Select Card Type</option>
                        <option value="MasterCard">MasterCard

    and i recommend this solution

    2. modify the checkcc_number function as follows:

    replace:

    var retval = eval(card + ".checkCardNumber(\"" + form.CardNumber.value +
    "\", " + tmpyear + ", " + tmpmonth + ");");

    with:

    var retval = "";
    if (card != "")
     retval = eval(card + ".checkcc_number(\"" + form.cc_number.value + "\", " + tmpyear + ", " + tmpmonth + ");");



    I just want you to know that ur code took much time from me :)
    I'm doing it mainly for my own pleasure, but i'm getting bored now :)
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    i did the top thing didnt work...it still shows the card error then submits. you can even put www.msn.com as the form method and what iot show the error than submit
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    ok also did the bottom one....no go...
    0
     
    LVL 5

    Accepted Solution

    by:
    working here
    here's the full code



    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title></title>
    <style>
    <!--
    .medium{
                   font-size:7pt;
                font-weight:normal;
                font-style:normal;
                color:5F5F5F;
                font-family:verdana,helvetica,arial;  
                line-height:10pt;        
                   }

    -->
    </style>
    </head>

    <body>

    <script language="javascript">
    <!--
    var message="";

    function clickIE4(){
    if (event.button==2){
    //alert(message);
    return false;
    }
    }

    function clickNS4(e){
    if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
    //alert(message);
    return false;
    }
    }
    }

    if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
    }
    else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
    }

    document.oncontextmenu=new Function("return false")


    // -->
    </script>

    <script>

    function submitonce(theform){
    //if IE 4+ or NS 6+
    if (document.all||document.getElementById){
    //screen thru every element in the form, and hunt down "submit" and "reset"
    for (i=0;i<theform.length;i++){
    var tempobj=theform.elements[i]
    if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
    //disable em
    tempobj.disabled=true
    }
    }
    }
    </script>

    <script type="text/javascript" language="javascript">
    function swapEm(ndx)
    {
      var theSource = theSource2 = ""
      var theText = ""
      switch (ndx)
      {
      case 0:
           theSource = "images/blankimage.gif";
           theSource2 = "images/blankimage.gif";
           theText = ""
           break;
         case 1:
           theSource = "images/icon_visa.gif";
           theSource2 = "images/visaverification.gif";
           theText = "(On the back of your card, locate the final 3 digit number)"
           break;
         case 2:
           theSource = "images/icon_mastercard.gif";
           theSource2 = "images/mastercardverification.gif";
           theText = "(On the back of your card, locate the final 3 digit number)"
           break;
         case 3:
           theSource = "images/icon_discover.gif";
           theSource2 = "images/discoververification.gif";
           theText = "(On the back of your card, locate the final 3 digit number)"
           break;
         case 4:
           theSource = "images/icon_amex.gif";
           theSource2 = "images/amexverification.gif";
           theText = "(On the front of your card, locate the final 4 digit number)"
           break;
       }
       document.images['cardImg1'].src = theSource;
       document.images['cardImg2'].src = theSource2;
       document.getElementById('imgText').innerHTML = theText

     

    }
    </script>

    <script type="text/javaScript">  

      function checkCheckBox(){  
        if(!document.getElementsByName('agree')[0].checked) {  
          alert("You must Agree with the Service Agreement and Polices to open a service contract\nPlease select AGREE on the form to continue")  
           return false;
        }  
          document.getElementById("DIV1").style.display = "";  
          //document.getElementById("B1").disabled = true;
          return true;
      }

    </script>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    var Cards = new makeArray(8);
    Cards[0] = new cc_type("MasterCard", "51,52,53,54,55", "16");
    var MasterCard = Cards[0];
    Cards[1] = new cc_type("VisaCard", "4", "13,16");
    var VisaCard = Cards[1];
    Cards[2] = new cc_type("AmExCard", "34,37", "15");
    var AmExCard = Cards[2];
    Cards[3] = new cc_type("DinersClubCard", "30,36,38", "14");
    var DinersClubCard = Cards[3];
    Cards[4] = new cc_type("DiscoverCard", "6011", "16");
    var DiscoverCard = Cards[4];
    Cards[5] = new cc_type("enRouteCard", "2014,2149", "15");
    var enRouteCard = Cards[5];
    Cards[6] = new cc_type("JCBCard", "3088,3096,3112,3158,3337,3528", "16");
    var JCBCard = Cards[6];
    var LuhnCheckSum = Cards[7] = new cc_type();

    /*************************************************************************\
    Checkcc_number(form)
    function called when users click the "check" button.
    \*************************************************************************/
    function Checkcc_number(form) {
    var tmpyear;
    if (form.cc_number.value.length == 0) {
    alert("Please enter a Card Number.");
    form.cc_number.focus();
    return false;
    }
    if (form.expdate_year.value.length == 0) {
    alert("Please enter the Expiration Year.");
    form.expdate_year.focus();
    return false;
    }
    if (form.expdate_year.value > 96)
    tmpyear = "19" + form.expdate_year.value;
    else if (form.expdate_year.value < 21)
    tmpyear = "20" + form.expdate_year.value;
    else {
    alert("The Expiration Year is not valid.");
    return false;
    }
    tmpmonth = form.expdate_month.options[form.expdate_month.selectedIndex].value;

    // The following line doesn't work in IE3, you need to change it
    // to something like "(new cc_type())...".
    // if (!cc_type().isExpiryDate(tmpyear, tmpmonth)) {
    if (!(new cc_type()).isExpiryDate(tmpyear, tmpmonth)) {
    alert("This card has already expired.");
    return false;
    }
    card = form.cc_type.options[form.cc_type.selectedIndex].value;

    var retval = "";
    if (card != "")
     retval = eval(card + ".checkcc_number(\"" + form.cc_number.value + "\", " + tmpyear + ", " + tmpmonth + ");");

    cardname = "";

    if (retval);

    // comment this out if used on an order form
    //alert("This card number appears to be valid.");

    else {
    // The cc_number has the valid luhn checksum, but we want to know which
    // cc_type it belongs to.
    for (var n = 0; n < Cards.size; n++) {

    if (Cards[n].checkcc_number(form.cc_number.value, tmpyear, tmpmonth)) {
    cardname = Cards[n].getcc_type();
    break;
       }
    }
    if (cardname.length > 0) {
    alert("This looks like a " + cardname + " number, not a " + card + " number.");
    return false;
    }
    else {
    alert("This card number is not valid.");
    return false;
          }
       }
    }
    /*************************************************************************\
    Object cc_type([String cc_type, String rules, String len, int year,
                                            int month])
    cc_type    : type of card, eg: MasterCard, Visa, etc.
    rules       : rules of the cc_number, eg: "4", "6011", "34,37".
    len         : valid length of cc_number, eg: "16,19", "13,16".
    year        : year of expiry date.
    month       : month of expiry date.
    eg:
    var VisaCard = new cc_type("Visa", "4", "16");
    var AmExCard = new cc_type("AmEx", "34,37", "15");
    \*************************************************************************/
    function cc_type() {
    var n;
    var argv = cc_type.arguments;
    var argc = cc_type.arguments.length;

    this.objname = "object cc_type";

    var tmpcc_type = (argc > 0) ? argv[0] : "CardObject";
    var tmprules = (argc > 1) ? argv[1] : "0,1,2,3,4,5,6,7,8,9";
    var tmplen = (argc > 2) ? argv[2] : "13,14,15,16,19";

    this.setcc_number = setcc_number;  // set cc_number method.
    this.setcc_type = setcc_type;  // setcc_type method.
    this.setLen = setLen;  // setLen method.
    this.setRules = setRules;  // setRules method.
    this.setExpiryDate = setExpiryDate;  // setExpiryDate method.

    this.setcc_type(tmpcc_type);
    this.setLen(tmplen);
    this.setRules(tmprules);
    if (argc > 4)
    this.setExpiryDate(argv[3], argv[4]);

    this.checkcc_number = checkcc_number;  // checkcc_number method.
    this.getExpiryDate = getExpiryDate;  // getExpiryDate method.
    this.getcc_type = getcc_type;  // getcc_type method.
    this.iscc_number = iscc_number;  // iscc_number method.
    this.isExpiryDate = isExpiryDate;  // isExpiryDate method.
    this.luhnCheck = luhnCheck;// luhnCheck method.
    return this;
    }

    /*************************************************************************\
    boolean checkcc_number([String cc_number, int year, int month])
    return true if cc_number pass the luhncheck and the expiry date is
    valid, else return false.
    \*************************************************************************/
    function checkcc_number() {
    var argv = checkcc_number.arguments;
    var argc = checkcc_number.arguments.length;
    var cc_number = (argc > 0) ? argv[0] : this.cc_number;
    var year = (argc > 1) ? argv[1] : this.year;
    var month = (argc > 2) ? argv[2] : this.month;

    this.setcc_number(cc_number);
    this.setExpiryDate(year, month);

    if (!this.iscc_number())
    return false;
    if (!this.isExpiryDate())
    return false;

    return true;
    }
    /*************************************************************************\
    String getcc_type()
    return the cc_type.
    \*************************************************************************/
    function getcc_type() {
    return this.cc_type;
    }
    /*************************************************************************\
    String getExpiryDate()
    return the expiry date.
    \*************************************************************************/
    function getExpiryDate() {
    return this.month + "/" + this.year;
    }
    /*************************************************************************\
    boolean iscc_number([String cc_number])
    return true if cc_number pass the luhncheck and the rules, else return
    false.
    \*************************************************************************/
    function iscc_number() {
    var argv = iscc_number.arguments;
    var argc = iscc_number.arguments.length;
    var cc_number = (argc > 0) ? argv[0] : this.cc_number;
    if (!this.luhnCheck())
    return false;

    for (var n = 0; n < this.len.size; n++)
    if (cc_number.toString().length == this.len[n]) {
    for (var m = 0; m < this.rules.size; m++) {
    var headdigit = cc_number.substring(0, this.rules[m].toString().length);
    if (headdigit == this.rules[m])
    return true;
    }
    return false;
    }
    return false;
    }

    /*************************************************************************\
    boolean isExpiryDate([int year, int month])
    return true if the date is a valid expiry date,
    else return false.
    \*************************************************************************/
    function isExpiryDate() {
    var argv = isExpiryDate.arguments;
    var argc = isExpiryDate.arguments.length;

    year = argc > 0 ? argv[0] : this.year;
    month = argc > 1 ? argv[1] : this.month;

    if (!isNum(year+""))
    return false;
    if (!isNum(month+""))
    return false;
    today = new Date();
    expiry = new Date(year, month);
    if (today.getTime() > expiry.getTime())
    return false;
    else
    return true;
    }

    /*************************************************************************\
    boolean isNum(String argvalue)
    return true if argvalue contains only numeric characters,
    else return false.
    \*************************************************************************/
    function isNum(argvalue) {
    argvalue = argvalue.toString();

    if (argvalue.length == 0)
    return false;

    for (var n = 0; n < argvalue.length; n++)
    if (argvalue.substring(n, n+1) < "0" || argvalue.substring(n, n+1) > "9")
    return false;

    return true;
    }

    /*************************************************************************\
    boolean luhnCheck([String cc_number])
    return true if cc_number pass the luhn check else return false.
    Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
    \*************************************************************************/
    function luhnCheck() {
    var argv = luhnCheck.arguments;
    var argc = luhnCheck.arguments.length;

    var cc_number = argc > 0 ? argv[0] : this.cc_number;

    if (! isNum(cc_number)) {
    return false;
      }

    var no_digit = cc_number.length;
    var oddoeven = no_digit & 1;
    var sum = 0;

    for (var count = 0; count < no_digit; count++) {
    var digit = parseInt(cc_number.charAt(count));
    if (!((count & 1) ^ oddoeven)) {
    digit *= 2;
    if (digit > 9)
    digit -= 9;
    }
    sum += digit;
    }
    if (sum % 10 == 0)
    return true;
    else
    return false;
    }

    /*************************************************************************\
    ArrayObject makeArray(int size)
    return the array object in the size specified.
    \*************************************************************************/
    function makeArray(size) {
    this.size = size;
    return this;
    }

    /*************************************************************************\
    cc_type setcc_number(cc_number)
    return the cc_type object.
    \*************************************************************************/
    function setcc_number(cc_number) {
    this.cc_number = cc_number;
    return this;
    }

    /*************************************************************************\
    cc_type setcc_type(cc_type)
    return the cc_type object.
    \*************************************************************************/
    function setcc_type(cc_type) {
    this.cc_type = cc_type;
    return this;
    }

    /*************************************************************************\
    cc_type setExpiryDate(year, month)
    return the cc_type object.
    \*************************************************************************/
    function setExpiryDate(year, month) {
    this.year = year;
    this.month = month;
    return this;
    }

    /*************************************************************************\
    cc_type setLen(len)
    return the cc_type object.
    \*************************************************************************/
    function setLen(len) {
    // Create the len array.
    if (len.length == 0 || len == null)
    len = "13,14,15,16,19";

    var tmplen = len;
    n = 1;
    while (tmplen.indexOf(",") != -1) {
    tmplen = tmplen.substring(tmplen.indexOf(",") + 1, tmplen.length);
    n++;
    }
    this.len = new makeArray(n);
    n = 0;
    while (len.indexOf(",") != -1) {
    var tmpstr = len.substring(0, len.indexOf(","));
    this.len[n] = tmpstr;
    len = len.substring(len.indexOf(",") + 1, len.length);
    n++;
    }
    this.len[n] = len;
    return this;
    }

    /*************************************************************************\
    cc_type setRules()
    return the cc_type object.
    \*************************************************************************/
    function setRules(rules) {
    // Create the rules array.
    if (rules.length == 0 || rules == null)
    rules = "0,1,2,3,4,5,6,7,8,9";
     
    var tmprules = rules;
    n = 1;
    while (tmprules.indexOf(",") != -1) {
    tmprules = tmprules.substring(tmprules.indexOf(",") + 1, tmprules.length);
    n++;
    }
    this.rules = new makeArray(n);
    n = 0;
    while (rules.indexOf(",") != -1) {
    var tmpstr = rules.substring(0, rules.indexOf(","));
    this.rules[n] = tmpstr;
    rules = rules.substring(rules.indexOf(",") + 1, rules.length);
    n++;
    }
    this.rules[n] = rules;
    return this;
    }
    //  End -->
    </script>


    <form name="cds" action="orderform.php" method="post" onSubmit="checkCheckBox();submitonce(this);">
     <[SERVER FORM FIELDS]>

    <div align="center">
      <center>

    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="788" id="AutoNumber23" height="1098">
      <tr>
        <td width="280" height="24">
        <div align="center">
          <p align="left">




    <font size="1" face="Verdana">This transaction is processed on a
    <font color="#FF0000">secure server</font> through PayPal.</font></div>
        </td>
      </tr>
      <tr>
        <td width="280" height="19">&nbsp;</td>

      </tr>
      <tr>
        <td width="788" height="24" colspan="3">

        <div align="center">
          <center>
          <p>&nbsp;</p>
          </center>
        </div>
        </td>
      </tr>
      <tr>
        <td width="280" height="4"></td>
        <td width="508" height="4" colspan="2"></td>
      </tr>
      <tr>
        <td width="788" height="14" colspan="3"><b><font face="Verdana" size="2">Service Details</font></b></td>

      </tr>
      <tr>
        <td width="788" height="3" colspan="3"></td>

      </tr>
      <tr>
        <td width="788" height="1" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber34">
          <tr>
            <td width="35%"><font face="Verdana" size="2">Select Username</font></td>
            <td width="65%">

                <font face="Verdana" size="1">
                <input type="text" name="username" size="29" ></font></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="788" height="1" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber35">
          <tr>
            <td width="35%"><font face="Verdana" size="2">Select Password</font></td>
            <td width="65%">

                <font face="Verdana" size="1">
                <input type="text" name="password" size="29" ></font></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="788" height="2" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber36">
          <tr>
            <td width="35%"><font face="Verdana" size="2">Confirm Password</font></td>
            <td width="65%">

                <font face="Verdana" size="1">
                <input type="text" name="confirmpassword" size="29" ></font></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="788" height="6" colspan="3">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="788" id="AutoNumber29">
          <tr>
            <td width="279"><font face="Verdana" size="2">How
        was our service?</font></td>
            <td width="509">
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber30" height="1">
                    <tr>

                      <td width="25%" height="1">
                      <input type="radio" value="excellent_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px" checked><font size="1" face="Verdana">
                      Excellent</font></td>
                      <td width="25%" height="1">
                      <input type="radio" value="good_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      Good</font></td>
                      <td width="25%" height="1">
                      <input type="radio" value="average_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">

                      Average</font></td>
                      <td width="25%" height="1">
                      <input type="radio" value="poor_service" name="srating" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      Poor</font></td>
                    </tr>
                  </table>
                  </td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="280" height="1"></td>
        <td width="508" height="1" colspan="2"></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2">Current/Desired Url</font></td>
        <td width="508" height="22" colspan="2">

                <font face="Verdana" size="1">
                <input type="text" name="surl" size="29" ></font></td>
      </tr>
      <tr>
        <td width="280" height="96"></td>
        <td width="508" height="96" colspan="2">
                 <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber11" height="78">
                    <tr>
                      <td width="100%" colspan="2" height="16">

                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" size="2">Logon information for web host
                      server.</font></p>
                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" color="#FF6666" style="font-size: 7pt; font-weight: 700">
                      If you don't have or know this, just skip.</font></p>
                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" color="#FF6666" style="font-size: 7pt; font-weight: 700">
                      If we already have this information, no need to re-enter</font></p>

                      <p style="margin-top: 0; margin-bottom: 0">
                      <font face="Verdana" size="1">(Blank will not perform any
                      unauthorized changes/services to your website)</font></td>
                    </tr>
                    <tr>
                      <td width="28%" height="20"><font face="Verdana" size="2"><b>Username</b> :
                      </font> </td>
                      <td width="72%" height="20">

                <font face="Verdana" size="1">
                <input type="text" name="suname" size="16" ></font></td>
                    </tr>
                    <tr>
                      <td width="28%" height="22"><font face="Verdana" size="2"><b>Password</b> :
                      </font> </td>
                      <td width="72%" height="22">
                <font face="Verdana" size="1">

                <input type="text" name="spwd" size="16" ></font></td>
                    </tr>
                  </table>
                  </td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="11"><font face="Verdana" size="2">Instant Messenger
        Contact Information</font></td>
        <td width="508" height="11" colspan="2">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber27">
          <tr>
            <td width="20%">
            <p align="left">
                    <select name="im_choice">
                      <option value="msn">MSN</option>
                      <option value="aol">Aol</option>
                      <option value="yahoo">Yahoo</option>
                      <option>ICQ</option>

                    </select></td>
            <td width="80%">
                <font face="Verdana" size="1">

                <input type="text" name="im_name" size="25" ></font></td>
          </tr>
        </table>
        </td>
      </tr>

      <tr>
        <td width="280" height="11"><font face="Verdana" size="2">Secondary Email</font></td>
        <td width="508" height="11" colspan="2">
        <input type="text" name="secondary_email" id="email0" maxlength="64" value="" size="30"></td>
      </tr>
      <tr>
        <td width="788" colspan="3" height="73"><font face="Verdana" size="2">Please enter the following information exactly as it appears on your credit card statement and click <span class="ppem106">Continue Checkout</span> below. Your financial information will be kept secure.
        </font>
        <p> <font face="Verdana" size="2"> <span class="ppsmalltext">How does CDS keep my information safe?</a></span></font></td>

      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>
      <tr>
        <td width="280" height="35"><font face="Verdana" size="2" color="#008000">Card Type</font></td>
        <td width="508" height="35" colspan="2">

                   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber26" height="35">
                  <tr>
                    <td width="24%" height="35">
                   <font face="Verdana">
                   <select name='cc_type' onchange='if (this.selectedIndex != 0 ) swapEm(this.selectedIndex)'>
                        <option selected>Select Card Type</option>
                        <option value="MasterCard">MasterCard
                        <option value="VisaCard">Visa
                        <option value="AmExCard">American Express
                        <option value="DiscoverCard">Discover
                   <!--<option value="DinersClubCard">Diners Club
                        <option value="enRouteCard">enRoute
                        <option value="JCBCard">JCB -->
                   </select></font></td>
                    <td width="76%" height="35">
                    <img name="cardImg1" src="images/blankimage.gif" width="39" height="26"></td>
                  </tr>
                </table>
        </td>
      </tr>

      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Credit Card Number</font></td>
        <td width="508" height="22" colspan="2"><font face="Verdana"><input size="30" maxlength="19" type="text" name="cc_number" id="cc_number" value=""></font></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000"><label for="expdate_month">Expiration Date</label></font></td>
        <td width="62" height="22">
                   <font face="Verdana">

                   <SELECT name="expdate_month" id="expdate_month">
                        <OPTION value="1" >01
                        <OPTION value="2" >02
                        <OPTION value="3" >03
                        <OPTION value="4" >04
                        <OPTION value="5" >05
                        <OPTION value="6" >06
                        <OPTION value="7" >07
                        <OPTION value="8" >08
                        <OPTION value="9" >09
                        <OPTION value="10" >10
                        <OPTION value="11" >11
                        <OPTION value="12" >12
                   </SELECT></font></td>
        <td width="446" height="22">

                   <font face="Verdana">
                   <SELECT name="expdate_year">
                        <OPTION value="04" >2004
                        <OPTION value="05" >2005
                        <OPTION value="06" >2006
                        <OPTION value="07" >2007
                        <OPTION value="08" >2008
                        <OPTION value="09" >2009
                        <OPTION value="10" >2010
                        <OPTION value="11" >2011
                        <OPTION value="12" >2012
                   </SELECT></font></td>
      </tr>

      <tr>
        <td width="280" height="56"><font face="Verdana" size="2" color="#008000"><label for="cvv2_number">Card Verification <br>
        Number</label>:</font></td>
        <td width="508" height="56" colspan="2">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber25" height="52">
          <tr>
            <td width="9%" height="52">

        <font face="Verdana">
        <input size="5" maxlength="19" type="text" name="cc_vnumber" id="cc_number0" value=""></font></td>
            <td width="11%" height="52">
            <img name="cardImg2" src="images/blankimage.gif" width="51" height="31">
            <font face="Verdana" size="2"><br></font></td>
            <td width="80%" height="52"><div id='imgText'></div></td>
          </tr>
        </table>
        </td>

      </tr>
      <tr>
        <td width="280" height="32"><font face="Verdana" size="2" color="#008000">First Name <label for="first_name"><span class="ppsmalltext">(as it appears on card)</span></label></font></td>
        <td width="508" height="32" colspan="2"><font face="Verdana"><input size="30" maxlength="32" type="text" name="fname" id="first_name" value=""></font></td>
      </tr>
      <tr>
        <td width="280" height="32"><font face="Verdana" size="2" color="#008000">Last Night <span class="ppsmalltext">(as it appears on card)</span></font></td>

        <td width="508" height="32" colspan="2"><input size="30" maxlength="32" type="text" name="lname" id="last_name" value=""></td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>
      <tr>
        <td width="788" height="32" colspan="3"><font face="Verdana" size="2">
        <font color="#008000"><b>Email Address</b></font> - CDS will use your email address to send you a receipt of this transaction
        and to communicate. Your email address will be kept private and will not be shared.</font></td>

      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2">Email Address</font></td>
        <td width="508" height="22" colspan="2"><input type="text" name="email" id="email" maxlength="64" value="" size="30"></td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>

      </tr>
      <tr>
        <td width="788" height="18" colspan="3"><font face="Verdana" size="2">
        <font color="#008000"><b>Credit Card Billing Address</b></font> - Enter the address where you receive your credit card bills.</font></td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>

      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Address 1</font></td>
        <td width="508" height="22" colspan="2">
                        <input type='text' name="address1" id="address1" value="" size='25' maxlength='100' class="address"></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Address 2</font></td>

        <td width="508" height="22" colspan="2">
                        <input type='text' name="address2" id="address2" value="" size='25' maxlength='100' class="address"></td>
      </tr>
      <tr>
        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">City</font></td>
        <td width="508" height="22" colspan="2">
                        <input type='text' name="city" id="city" value="" size='25' maxlength='40' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="23"><font face="Verdana" size="2" color="#008000">State</font></td>
        <td width="508" height="23" colspan="2">
                        <select name="state" id="state">
                             <option value>
                             <option value="AK" >AK
                             <option value="AL" >AL
                             <option value="AR" >AR
                             <option value="AZ" >AZ
                             <option value="CA" >CA
                             <option value="CO" >CO
                             <option value="CT" >CT
                             <option value="DC" >DC
                             <option value="DE" >DE
                             <option value="FL" >FL
                             <option value="GA" >GA
                             <option value="HI" >HI
                             <option value="IA" >IA
                             <option value="ID" >ID
                             <option value="IL" >IL
                             <option value="IN" >IN
                             <option value="KS" >KS
                             <option value="KY" >KY
                             <option value="LA" >LA
                             <option value="MA" >MA
                             <option value="MD" >MD
                             <option value="ME" >ME
                             <option value="MI" >MI
                             <option value="MN" >MN
                             <option value="MO" >MO
                             <option value="MS" >MS
                             <option value="MT" >MT
                             <option value="NC" >NC
                             <option value="ND" >ND
                             <option value="NE" >NE
                             <option value="NH" >NH
                             <option value="NJ" >NJ
                             <option value="NM" >NM
                             <option value="NV" >NV
                             <option value="NY" >NY
                             <option value="OH" >OH
                             <option value="OK" >OK
                             <option value="OR" >OR
                             <option value="PA" >PA
                             <option value="RI" >RI
                             <option value="SC" >SC
                             <option value="SD" >SD
                             <option value="TN" >TN
                             <option value="TX" >TX
                             <option value="UT" >UT
                             <option value="VA" >VA
                             <option value="VT" >VT
                             <option value="WA" >WA
                             <option value="WI" >WI
                             <option value="WV" >WV
                             <option value="WY" >WY
                             <option value="AA" >AA
                             <option value="AE" >AE
                             <option value="AP" >AP
                             <option value="AS" >AS
                             <option value="PR" >PR
                             <option value="FM" >FM
                             <option value="GU" >GU
                             <option value="MH" >MH
                             <option value="MP" >MP
                             <option value="PW" >PW
                             <option value="VI" >VI
                        </select>
                   </td>
      </tr>
      <tr>
        <td width="280" height="23"><font face="Verdana" size="2" color="#008000">Zip Code</font></td>
        <td width="508" height="23" colspan="2">
                        <input type="text" name="zip" id="zip" value="" size="10" maxlength="10" class="zip">
        (5 or 9 Digits)</td>
      </tr>
      <tr>

        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"></td>
      </tr>
      <tr>
        <td width="788" height="48" colspan="3"><font face="Verdana" size="2">
        <font color="#008000"><b>Phone Number</b></font> - Enter the phone number you use for billing contact on this credit card. This information will be kept confidential, and will only be used to authorize this payment or to provide customer service. CDS will not share your phone number.</font></td>
      </tr>
      <tr>

        <td width="280" height="22"><font face="Verdana" size="2" color="#008000">Home Phone</font></td>
        <td width="508" height="22" colspan="2">
                        <input type='text' name="phone" id="city0" value="" size='25' maxlength='40' class="address"></td>
      </tr>
      <tr>
        <td width="280" height="9"></td>
        <td width="508" height="9" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="2"><b><font face="Verdana" size="2">Shipping
        Information -</font></b>:</td>
        <td width="508" height="2" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="2"></td>
        <td width="508" height="2" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">Address 1</font></td>
        <td width="508" height="1" colspan="2">
                        <input type='text' name="shipping_address" id="address4" value="" size='25' maxlength='100' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">Address 2</font></td>
        <td width="508" height="1" colspan="2">
                        <input type='text' name="shipping_address2" id="address3" value="" size='25' maxlength='100' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">City</font></td>
        <td width="508" height="1" colspan="2">
                        <input type='text' name="shipping_city" id="city1" value="" size='25' maxlength='40' class="address"></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">State</font></td>
        <td width="508" height="1" colspan="2">
                        <select name="shipping_state" id="state0">
                             <option value>
                             <option value="AK" >AK
                             <option value="AL" >AL
                             <option value="AR" >AR
                             <option value="AZ" >AZ
                             <option value="CA" >CA
                             <option value="CO" >CO
                             <option value="CT" >CT
                             <option value="DC" >DC
                             <option value="DE" >DE
                             <option value="FL" >FL
                             <option value="GA" >GA
                             <option value="HI" >HI
                             <option value="IA" >IA
                             <option value="ID" >ID
                             <option value="IL" >IL
                             <option value="IN" >IN
                             <option value="KS" >KS
                             <option value="KY" >KY
                             <option value="LA" >LA
                             <option value="MA" >MA
                             <option value="MD" >MD
                             <option value="ME" >ME
                             <option value="MI" >MI
                             <option value="MN" >MN
                             <option value="MO" >MO
                             <option value="MS" >MS
                             <option value="MT" >MT
                             <option value="NC" >NC
                             <option value="ND" >ND
                             <option value="NE" >NE
                             <option value="NH" >NH
                             <option value="NJ" >NJ
                             <option value="NM" >NM
                             <option value="NV" >NV
                             <option value="NY" >NY
                             <option value="OH" >OH
                             <option value="OK" >OK
                             <option value="OR" >OR
                             <option value="PA" >PA
                             <option value="RI" >RI
                             <option value="SC" >SC
                             <option value="SD" >SD
                             <option value="TN" >TN
                             <option value="TX" >TX
                             <option value="UT" >UT
                             <option value="VA" >VA
                             <option value="VT" >VT
                             <option value="WA" >WA
                             <option value="WI" >WI
                             <option value="WV" >WV
                             <option value="WY" >WY
                             <option value="AA" >AA
                             <option value="AE" >AE
                             <option value="AP" >AP
                             <option value="AS" >AS
                             <option value="PR" >PR
                             <option value="FM" >FM
                             <option value="GU" >GU
                             <option value="MH" >MH
                             <option value="MP" >MP
                             <option value="PW" >PW
                             <option value="VI" >VI
                        </select></td>
      </tr>

      <tr>
        <td width="280" height="0"><font face="Verdana" size="2">Zip Code</font></td>
        <td width="508" height="0" colspan="2">
                        <input type="text" name="shipping_zip" id="zip0" value="" size="10" maxlength="10" class="zip">
        (5 or 9 Digits)</td>
      </tr>

      <tr>
        <td width="280" height="0"><font face="Verdana" size="2">Shipping
        Instructions/comments :</font></td>
        <td width="508" height="0" colspan="2">
        <textarea name="shipping_instructions" cols="50" rows="5"></textarea></td>
      </tr>

      <tr>
        <td width="280" height="0">&nbsp;</td>
        <td width="508" height="0" colspan="2">&nbsp;</td>
      </tr>

      <tr>
        <td width="280" height="1">
                  <font face="Verdana" size="2"><b>Half</b> of Contract Amount :</font></td>
        <td width="508" height="1" colspan="2">
                <font face="Verdana" size="1">
                <input type="text" name="half_amount" size="8" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></font></td>
      </tr>

      <tr>
        <td width="280" height="27">
                  <p style="margin-top: 0; margin-bottom: 0">
                  <b><font face="Verdana" size="2">Total</font></b><font face="Verdana" size="2">
                  Contract Amount </font></p>
                  </td>

        <td width="508" height="27" colspan="2">
                <font face="Verdana" size="1">
                <input type="text" name="amount" size="8" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></font></td>
      </tr>

      <tr>
        <td width="280" height="28">
                  <font face="Verdana" size="2">Auto Debit</font></td>

        <td width="508" height="28" colspan="2">
                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber28">
                  <tr>
                    <td width="23%"><font face="Verdana">
                    <input type="radio" value="auto_debit_yes" name="auto_debit"><font size="2">
                    Yes</font></font></td>
                    <td width="77%"><font face="Verdana">
                    <input type="radio" value="auto_debit_no" checked name="auto_debit"><font size="2">
                    No</font></font></td>
                  </tr>
                </table>
        </td>
      </tr>
      <tr>
        <td width="280" height="18"></td>
        <td width="508" height="18" colspan="2"><font face="Verdana" size="2">
        Service Comments</font></td>

      </tr>
      <tr>
        <td width="280" height="84"></td>
        <td width="508" height="84" colspan="2"><textarea name="note" cols="50" rows="5"></textarea></td>
      </tr>
      <tr>
        <td width="280" height="9"></td>
        <td width="508" height="9" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="5">
                  <font face="Verdana" size="2">Testimonials :</font></td>
        <td width="508" height="5" colspan="2">
        <textarea name="testimonials" cols="50" rows="5"></textarea></td>
      </tr>

      <tr>
        <td width="280" height="2"><font face="Verdana" size="2">How did you hear
        about us?</font></td>
        <td width="508" height="2" colspan="2">
                      <select name="how_did_you_hear_about_us" style="font-family: verdana,arial,helvetica; width: 330px; background-color: #cccccc; color: #000000; font-size: 12px; border:1px #968E86 dashed; padding:1px;">
                      <option value="not_specified">Not Specified</option>
                      <option value="google">Google</option>
                      <option value="yahoo">Yahoo</option>
                      <option value="aol">AOL</option>
                      <option value="altavista">Altavista</option>
                      <option value="other_search_engine">Other Search Engine</option>                                  
                      <option value="newspaper">Newspaper</option>
                      <option value="advertisement">Advertisement</option>                  
                      <option value="tv">TV</option>
                      <option value="radio">Radio</option>
                      <option value="Other">Other</option>                                    
                        </option>
                    </select></td>
      </tr>

      <tr>
        <td width="280" height="1"><font face="Verdana" size="2">Will you
                  use our services again?</font></td>
        <td width="508" height="1" colspan="2">
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="200" id="AutoNumber31">
                    <tr>
                      <td width="33%">
                      <input type="radio" value="yes_will_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px" checked><font size="1" face="Verdana">
                      Yes</font></td>
                      <td width="33%">
                      <input type="radio" value="no_will_not_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      No</font></td>

                      <td width="34%">
                      <input type="radio" value="might_use_services_again" name="on1" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"><font size="1" face="Verdana">
                      Maybe</font></td>
                    </tr>
                  </table>
                  </td>
      </tr>

      <tr>
        <td width="280" height="1"></td>
        <td width="508" height="1" colspan="2"></td>
      </tr>

      <tr>
        <td width="280" height="16"><font size="2" face="Verdana">The best
                  way to contact you?</font></td>
        <td width="508" height="16" colspan="2">
                    <select name="how_to_contact">
                      <option value="home_phone">Phone</option>
                      <option value="instant_messenager">IM</option>
                      <option value="mobile">Cell</option>
                      <option value="email" selected>Email</option>

                    </select></td>
      </tr>

      <tr>
        <td width="280" height="16"><font face="Verdana" size="2">Add me to the
        mailing list</font></td>
        <td width="508" height="16" colspan="2">
                    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber33" height="48">
                      <tr>
                        <td width="38%" height="48">
                        <p align="right"><font face="Verdana">
                  <input type="radio" value="addmetolist" name="mailist"><font size="2"> Yes,
                        please  </font></font></td>
                        <td width="62%" height="48"><font face="Verdana">
                  <input type="radio" value="dontaddmetolist" name="mailist"><font size="2"> No
                        thanks</font></font></td>
                      </tr>
                    </table>
        </td>
      </tr>
    </table>

      </center>
    </div>
    <div align="center">
      <center>
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750" id="AutoNumber22" height="195">
            <tr>
              <td width="100%" height="78">

              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber32">
                <tr>
                  <td width="100%" colspan="2">
                  <p align="center">
                  <font face="verdana,arial,helvetica" color="#5f5f5f" size="1">
                  <span class="medium">Are you 18 years old or older. (21 in AL, MS,
                  NE or WY)?</span></font></td>
                </tr>
                <tr>
                  <td width="50%">
                  <p align="right"><font face="Verdana">
                  <input type="radio" value="ofage" name="age"><font size="2"> Yes</font></font></td>
                  <td width="50%"><font face="Verdana">
                  <input type="radio" value="underage" checked name="age"><font size="2">
                  No</font></font></td>
                </tr>
              </table>
              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber12" height="18">
                <tr>
                  <td width="100%" colspan="2" height="21">
                  <p align="center"><font face="Verdana" size="1">You must Agree
                  with the Service Agreement and Polices to open a service contract</font></td>
                </tr>
                <tr>
                  <td width="50%" height="12">
                  <p align="right">

                      <font size="1" face="Verdana">
                      <input type="radio" name="agree" value="I_agree">
                      Agree   </font></td>
                  <td width="50%" height="12">
                      <font size="1" face="Verdana">
                      <input type="radio" name="agree" value="I_disagree"> Disagree</font></td>
                </tr>

                <tr>
                  <td width="100%" height="1" colspan="2">
    <p align="center">
                  </td>
                </tr>
              </table>
              </td>

            </tr>
            <tr>
              <td width="100%" height="66" align="center">
         <div id="DIV1" style="display:none">
         <img src='images/loading.gif' width="220" height="34" />
            <br><b><font color="#FF0000" face="Verdana">Please wait processing your order.....</font>
             </div>
             
             
             
              </td>

            </tr>
            <tr>
              <td width="100%" height="27">
              <p align="center">
              <input type="submit" value="Checkout" name="B1"  OnClick="return Checkcc_number(this.form)" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px">     <input type="reset" value="Reset" name="B2" style="background-color: #cccccc; color: #000000; border:1px dashed #968E86; padding:1px"></td>
            </tr>
            <tr>
              <td width="100%" height="27">
        <p align="right"><font face="Verdana" size="2"><b>
        Service Agreement and Policies</b></font></td>
            </tr>
            </table>
          </center>

    </form>
    </body>

    </html>
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    Hammadian2,

    good deal ...but now the last promt (must agree to terms) radio button checker...promts then forwards/submits without making them....which also means they dont get the submitting order image/text.

    THANK you VERY much for all your help...I tired and tired to fix this ...thanks
    0
     
    LVL 5

    Assisted Solution

    by:Hammadian2
    replace the line:

    <form name="cds" action="orderform.php" method="post" onSubmit="checkCheckBox();submitonce(this);">

    with:

    <form name="cds" action="orderform.php" method="post" onSubmit="if (checkCheckBox()) {submitonce(this);return true;} else return false;">


    i beleive u were asking about only the credit card problem
    hope we're over now anyway
    0
     
    LVL 2

    Author Comment

    by:Caiapfas
    I want to thank you for you time.
    It's experts like you that makes this place so great..
    I am very sorry it took so much of your time , sir =}
    0
     
    LVL 5

    Expert Comment

    by:Hammadian2
    thanks for the points
    anytime
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Title # Comments Views Activity
    sumDigits challenge 9 52
    dog bark java program 15 57
    How to copy an image file into clipboard C/C++? 1 95
    java constructor error 8 45
    INTRODUCTION We all know how to code. But at times you simply want to insert a common code block into your existing code and amend it as per your requirements. This tool not only saves you time but also saves you the pain of typing it all out aga…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now