Solved

help me modify a form validation function!! Thanx!

Posted on 1998-09-11
12
540 Views
Last Modified: 2008-03-06
i have form validation function that just makes sure that the fields are filed out. i want to add if the form is filled out to mave to the next section. i have a form broken down into different <div> tags. i'm making only one section appear at a time. i want the people who fill out the form to only be able to see the next section after the one they're on is filled out. here's the function:

/************ Form Validator Functions ************/

function checkvalues(form) {
       
        field=form.field.value;
        field=trim(field);
        form.field.value=field;

       
        if(field=="") {
                alert("You must enter a value for this field");
                return(false);
        } else {

                   if (validvalue(field,"abcdefghijklmnopqrstuvwxyz1234567890@.",0)) {
                                               
                        /* All okay so submit form */
                        document.example.submit();
                        return(true);
                } else {
       
                       
                        alert("Invalid characters found in field");
                        return(false);
                }
        }
}

function trim(value) {

        /* Strip leading spaces from input */
        startposn=0;
        while((value.charAt(startposn)==" ")&&(startposn<value.length)) {
                startposn++;
        }
        if(startposn==value.length) {
                value="";
        } else {
             
                value=value.substring(startposn,value.length);
                endposn=(value.length)-1;
                while(value.charAt(endposn)==" ") {
                        endposn--;
                }
                value=value.substring(0,endposn+1);
        }
        return(value);
}

//-->

here's the url:
http://theup-tick.com/trading/onlineAPP.html


you have to use a 4.0 browser to see it corectly.

THANX!!!
0
Comment
Question by:thesurvivor
  • 7
  • 5
12 Comments
 
LVL 5

Accepted Solution

by:
Trevor013097 earned 50 total points
ID: 1270740
Hi Jason,

How's it going?

What you could do would be to create a loop which goes through all the fields in the FORM.  Then if the field has been filled out then it sets a flag otherwise it does nothing.  Then when you finished the loop you do a quick check to see if the number of flags matches the number of fields, if it does go on to the next form (section) otherwise give an alert and tell them to fill in all the fields.  You could even have it flag for filled out but if it isn't then store the offending field name then at the end you could actually tell them which fields they have missed.

I haven't tested this code below but something along these lines should work.

function formChecker() {
  var theForm = document.yourForm;
  var totalFields = 9; // if there were 9 fields
  var fieldsFilled = 0; // sets the initialisation
  var fieldsMissed = "";

  for (i = 0; i < theForm.elements.length; i++) {
      if (theForm.elements[i].value != "") {
          fieldsFilled += 1;
      } else {
          fieldsMissed += theForm.elements[i].value + "\n";
      }
  }
  if (fieldsFilled == totalFields) {
      document.all.yourSection = the next section;  // Need to change to suit your needs
  } else {
      alert("You have missed the following fields:\n\n" + fieldsMissed);
  }
}


Hope that helps.

Trevor.


0
 

Author Comment

by:thesurvivor
ID: 1270741
i thank you very much. i don't think this will work, as is. i have like a  form broken down into many little forms. if you visit the url you can see what im talking about. i'm not really good at Js yet, so i don't think i would know the correct syntax for adding what i want in the function!
thanx!
0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1270742
Jason,

I'll have a look this evening and see if I can integrate it into your function and page.

Trevor.


0
 

Author Comment

by:thesurvivor
ID: 1270743
here's what i basicaly have in my source. i have a MainForm. which has only hidden fields. and about 8 other, smaller forms. each field in the smaller forms is made equal to a feild in the MainForm. it looks like this:
 <form name="MainForm">
<hidden>
<hidden>
<hidden>
<hidden>
 </form>

<div>
<form>
<input>
<input>
<input>
</form>
</div>

<div>
<form>
<input>
<input>
<input>
</form>
</div>

<div>
<form>
<input>
<input>
<input>
</form>
</div>

when i submit the form, i'm actually sending the MainForm. what i need the function to do is go through eaach form, validating each form's field. then, moving to the next "sub-form". i would like it to post the "please fill all fields" message after each "sub-form". then at the end have a subbmit MainForm.

thanx for your experteice and time!!
jason
0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1270744
Hi Jason,

okay.  I have integrated my formChecker function into your page and also altered the hide function so that you do not need 2 now.  We instead pass either "Section" or "title" to the function so that it knows what to hide.  Also there is now another function called nextSection which removes the need to call multiple functions from your <A HREF> tags for all the Section headings down the left hand side.  Instead we simply pass the previous forms object (so if we want to go to Section 2 we pass it document.Form1) and we also pass it the next Sections number (so if we want to go to Section 2 we pass it 2).

This now gives a much tidier and easier to understand code.

Here is the new code:

<HTML>
<HEAD>
<TITLE>The Dynamic Duo - Working With Forms Demo 2</TITLE>
<STYLE>

BODY {

background: white url(Uptickonline1.gif) no-repeat;  
}

logo {
font-family:    times;
font-size:      20px;
color:          #000000;
position:       absolute;
top:            110px;
left:           180px;
visibility:     visible;
z-index:        1;
}

bar {
font-family:  times;
color:        gold;
font-weight:  bold;
position:     absolute;
top:          110px;
left:         20px;
width:        100;
visibility:   visible;
}

barB {
font-family:  times;
color:        gold;
font-weight:  bold;
font-size:    20px;
position:     absolute;
top:          490px;
left:         98px;
width:        460;
visibility:   visible;
}

title {
font-size:      20px;
color:          #009900;
font-weight:    bold;
position:       absolute;
top:            65px;
left:           270px;
width:          400;
visibility:     hidden;
}

titleb {
font-size:      20px;
color:          #009900;
font-weight:    bold;
position:       absolute;
top:            65px;
left:           270px;
width:          400;
visibility:     visible;
}

log {
font-background: white;
font-family:     times;
font-size:       20px;
color:           #000000;
position:        absolute;
top:             120px;
left:            180px;
visibility:      hidden;
z-index:         2;
}

</STYLE>

<SCRIPT LANGUAGE="JavaScript">
<!--

/*************************************
Code in this document is copyright of
Dan Steinman of Industrial Dreams 1998
Available at The Dynamic Duo
http://www.dansteinman.com/dynduo/
*************************************/

function getRadioValue(radio_array) {            
  for (var i = 0; i < radio_array.length; ++i)
      if (radio_array[i].checked) {
          return radio_array[i].value;
      }
      return null;
  }

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function sendForm() {
      // target forms
      mainf = document.mainForm
      FormA = (ns4) ? document.Section1.document.Form1 : document.Form1
      FormB = (ns4) ? document.Section2.document.Form2 : document.Form2
      FormC = (ns4) ? document.Section3.document.Form3 : document.Form3
      FormD = (ns4) ? document.Section4.document.Form4 : document.Form4
      FormE = (ns4) ? document.Section5.document.Form5 : document.Form5
      FormF = (ns4) ? document.Section6.document.Form6 : document.Form6
      FormG = (ns4) ? document.Section7.document.Form7 : document.Form7
      FormH = (ns4) ? document.Section8.document.Form8 : document.Form8
      FormI = (ns4) ? document.Section9.document.Form9 : document.Form9
      
      
               //***** GLUE DATA *****//
        /*Form 1*/
      mainf.lastname.value = FormA.lastname.value
      mainf.firstname.value = FormA.firstname.value
      mainf.mi.value = FormA.mi.value
      mainf.dob_month.value = FormA.dob_month.value
      mainf.dob_day.value = FormA.dob_day.value
      mainf.dob_year.value = FormA.dob_year.value
      mainf.identifier.value = FormA.identifier.value
      mainf.phone1.value = FormA.phone1.value
      mainf.phone2.value = FormA.phone2.value
      mainf.email.value = FormA.email.value
      mainf.foreign.value = FormA.foreign.value
      
        /*Form 2*/
      mainf.address1.value = FormB.address1.value
        mainf.address2.value = FormB.address2.value
        mainf.city.value = FormB.city.value
        mainf.state.value = FormB.state.options[FormB.state.selectedIndex].value
        mainf.zip.value = FormB.zip.value
        mainf.alternate_mail.value = (FormB.alternate_mail.checked) ? "I will use a P.O. Box." : ""
       
        /*Form3*/
      mainf.printer.value = (FormC.printer[0].checked) ? FormC.printer[0].value : FormC.printer[1].value

        /*Form4*/
      mainf.type.value = getRadioValue(FormD.type)
        mainf.registration.value = getRadioValue(FormD.registration)
        mainf.authorized_trading.value = (FormD.authorized_trading.checked) ? "Do" : "Do not"

        /*Form5*/
      mainf.citizenship.value = getRadioValue(FormE.citizenship)
        mainf.country_citizenship.value = FormE.country_citizenship.options[FormE.country_citizenship.selectedIndex].value
      
        /*Form6*/
        mainf.ssn1.value = FormF.ssn1.value
        mainf.ssn2.value = FormF.ssn2.value
        mainf.ssn3.value = FormF.ssn3.value
        mainf.taxid1.value = FormF.taxid1.value
        mainf.taxid2.value = FormF.taxid2.value
        mainf.no_numbers.value = (FormF.no_numbers.checked) ? "I have neither a Social Security nor Tax Id number." : ""
       
      /*Form7*/
        mainf.occupation_e.value = FormG.occupation_e.value
        mainf.employer_e.value = FormG.employer_e.value
        mainf.address1_e.value = FormG.address1_e.value
        mainf.address2_e.value = FormG.address2_e.value
        mainf.city_e.value = FormG.city_e.value
        mainf.state_e.value = FormG.state_e.value
        mainf.zip_e.value = FormG.zip_e.value
        mainf.zap_e.value = FormG.zap_e.value
        mainf.selfemp_check_e.value = FormG.selfemp_check_e.value
       
        /*Form8*/
        mainf.affiliation1.value = FormH.affiliation1.value
        mainf.affiliation1_company.value = FormH.affiliation1_company.value
        mainf.affiliation1_address.value = FormH.affiliation1_address.value
        mainf.affiliation2.value = FormH.affiliation2.value
        mainf.affiliation2_company.value = FormH.affiliation2_company.value
        mainf.affiliation2_address.value = FormH.affiliation2_address.value

        /*Form 9*/
        mainf.transfer.value = (FormI.transfer.checked) ? "I have neither a Social Security nor Tax Id number." : ""
        mainf.securities.value = (FormI.securities.checked) ? "I have neither a Social Security nor Tax Id number." : ""
        mainf.wire.value = (FormI.wire.checked) ? "I have neither a Social Security nor Tax Id number." : ""

               //***** END GLUE DATA *****//        


      // ***** Submit Form ***** //
      mainf.submit()
}

   //-------------------------------------------------------------------------------
   // OnClick Form Expander
   //-------------------------------------------------------------------------------

      // show an object/element
      function showObject(object) {
        object.visibility = 'VISIBLE';
      }

      // hide an object/element
      function hideObject(divType, idx) {
        eval(divType + idx + ".visibility = 'HIDDEN';");
      }


   //-------------------------------------------------------------------------------
   // If the formChecker returns true then show next section and hide all others
   //-------------------------------------------------------------------------------

   function nextSection(curForm, num) {
     if (formChecker(curForm)) {
         showObject(eval("Section" + num));
         showObject(eval("title" + num));
         for (var i = 1; i < 11; i++) {
             if (i != num) {
                 hideObject('Section',i);
                 hideObject('title',i);
             }
         }
     }
   }

   //-------------------------------------------------------------------------------
   // Check to see if the relevant fields are completed before going on to
   // the next section
   //-------------------------------------------------------------------------------

   function formChecker(theForm) {
     var totalFields = theForm.elements.length;
     var fieldsFilled = 0; // sets the initialisation
     var fieldsMissed = "";

     for (i = 0; i < totalFields; i++) {
         if (theForm.elements[i].value != "") {
             fieldsFilled += 1;
         } else {
             fieldsMissed += theForm.elements[i].name + "\n";
         }
     }
     if (fieldsFilled == totalFields) {
         var validForm = true;
     } else {
         alert("You have missed the following fields:\n\n" + fieldsMissed);
         var validForm = false;
     }
     return validForm;
   }

//-->
</SCRIPT>

</HEAD>

<BODY TEXT="#000000"  LINK="#FFFF00" VLINK="#FFFF00" ALINK="#FFFF00">


<!----------**********  MAIN FORM DATA = (Form1-Form10)  **********---------->

<FORM NAME="mainForm" ACTION="./Application.cgi" METHOD="POST">

<!-- Form 1 data -->
<INPUT TYPE="Hidden" NAME="lastname">
<INPUT TYPE="Hidden" NAME="firstname">
<INPUT TYPE="Hidden" NAME="mi">
<INPUT TYPE="Hidden" NAME="dob_month">
<INPUT TYPE="Hidden" NAME="dob_day">
<INPUT TYPE="Hidden" NAME="dob_year">
<INPUT TYPE="Hidden" NAME="identifier">
<INPUT TYPE="Hidden" NAME="phone1">
<INPUT TYPE="Hidden" NAME="phone2">
<INPUT TYPE="Hidden" NAME="email">
<INPUT TYPE="Hidden" NAME="foreign">

<!-- Form 2 data -->
<INPUT TYPE="Hidden" NAME="address1">
<INPUT TYPE="Hidden" NAME="address2">
<INPUT TYPE="Hidden" NAME="city">
<INPUT TYPE="Hidden" NAME="state">
<INPUT TYPE="Hidden" NAME="zip">
<INPUT TYPE="Hidden" NAME="alternate_mail"><!-- jason, check end of form1 for hidden field .cgi -->

<!-- Form 3 data -->
<INPUT TYPE="Hidden" NAME="printer">

<!-- Form 4 data -->
<INPUT TYPE="Hidden" NAME="type">
<INPUT TYPE="Hidden" NAME="registration">
<INPUT TYPE="Hidden" NAME="authorized_trading">

<!-- Form 5 data -->
<INPUT TYPE="Hidden" NAME="citizenship">
<INPUT TYPE="Hidden" NAME="country_citizenship">

<!-- Form 6 data -->
<INPUT TYPE="Hidden" NAME="ssn1">
<INPUT TYPE="Hidden" NAME="ssn2">
<INPUT TYPE="Hidden" NAME="ssn3">
<INPUT TYPE="Hidden" NAME="taxid1">
<INPUT TYPE="Hidden" NAME="taxid2">
<INPUT TYPE="Hidden" NAME="taxid3">
<INPUT TYPE="Hidden" NAME="no_numbers">

<!-- Form 7 data -->
<INPUT TYPE="Hidden" NAME="occupation_e">
<INPUT TYPE="Hidden" NAME="employer_e">
<INPUT TYPE="Hidden" NAME="address1_e">
<INPUT TYPE="Hidden" NAME="address2_e">
<INPUT TYPE="Hidden" NAME="city_e">
<INPUT TYPE="Hidden" NAME="state_e">
<INPUT TYPE="Hidden" NAME="zip_e">
<INPUT TYPE="Hidden" NAME="zap_e">
<INPUT TYPE="Hidden" NAME="selfemp_check_e">

<!-- Form 8 data -->
<INPUT TYPE="hidden" NAME="affiliation1">
<INPUT TYPE="hidden" NAME="affiliation1_company">
<INPUT TYPE="hidden" NAME="affiliation1_address">
<INPUT TYPE="hidden" NAME="affiliation2">
<INPUT TYPE="hidden" NAME="affiliation2_company">
<INPUT TYPE="hidden" NAME="affiliation2_address">

<!-- Form 9 data -->
<INPUT TYPE="hidden" NAME="transfer">
<INPUT TYPE="hidden" NAME="securities">
<INPUT TYPE="hidden" NAME="wire">

</FORM>

<DIV CLASS="bar">
<A HREF="javascript:nextSection(document.Form1,1);">Section1</A>
<A HREF="javascript:nextSection(document.Form1,2);">Section2</A>
<A HREF="javascript:nextSection(document.Form2,3);">Section3</A>
<A HREF="javascript:nextSection(document.Form3,4);">Section4</A>
<A HREF="javascript:nextSection(document.Form4,5);">Section5</A>
<A HREF="javascript:nextSection(document.Form5,6);">Section6</A>
<A HREF="javascript:nextSection(document.Form6,7);">Section7</A>
<A HREF="javascript:nextSection(document.Form7,8);">Section8</A>
<A HREF="javascript:nextSection(document.Form8,9);">Section9</A>
<A HREF="javascript:nextSection(document.Form9,10);">Section10</A>
</DIV>    

<DIV ID="Section1" CLASS="logo">
<FORM NAME="Form1"><TABLE WIDTH=100% CELLPADDING=1 CELLSPACING=0 BORDER=0>

<TR>
      <TD>
      <FONT FACE="arial,helvetica" SIZE=1>
      Last Name
      </FONT><BR>
      <INPUT TYPE="text" NAME="lastname" VALUE="" SIZE=25 MAXLENGTH=30>      </TD>
      <TD>
      <FONT FACE="arial,helvetica" SIZE=1>
      First Name
            </FONT><BR>
<INPUT TYPE="text" NAME="firstname" VALUE="" SIZE=15 MAXLENGTH=20>      </TD>
      <TD>
      <FONT FACE="arial,helvetica" SIZE=1>
      M.I.
      </FONT><BR>
      <INPUT TYPE="text" NAME="mi" VALUE="" SIZE=2 MAXLENGTH=1>      </TD>
</TR>
<TR>
      <TD NOWRAP>
      <FONT FACE="arial,helvetica" SIZE=1>
      Date of Birth mm/dd/yyyy
      </FONT><BR>
      <INPUT TYPE="text" NAME="dob_month" VALUE="" SIZE=2 MAXLENGTH=2>
  /  <INPUT TYPE="text" NAME="dob_day" VALUE="" SIZE=2 MAXLENGTH=2>
  /  <INPUT TYPE="text" NAME="dob_year" VALUE="" SIZE=5 MAXLENGTH=4>      </TD>
      <TD COLSPAN=2>
      <FONT FACE="arial,helvetica" SIZE=1>
      Mother's Maiden Name
      </FONT><BR>
      <INPUT TYPE="text" NAME="identifier" VALUE="" SIZE=20 MAXLENGTH=50>      </TD>
</TR>
<TR>
      <TD>
      <FONT FACE="arial,helvetica" SIZE=1>
      Primary Phone Number
      </FONT><BR>
      <INPUT TYPE="text" NAME="phone1" VALUE="" SIZE=20 MAXLENGTH=20>      </TD>
      <TD COLSPAN=2>
      <FONT FACE="arial,helvetica" SIZE=1>
      Secondary Phone Number
      </FONT><BR>
      <INPUT TYPE="text" NAME="phone2" VALUE="" SIZE=20 MAXLENGTH=20>      </TD>
</TR>
<TR>
      <TD COLSPAN=3>
      <FONT FACE="arial,helvetica" SIZE=1>
      E-mail Address (for correspondence purposes only)
      </FONT><BR>
      <INPUT TYPE="text" NAME="email" VALUE="" SIZE=40 MAXLENGTH=50>      </TD>
</TR>
<TR>
      <TD COLSPAN=3>
      <FONT FACE="arial,helvetica" SIZE=1>
<INPUT TYPE="checkbox" NAME="foreign" VALUE="1">The above-defined individual currently does NOT live in the United States

      </FONT></TD>
</TR>
</TABLE> </FORM>
</DIV>

<DIV ID="Section2" CLASS="log">

 <FORM NAME="Form2"><TABLE>
            <TR>
                  <TD>
                  <FONT FACE="arial,helvetica" SIZE=2>
      <TABLE CELLPADDING=0 CELLSPACING=0>
      <TR>
            <TD COLSPAN=3>
            <FONT FACE="arial,helvetica" SIZE=1>
                  Street Address (NASD Requirement - P.O. Boxes Not Accepted)
                  </FONT><BR><INPUT TYPE="text" NAME="address1" VALUE="" SIZE=45 MAXLENGTH=50><BR>
<INPUT TYPE="text" NAME="address2" VALUE="" SIZE=45 MAXLENGTH=50>
            </TD>
      </TR>
      <TR>
            <TD>
            <FONT FACE="arial,helvetica" SIZE=1>
            City
            </FONT><BR><INPUT TYPE="text" NAME="city" VALUE="" SIZE=18 MAXLENGTH=80></TD>
            <TD>
            <FONT FACE="arial,helvetica" SIZE=1>State</FONT><BR>
<SELECT NAME="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
</SELECT>
      </TD><TD>
                  <FONT FACE="arial,helvetica" SIZE=1>
                  Zip Code
                  </FONT><BR><INPUT TYPE="text" NAME="zip" VALUE="" SIZE=5 MAXLENGTH=5><FONT SIZE=2 FACE="arial,hevletica"> - </FONT><INPUT TYPE="text" NAME="zap" VALUE="" SIZE=4 MAXLENGTH=4>
                  </TD>
               </TR></TABLE></FONT>
                  
                 </TD>
            </TR>
            <TR>
            <TD COLSPAN=3>
            <FONT SIZE=1 FACE="arial,helvetica"><INPUT TYPE="checkbox" NAME="alternate_mail" VALUE="1">I would like mail sent to an alternate address (P.O. Boxes accepted).</FONT>
               
            </TD></TR>
      </TABLE></FORM>
</DIV>

<DIV ID="Section3" CLASS="log">
<FORM NAME="Form3"><TABLE CELLPADDING=3 WIDTH=100%>
                       
            <TR>
                  <TD>
                  <FONT FACE="arial,helvetica" SIZE=2>
      Once you complete the application process, you will be instructed to print, sign,
      and mail the completed application to Up-Tick OnLine.  Before proceeding, please
      indicate whether or not you have the ability to print the application.
      <P>
      <B>Do you have the ability to print from your Web browser?</B><BR>
<INPUT TYPE="radio" NAME="printer" VALUE="Yes" CHECKED>Yes <BR><INPUT TYPE="radio" NAME="printer" VALUE="No">No <BR>

                  </FONT></TD>
                  </TR>
                  </TABLE>
            
            
</FORM>
</DIV>

<DIV ID="Section4" CLASS="log">
<FORM NAME="Form4"> <TABLE CELLPADDING=3 WIDTH=100%>
                       
            <TR>
                  <TD>
                  <FONT FACE="arial,helvetica" SIZE=2>
      <B>What type of account do you wish to open?</B><BR>
<INPUT TYPE="radio" NAME="type" VALUE="Individual" CHECKED>Individual <BR><INPUT TYPE="radio" NAME="type" VALUE="JTWROS">Joint Tenants with Rights of Survivorship (JTWROS) <BR><INPUT TYPE="radio" NAME="type" VALUE="IRA">IRA <BR>
      <P>
      <B>How would you like to register your account?</B><BR>
<INPUT TYPE="radio" NAME="registration" VALUE="Cash" CHECKED>Cash <BR><INPUT TYPE="radio" NAME="registration" VALUE="Cash &amp; Margin">Cash &amp; Margin <BR><INPUT TYPE="radio" NAME="registration" VALUE="Cash, Margin, &amp; Option">Cash, Margin, &amp; Option <BR><INPUT TYPE="radio" NAME="registration" VALUE="Cash &amp; Option">Cash &amp; Option (For IRA Accounts Only) <BR>
      <P>
      <FONT SIZE=1><INPUT TYPE="checkbox" NAME="authorized_trading" VALUE="Yes"> To allow someone other than an account holder to trade in your account, please check.

      </FONT>
                  </FONT></TD>
                  </TR>
                  </TABLE></FORM>
</DIV>

<DIV ID="Section5" CLASS="log">
<FORM NAME="Form5"><TABLE CELLPADDING=3 WIDTH=100%>
             
                <TR>
                        <TD>
                       
                <INPUT TYPE="radio" NAME="citizenship" VALUE="U.S. Citizen" CHECKED>U.S. Citizen <BR><INPUT TYPE="radio" NAME="citizenship" VALUE="U.S. Permanent Resident">U.S. Permanent Resident <BR><INPUT TYPE="radio" NAME="citizenship" VALUE="Resident Alien">Resident Alien <BR><INPUT TYPE="radio" NAME="citizenship" VALUE="Nonresident Alien">Nonresident Alien <BR>
        <P>
        If other than &quot;U.S. Citizen,&quot; please specify the country of citizenship:<BR>
<SELECT NAME="country_citizenship">
<OPTION  VALUE="">
<OPTION  VALUE="AFGHANISTAN">AFGHANISTAN
<OPTION  VALUE="ALBANIA">ALBANIA
<OPTION  VALUE="ALGERIA">ALGERIA
<OPTION  VALUE="AMERICAN SAMOA">AMERICAN SAMOA
<OPTION  VALUE="ANDORRA">ANDORRA
<OPTION  VALUE="ANGOLA">ANGOLA
<OPTION  VALUE="ANGUILLA">ANGUILLA
<OPTION  VALUE="ANTARCTICA">ANTARCTICA
<OPTION  VALUE="ANTIGUA &amp; BARBUDA">ANTIGUA &amp; BARBUDA
<OPTION  VALUE="ARGENTINA">ARGENTINA
<OPTION  VALUE="ARMENIA">ARMENIA
<OPTION  VALUE="ARUBA">ARUBA
<OPTION  VALUE="ASHMORE AND CARTIER ISLANDS">ASHMORE AND CARTIER ISLANDS
<OPTION  VALUE="AUSTRALIA">AUSTRALIA
<OPTION  VALUE="AUSTRIA">AUSTRIA
<OPTION  VALUE="AZERBAIJAN">AZERBAIJAN
<OPTION  VALUE="BAHAMAS">BAHAMAS
<OPTION  VALUE="BAHRAIN">BAHRAIN
<OPTION  VALUE="BAKER ISLAND">BAKER ISLAND
<OPTION  VALUE="BANGLADESH">BANGLADESH
<OPTION  VALUE="BARBADOS">BARBADOS
<OPTION  VALUE="BASSAS DA INDIA">BASSAS DA INDIA
<OPTION  VALUE="BELARUS">BELARUS
<OPTION  VALUE="BELGIUM">BELGIUM
<OPTION  VALUE="BELIZE (BRITISH HONDURAS)">BELIZE (BRITISH HONDURAS)
<OPTION  VALUE="BENIN">BENIN
<OPTION  VALUE="BERMUDA">BERMUDA
<OPTION  VALUE="BHUTAN">BHUTAN
<OPTION  VALUE="BOLIVIA">BOLIVIA
<OPTION  VALUE="BOSNIA &amp; HERCEGOVINA">BOSNIA &amp; HERCEGOVINA
<OPTION  VALUE="BOTSWANA">BOTSWANA
<OPTION  VALUE="BOUVET ISLAND">BOUVET ISLAND
<OPTION  VALUE="BRAZIL">BRAZIL
<OPTION  VALUE="BRITISH INDIAN OCEAN TERRITORY">BRITISH INDIAN OCEAN TERRITORY
<OPTION  VALUE="BRT VIRGIN ISLANDS">BRT VIRGIN ISLANDS
<OPTION  VALUE="BRUNEI">BRUNEI
<OPTION  VALUE="BULGARIA">BULGARIA
<OPTION  VALUE="BURMA">BURMA
<OPTION  VALUE="BURUNDI">BURUNDI
<OPTION  VALUE="CAMBODIA">CAMBODIA
<OPTION  VALUE="CAMEROON">CAMEROON
<OPTION  VALUE="CANADA">CANADA
<OPTION  VALUE="&quot;CAPE VERDE, REPUBLIC OF&quot;">&quot;CAPE VERDE, REPUBLIC OF&quot;
<OPTION  VALUE="CAYMAN ISLANDS">CAYMAN ISLANDS
<OPTION  VALUE="CENTRAL AFRICA REPUBLIC">CENTRAL AFRICA REPUBLIC
<OPTION  VALUE="CHAD">CHAD
<OPTION  VALUE="CHILE">CHILE
<OPTION  VALUE="CHINA (PEOPLE'S REPUBLIC)">CHINA (PEOPLE'S REPUBLIC)
<OPTION  VALUE="CHRISTMAS ISLAND">CHRISTMAS ISLAND
<OPTION  VALUE="CLIPPERTON ISLAND">CLIPPERTON ISLAND
<OPTION  VALUE="COCOS (KEELING) ISLANDS">COCOS (KEELING) ISLANDS
<OPTION  VALUE="COLOMBIA">COLOMBIA
<OPTION  VALUE="COMOROS">COMOROS
<OPTION  VALUE="CONGO">CONGO
<OPTION  VALUE="COOK ISLANDS">COOK ISLANDS
<OPTION  VALUE="CORAL SEA ISLANDS TERRITORY">CORAL SEA ISLANDS TERRITORY
<OPTION  VALUE="COSTA RICA">COSTA RICA
<OPTION  VALUE="COTE D'IVOIRE (IVORY COAST)">COTE D'IVOIRE (IVORY COAST)
<OPTION  VALUE="CROATIA">CROATIA
<OPTION  VALUE="CUBA">CUBA
<OPTION  VALUE="CYPRUS">CYPRUS
<OPTION  VALUE="CZECH REPUBLIC">CZECH REPUBLIC
<OPTION  VALUE="DENMARK">DENMARK
<OPTION  VALUE="DJIBOUTI">DJIBOUTI
<OPTION  VALUE="DOMINICA">DOMINICA
<OPTION  VALUE="DOMINICAN REPUBLIC">DOMINICAN REPUBLIC
<OPTION  VALUE="ECUADOR">ECUADOR
<OPTION  VALUE="EGYPT">EGYPT
<OPTION  VALUE="EL SALVADOR">EL SALVADOR
<OPTION  VALUE="EQUATORIAL GUINEA">EQUATORIAL GUINEA
<OPTION  VALUE="ERITREA">ERITREA
<OPTION  VALUE="ESTONIA">ESTONIA
<OPTION  VALUE="ETHIOPIA">ETHIOPIA
<OPTION  VALUE="EUROPA ISLAND">EUROPA ISLAND
<OPTION  VALUE="FALKLAND ISLANDS (ISLAS MALVINAS)">FALKLAND ISLANDS (ISLAS MALVINAS)
<OPTION  VALUE="FAROE ISLANDS">FAROE ISLANDS
<OPTION  VALUE="FIJI">FIJI
<OPTION  VALUE="FINLAND">FINLAND
<OPTION  VALUE="FRANCE">FRANCE
<OPTION  VALUE="FRENCH GUIANA">FRENCH GUIANA
<OPTION  VALUE="FRENCH POLYNEISA">FRENCH POLYNEISA
<OPTION  VALUE="FRENCH SOUTHERN &amp; ANTARCTIC LANDS">FRENCH SOUTHERN &amp; ANTARCTIC LANDS
<OPTION  VALUE="GABON">GABON
<OPTION  VALUE="GAMBIA">GAMBIA
<OPTION  VALUE="GAZA STRIP">GAZA STRIP
<OPTION  VALUE="GEORGIA">GEORGIA
<OPTION  VALUE="GERMAN DEMOCRATIC REPUBLIC">GERMAN DEMOCRATIC REPUBLIC
<OPTION  VALUE="GERMANY">GERMANY
<OPTION  VALUE="GHANA">GHANA
<OPTION  VALUE="GIBRALTAR">GIBRALTAR
<OPTION  VALUE="GLORIOSO ISLANDS">GLORIOSO ISLANDS
<OPTION  VALUE="GREECE">GREECE
<OPTION  VALUE="GREENLAND">GREENLAND
<OPTION  VALUE="GRENADA">GRENADA
<OPTION  VALUE="GUADELOUPE">GUADELOUPE
<OPTION  VALUE="GUAM">GUAM
<OPTION  VALUE="GUATEMALA">GUATEMALA
<OPTION  VALUE="GUERNSEY">GUERNSEY
<OPTION  VALUE="GUINEA">GUINEA
<OPTION  VALUE="GUINEA-BISSAU">GUINEA-BISSAU
<OPTION  VALUE="GUYANA">GUYANA
<OPTION  VALUE="HAITI">HAITI
<OPTION  VALUE="HEARD ISLAND &amp; MCDONALD ISLAND">HEARD ISLAND &amp; MCDONALD ISLAND
<OPTION  VALUE="HOLLAND">HOLLAND
<OPTION  VALUE="HONDURAS">HONDURAS
<OPTION  VALUE="HONG KONG">HONG KONG
<OPTION  VALUE="HOWLAND ISLAND">HOWLAND ISLAND
<OPTION  VALUE="HUNGARY">HUNGARY
<OPTION  VALUE="ICELAND">ICELAND
<OPTION  VALUE="INDIA">INDIA
<OPTION  VALUE="INDONESIA">INDONESIA
<OPTION  VALUE="IRAN (PERSIA)">IRAN (PERSIA)
<OPTION  VALUE="IRAQ">IRAQ
<OPTION  VALUE="IRAQ-SAUDI ARABIA NEUTRAL ZONE">IRAQ-SAUDI ARABIA NEUTRAL ZONE
<OPTION  VALUE="IRELAND">IRELAND
<OPTION  VALUE="ISLE OF MAN">ISLE OF MAN
<OPTION  VALUE="ISRAEL">ISRAEL
<OPTION  VALUE="ITALY">ITALY
<OPTION  VALUE="JAMAICA">JAMAICA
<OPTION  VALUE="JAN MAYEN">JAN MAYEN
<OPTION  VALUE="JAPAN">JAPAN
<OPTION  VALUE="JERSEY">JERSEY
<OPTION  VALUE="JOHNSTON ATOLL">JOHNSTON ATOLL
<OPTION  VALUE="JORDAN">JORDAN
<OPTION  VALUE="JUAN DE NOVA ISLAND">JUAN DE NOVA ISLAND
<OPTION  VALUE="KAZAKHSTAN">KAZAKHSTAN
<OPTION  VALUE="KENYA">KENYA
<OPTION  VALUE="KINGMAN REEF">KINGMAN REEF
<OPTION  VALUE="KIRIBATI">KIRIBATI
<OPTION  VALUE="KOREA DEMOCRATIC PEOPLES REPUBLIC North">KOREA DEMOCRATIC PEOPLES REPUBLIC North
<OPTION  VALUE="KUWAIT">KUWAIT
<OPTION  VALUE="KYRGYZSTAN">KYRGYZSTAN
<OPTION  VALUE="LAOS">LAOS
<OPTION  VALUE="LATVIA">LATVIA
<OPTION  VALUE="LEBANON">LEBANON
<OPTION  VALUE="LESOTHO">LESOTHO
<OPTION  VALUE="LIBERIA">LIBERIA
<OPTION  VALUE="LIBYA">LIBYA
<OPTION  VALUE="LIECHTENSTEIN">LIECHTENSTEIN
<OPTION  VALUE="LITHUANIA">LITHUANIA
<OPTION  VALUE="LUXEMBOURG">LUXEMBOURG
<OPTION  VALUE="MACAO">MACAO
<OPTION  VALUE="MACEDONIA">MACEDONIA
<OPTION  VALUE="MADAGASCAR">MADAGASCAR
<OPTION  VALUE="MALAWI">MALAWI
<OPTION  VALUE="MALAYSIA">MALAYSIA
<OPTION  VALUE="MALDIVES">MALDIVES
<OPTION  VALUE="MALI">MALI
<OPTION  VALUE="MALTA">MALTA
<OPTION  VALUE="MARSHALL ISLANDS">MARSHALL ISLANDS
<OPTION  VALUE="MARTINIQUE">MARTINIQUE
<OPTION  VALUE="MAURITANIA">MAURITANIA
<OPTION  VALUE="MAURITIUS">MAURITIUS
<OPTION  VALUE="MAYOTTE">MAYOTTE
<OPTION  VALUE="MEXICO">MEXICO
<OPTION  VALUE="&quot;MICRONESIA, FEDERATED STATES OF&quot;">&quot;MICRONESIA, FEDERATED STATES OF&quot;
<OPTION  VALUE="MIDWAY ISLANDS">MIDWAY ISLANDS
<OPTION  VALUE="MOLDOVA">MOLDOVA
<OPTION  VALUE="MONACO">MONACO
<OPTION  VALUE="MONGOLIA">MONGOLIA
<OPTION  VALUE="MONSERRAT">MONSERRAT
<OPTION  VALUE="MONTENEGRO">MONTENEGRO
<OPTION  VALUE="MOROCCO">MOROCCO
<OPTION  VALUE="MOZAMBIQUE">MOZAMBIQUE
<OPTION  VALUE="NAURU">NAURU
<OPTION  VALUE="NAVASSA ISLAND">NAVASSA ISLAND
<OPTION  VALUE="NEPAL">NEPAL
<OPTION  VALUE="NETHERLANDS (HOLLAND)">NETHERLANDS (HOLLAND)
<OPTION  VALUE="NETHERLANDS ANTILLES">NETHERLANDS ANTILLES
<OPTION  VALUE="NEW CALEDONIA">NEW CALEDONIA
<OPTION  VALUE="NEW ZEALAND">NEW ZEALAND
<OPTION  VALUE="NICARAGUA">NICARAGUA
<OPTION  VALUE="NIGER">NIGER
<OPTION  VALUE="NIGERIA">NIGERIA
<OPTION  VALUE="NIUE">NIUE
<OPTION  VALUE="NORFOLK ISLAND">NORFOLK ISLAND
<OPTION  VALUE="NORTHERN MARIANA ISLANDS">NORTHERN MARIANA ISLANDS
<OPTION  VALUE="NORWAY">NORWAY
<OPTION  VALUE="OMAN">OMAN
<OPTION  VALUE="PAKISTAN">PAKISTAN
<OPTION  VALUE="PALAU">PALAU
<OPTION  VALUE="PANAMA">PANAMA
<OPTION  VALUE="PAPUA-NEW GUINEA">PAPUA-NEW GUINEA
<OPTION  VALUE="PARACEL ISLANDS">PARACEL ISLANDS
<OPTION  VALUE="PARAGUAY">PARAGUAY
<OPTION  VALUE="PERU">PERU
<OPTION  VALUE="PHILIPPINES">PHILIPPINES
<OPTION  VALUE="PITCAIRN">PITCAIRN
<OPTION  VALUE="POLAND">POLAND
<OPTION  VALUE="PORTUGAL">PORTUGAL
<OPTION  VALUE="PORTUGUESE TIMOR">PORTUGUESE TIMOR
<OPTION  VALUE="PUERTO RICO">PUERTO RICO
<OPTION  VALUE="QATAR">QATAR
<OPTION  VALUE="REPUBLIC OF KOREA (South)">REPUBLIC OF KOREA (South)
<OPTION  VALUE="REUNION">REUNION
<OPTION  VALUE="ROMANIA">ROMANIA
<OPTION  VALUE="RUSSIA">RUSSIA
<OPTION  VALUE="RWANDA">RWANDA
<OPTION  VALUE="SAN MARINO">SAN MARINO
<OPTION  VALUE="SAO TOME &amp; PRINCIPE">SAO TOME &amp; PRINCIPE
<OPTION  VALUE="SAUDI ARABIA">SAUDI ARABIA
<OPTION  VALUE="SENEGAL">SENEGAL
<OPTION  VALUE="SERBIA">SERBIA
<OPTION  VALUE="SEYCHELLES">SEYCHELLES
<OPTION  VALUE="SIERRA LEONE">SIERRA LEONE
<OPTION  VALUE="SINGAPORE">SINGAPORE
<OPTION  VALUE="SLOVAKIA">SLOVAKIA
<OPTION  VALUE="SLOVENIA">SLOVENIA
<OPTION  VALUE="SOLOMON ISLANDS">SOLOMON ISLANDS
<OPTION  VALUE="SOMALIA">SOMALIA
<OPTION  VALUE="SOUTH AFRICA">SOUTH AFRICA
<OPTION  VALUE="SOUTH GEORGIA &amp; SOUTH SANDWICH ISLANDS">SOUTH GEORGIA &amp; SOUTH SANDWICH ISLANDS
<OPTION  VALUE="SOUTH-WEST AFRICA (NAMIBIA)">SOUTH-WEST AFRICA (NAMIBIA)
<OPTION  VALUE="SPAIN">SPAIN
<OPTION  VALUE="SPRATLY ISLANDS">SPRATLY ISLANDS
<OPTION  VALUE="SRI LANKA (CEYLON)">SRI LANKA (CEYLON)
<OPTION  VALUE="ST HELENA">ST HELENA
<OPTION  VALUE="ST KITTS AND NEVIS">ST KITTS AND NEVIS
<OPTION  VALUE="ST LUCIA">ST LUCIA
<OPTION  VALUE="ST PIERRE &amp; MIQUELON">ST PIERRE &amp; MIQUELON
<OPTION  VALUE="ST VINCENT">ST VINCENT
<OPTION  VALUE="SUDAN">SUDAN
<OPTION  VALUE="SURINAME">SURINAME
<OPTION  VALUE="SVALBARD">SVALBARD
<OPTION  VALUE="SWAZILAND">SWAZILAND
<OPTION  VALUE="SWEDEN">SWEDEN
<OPTION  VALUE="SWITZERLAND">SWITZERLAND
<OPTION  VALUE="SYRIA">SYRIA
<OPTION  VALUE="TAIWAN">TAIWAN
<OPTION  VALUE="TAJIKISTAN">TAJIKISTAN
<OPTION  VALUE="TANZANIA">TANZANIA
<OPTION  VALUE="THAILAND">THAILAND
<OPTION  VALUE="TOGO">TOGO
<OPTION  VALUE="TOKELAU ISLANDS">TOKELAU ISLANDS
<OPTION  VALUE="TONGA">TONGA
<OPTION  VALUE="TRINIDAD &amp; TOBAGO">TRINIDAD &amp; TOBAGO
<OPTION  VALUE="TROMELIN ISLAND">TROMELIN ISLAND
<OPTION  VALUE="TRUST TERRITORY OF THE PACIFIC ISLANDS">TRUST TERRITORY OF THE PACIFIC ISLANDS
<OPTION  VALUE="TUNISIA">TUNISIA
<OPTION  VALUE="TURKEY">TURKEY
<OPTION  VALUE="TURKS &amp; CAICOS ISLANDS">TURKS &amp; CAICOS ISLANDS
<OPTION  VALUE="TUVALU">TUVALU
<OPTION  VALUE="UGANDA">UGANDA
<OPTION  VALUE="UKRAINE">UKRAINE
<OPTION  VALUE="UNITED ARAB EMIRATES">UNITED ARAB EMIRATES
<OPTION  VALUE="UNITED KINGDOM">UNITED KINGDOM
<OPTION  VALUE="URUGUAY">URUGUAY
<OPTION  VALUE="US VIRGIN ISLANDS">US VIRGIN ISLANDS
<OPTION  VALUE="UZBEKISTAN">UZBEKISTAN
<OPTION  VALUE="VANUATU">VANUATU
<OPTION  VALUE="VATICAN CITY">VATICAN CITY
<OPTION  VALUE="VENEZUELA">VENEZUELA
<OPTION  VALUE="VIETNAM">VIETNAM
<OPTION  VALUE="WAKE ISLAND">WAKE ISLAND
<OPTION  VALUE="WALLIS &amp; FUTUNA">WALLIS &amp; FUTUNA
<OPTION  VALUE="WEST BANK">WEST BANK
<OPTION  VALUE="WESTERN SAHARA">WESTERN SAHARA
<OPTION  VALUE="WESTERN SAMOA">WESTERN SAMOA
<OPTION  VALUE="YEMEN">YEMEN
<OPTION  VALUE="ZAIRE">ZAIRE
<OPTION  VALUE="ZAMBIA">ZAMBIA
<OPTION  VALUE="ZIMBABWE">ZIMBABWE
</SELECT>

                       
</td></tr></table>
</form>
</DIV>

<DIV ID="Section6" CLASS="log">
<FORM NAME="Form6">

                        <FONT FACE="arial,helvetica" SIZE=2>
        For tax purposes, we ask that either a Social Security or Tax ID number be supplied.  An account may still
        be opened without one of these numbers, but additional forms are required.<BR></FONT>
        <TABLE CELLPADDING=5 CELLSPACING=0 BORDER=0 WIDTH="400">
        <TR>
                <TD VALIGN=top NOWRAP>
                <FONT SIZE=1 FACE="arial,helvetica">
                Social Security Number</FONT><BR><INPUT TYPE="text" NAME="ssn1" VALUE="" SIZE=3 MAXLENGTH=3><FONT SIZE=2 FACE="arial,heletica"> - </FONT><INPUT TYPE="text" NAME="ssn2" VALUE="" SIZE=2 MAXLENGTH=2><FONT SIZE=2 FACE="arial,heletica"> - </FONT><INPUT TYPE="text" NAME="ssn3" VALUE="" SIZE=4 MAXLENGTH=4>
                </TD>
                <TD NOWRAP VALIGN=top ALIGN=left>
                <FONT SIZE=1 FACE="arial,helvetica">
                Tax ID Number</FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><INPUT TYPE="text" NAME="taxid1" VALUE="" SIZE=2 MAXLENGTH=2><FONT SIZE=2 FACE="arial,heletica"> - </FONT><INPUT TYPE="text" NAME="taxid2" VALUE="" SIZE=7 MAXLENGTH=7>
                </TD>
        </TR>
        <TR><TD>
                <FONT SIZE=1 FACE="arial,helvetica"><INPUT TYPE="checkbox" NAME="no_numbers" VALUE="true"> I have neither a Social Security nor Tax Id number.

                </FONT>
                       </TD>
                        </TR>
                        </TABLE>

</FORM>

</DIV>

<DIV ID="Section7" CLASS="log">
<FORM NAME="Form7">
<TABLE CELLPADDING=0 CELLSPACING=0>
        <TR>
                <TD COLSPAN=3>
                <FONT FACE="arial,helvetica" SIZE=1>
                Occupation</FONT><BR><INPUT TYPE="text" NAME="occupation_e" VALUE="" SIZE=45 MAXLENGTH=50>
                </TD>
        </TR>
        <TR>
                <TD COLSPAN=3>
                <FONT FACE="arial,helvetica" SIZE=1>
                Employer</FONT><BR><INPUT TYPE="text" NAME="employer_e" VALUE="" SIZE=45 MAXLENGTH=50>
               
                </TD></TR>
        <TR>
                <TD COLSPAN=3>
                <FONT FACE="arial,helvetica" SIZE=1>
                        Address</FONT><BR><INPUT TYPE="text" NAME="address1_e" VALUE="" SIZE=45 MAXLENGTH=50><BR>
<INPUT TYPE="text" NAME="address2_e" VALUE="" SIZE=45 MAXLENGTH=50>
                </TD>
        </TR>
        <TR>
                <TD>
                <FONT FACE="arial,helvetica" SIZE=1>
                City
                </FONT><BR><INPUT TYPE="text" NAME="city_e" VALUE="" SIZE=18 MAXLENGTH=80>      </TD>
                <TD>
                <FONT FACE="arial,helvetica" SIZE=1>
                        State
                        </FONT><BR><SELECT NAME="state_e">
<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
</SELECT>
        </TD>
                        <TD>
                        <FONT FACE="arial,helvetica" SIZE=1>
                        Zip Code
                        </FONT><BR><INPUT TYPE="text" NAME="zip_e" VALUE="" SIZE=5 MAXLENGTH=5><FONT SIZE=2 FACE="arial,hevletica"> - </FONT><INPUT TYPE="text" NAME="zap_e" VALUE="" SIZE=4 MAXLENGTH=4>
                        </TD>
                </TR>
                <TR>
                        <TD>
                        <FONT SIZE=2 FACE="arial,helvetica">
                        &nbsp;
                        </FONT></TD>
                </TR>
                <TR>
                <TD COLSPAN=3>
                <FONT SIZE=1 FACE="arial,helvetica"><INPUT TYPE="checkbox" NAME="retired_check_e" VALUE="1">Retired - If retired, please omit the above information.
<BR><INPUT TYPE="checkbox" NAME="selfemp_check_e" VALUE="1">Self-employed (please state primary occupation)
                </FONT>

                </TD>
        </TR>
        </TABLE>
</FORM>
</DIV>

<DIV ID="Section8" CLASS="log">
<FORM NAME="Form8">
     <TABLE CELLPADDING=5 CELLSPACING=0 BORDER=0 WIDTH=100%>
      <TR>
          <TD VALIGN=TOP>  
            <FONT SIZE=1 FACE="arial,helvetica">
            Are you (or a member of your household) a director, 10% shareholder, or policy-making officer of a
            publicly traded company?</FONT>
<BR><FONT SIZE=2><INPUT TYPE="radio" NAME="affiliation1" VALUE="Yes">Yes
<BR><INPUT TYPE="radio" NAME="affiliation1" VALUE="No" CHECKED>No </FONT>
<BR>
            <P><FONT SIZE=1 FACE="arial,helvetica">
            If Yes, please specify the company with which you are affiliated.
            <BR>Company Name</FONT>
<BR><INPUT TYPE="text" NAME="affiliation1_company" VALUE="" SIZE=25 MAXLENGTH=50>
<BR>
      <FONT FACE="arial,helvetica" SIZE=1>
      Company Address
      </FONT>
      <BR><INPUT TYPE="text" NAME="affiliation1_address" VALUE="" SIZE=25 MAXLENGTH=50>
      </TD>
      <TD VALIGN=TOP>
      <FONT SIZE=1 FACE="arial,helvetica">
            Do you (or a member of your household) have an affiliation with, or work for, a securities firm, bank,
            trust, or insurance company?<BR><FONT SIZE=2><INPUT TYPE="radio" NAME="affiliation2" VALUE="Yes">Yes <BR><INPUT TYPE="radio" NAME="affiliation2" VALUE="No" CHECKED>No <BR></FONT></FONT>
            <P><FONT SIZE=1 FACE="arial,helvetica">
            If Yes, please specify the company with which you are affiliated.<BR>Company Name</FONT><BR><INPUT TYPE="text" NAME="affiliation2_company" VALUE="" SIZE=25 MAXLENGTH=50>
      <BR>
      <FONT FACE="arial,helvetica" SIZE=1>
      Company Address
      </FONT>
      <BR><INPUT TYPE="text" NAME="affiliation2_address" VALUE="" SIZE=25 MAXLENGTH=50>
        </TD>
      </TR>
      </TABLE>
</FORM>
</DIV>

<DIV ID="Section9" CLASS="log">
<FORM NAME="Form9">
      <TABLE CELLPADDING=5 CELLSPACING=0 BORDER=0 WIDTH=100%>
                     <TR>
                  <TD>
                  <FONT FACE="arial,helvetica" SIZE=2>
            A minimum initial deposit of <B>$2,000</B> is required to open an account.
             <P>
            <B>How do you plan to meet the minimum funding requirement?</B><BR> <INPUT TYPE="checkbox" NAME="check" VALUE="on">Check Deposit
<BR>
<INPUT TYPE="checkbox" NAME="transfer" VALUE="on">Transfer Funds
<BR>
<INPUT TYPE="checkbox" NAME="securities" VALUE="on">Securities Certificates
<BR>
<INPUT TYPE="checkbox" NAME="wire" VALUE="on">Wire Funds

            <P>
            <I><B>Note:</B> You do not need to maintain a $2,000
            balance at all times, but you must have equity in your account to keep it open</I>.
                  </FONT></TD>
                  </TR>
                  </TABLE>
</FORM>
</DIV>

<DIV ID="Section10" CLASS="log">

<TABLE WIDTH=100% CELLPADDING=7 CELLSPACING=0>
      <TR>
            <TD VALIGN=top>
            <IMG SRC="/agifs/checkbox.gif" LOWSRC="/agifs/fill.gif" WIDTH=14 HEIGHT=14 ALT="Checkbox">
            </TD>
            <TD>
            <FONT FACE="arial,helvetica" SIZE=2>
            <FONT SIZE=3><B>Print This Checklist</B></FONT></FONT><BR>
                <FONT FACE="arial,helvetica" SIZE=2>
            This checklist will guide you through the final stages of your
            application to ensure that when it is received, we can quickly
            open your new account.
            </FONT></TD>
      </TR>
      <TR>
            <TD VALIGN=top>
            <IMG SRC="/agifs/checkbox.gif" LOWSRC="/agifs/fill.gif" WIDTH=14 HEIGHT=14 ALT="Checkbox">
            </TD>
            <TD><FONT FACE="arial,helvetica" SIZE=2>
            <FONT SIZE=3><B>Print Your Application</B></FONT></FONT><BR>
                <A HREF="/app_temp/ia1880923590087890624.html"><IMG SRC="/agifs/printapp.gif" LOWSRC="/agifs/fill.gif" ALT="Here is Your Application" BORDER=0 HEIGHT="36" WIDTH="32" ALIGN=right></A>
            <FONT FACE="arial,helvetica" SIZE=2>
                Your <A HREF="/app_temp/ia1880923590087890624.html">new account application</A> has been generated.  Just follow
            the link and print out the application page.  (Your application will be removed from our
            server after 5 minutes.  You may generate an additional application by simply reloading this page.)
            </FONT></TD>
      </TR>
      <TR>
            <TD VALIGN=top>
            <IMG SRC="/agifs/checkbox.gif" LOWSRC="/agifs/fill.gif" WIDTH=14 HEIGHT=14 ALT="Checkbox">
            </TD>
            <TD>
            <FONT FACE="arial,helvetica" SIZE=2>
            <FONT SIZE=3><B>Sign Your Application</B></FONT></FONT><BR>
                <FONT FACE="arial,helvetica" SIZE=2>
            Your application cannot be be processed unless it has a signature.
            To avoid delays, make sure it has your signature.
            </FONT></TD>
      </TR>
      <TR>
            <TD VALIGN=top>
            <IMG SRC="/agifs/checkbox.gif" LOWSRC="/agifs/fill.gif" WIDTH=14 HEIGHT=14 ALT="Checkbox">
            </TD>
            <TD>
            <FONT FACE="arial,helvetica" SIZE=3><B>Funding Your Account: Check Deposit</B></FONT><BR>
                <FONT SIZE=2>
            Make all checks payable to <B>The Up-Tick Trading</B>.  All checks or money orders must
            be made payable in U.S. dollars and payable through a U.S. bank.</FONT>
            <BR><BR><FONT FACE="arial,helvetica" SIZE=2>
            Acceptable deposits include: (a) personal checks drawn from personal checking accounts titled exactly
            the same as an Ameritrade account, (b) a cashier's check with the remitter the same as the
            account title at Ameritrade, (c) checks from a third party payable to the brokerage account
            holder and endorsed over to Ameritrade, (d) investment club checks drawn on a checking account
            in the name of the investment club.
            </FONT></TD>
      </TR>
      <TR>
            <TD VALIGN=top>
            <IMG SRC="/agifs/checkbox.gif" LOWSRC="/agifs/fill.gif" WIDTH=14 HEIGHT=14 ALT="Checkbox">
            </TD>
            <TD>
            <FONT FACE="arial,helvetica" SIZE=2>
            <FONT SIZE=3><B>Mail Your Application and Initial Account Funding</B></FONT></FONT><BR>
            <FONT FACE="arial,helvetica" SIZE=2>
                Mail application form and funding to:</FONT>
            <BLOCKQUOTE><FONT FACE="arial,helvetica" SIZE=2>
            Ameritrade (Inc.)<BR>
            P.O. Box 2209<BR>
            Omaha, NE  &nbsp;68103-2209</FONT>
            </BLOCKQUOTE>
            </TD>
      </TR>
      </TABLE>
</DIV>

<!--Title Divisions-->
<DIV ID="title1" CLASS="titleb" STYLE="visible">Primary Account Holder Information</DIV>
<DIV ID="title2" CLASS="title">U.S. Address</DIV>
<DIV ID="title3" CLASS="title">Do You Have the Ability to Print?</DIV>
<DIV ID="title4" CLASS="title">Account Type and Registration</DIV>
<DIV ID="title5" CLASS="title">Current Citizenship Status</DIV>
<DIV ID="title6" CLASS="title">Social Security or Tax ID Number</DIV>
<DIV ID="title7" CLASS="title">Employment Information</DIV>
<DIV ID="title8" CLASS="title">Affiliation Questions</DIV>
<DIV ID="title9" CLASS="title">How Do You Plan to Fund Your Account?</DIV>
<DIV ID="title10" CLASS="title">Your Application Checklist</DIV>

<SCRIPT LANGUAGE="JavaScript">


var isNS = (navigator.appName == "Netscape" &&
parseInt(navigator.appVersion) >= 4);
   
 /* These constants were not discussed in the article. They can be used in place of hidden and visible because on occasion Navigator has problems with the two */
    var HIDDEN = (isNS) ? 'hide' : 'hidden';
    var VISIBLE = (isNS) ? 'show' : 'visible';

    var Section1 = (isNS) ? document.Section1 : document.all.Section1.style;
    var Section2 = (isNS) ? document.Section2 : document.all.Section2.style;
    var Section3 = (isNS) ? document.Section3 : document.all.Section3.style;
    var Section4 = (isNS) ? document.Section4 : document.all.Section4.style;
    var Section5 = (isNS) ? document.Section5 : document.all.Section5.style;
    var Section6 = (isNS) ? document.Section6 : document.all.Section6.style;
    var Section7 = (isNS) ? document.Section7 : document.all.Section7.style;
    var Section8 = (isNS) ? document.Section8 : document.all.Section8.style;
    var Section9 = (isNS) ? document.Section9 : document.all.Section9.style;
    var Section10 = (isNS) ? document.Section10 : document.all.Section10.style;
     
    var title1 = (isNS) ? document.title1 : document.all.title1.style;  
    var title2 = (isNS) ? document.title2 : document.all.title2.style;  
    var title3 = (isNS) ? document.title3 : document.all.title3.style;  
    var title4 = (isNS) ? document.title4 : document.all.title4.style;  
    var title5 = (isNS) ? document.title5 : document.all.title5.style;  
    var title6 = (isNS) ? document.title6 : document.all.title6.style;  
    var title7 = (isNS) ? document.title7 : document.all.title7.style;
    var title8 = (isNS) ? document.title8 : document.all.title8.style;
    var title9 = (isNS) ? document.title9 : document.all.title9.style;
    var title10 = (isNS) ? document.title10 : document.all.title10.style;

</SCRIPT>

<DIV ID="links" CLASS="barB"><B><A HREF="http://www.theup-tick.com" CLASS="small" onMouseOver="window.status='Hosts the Broker/Dealer Network.'; return true" onMouseout="window.status=''; return true" target="_new">The
Up-Tick.Com</A> | <A HREF="http://www.theup-tick.com/uptick_ibt_market.html" CLASS="small" onMouseOver="window.status='Be in the know with all the latest business news.'; return true" onMouseout="window.status=''; return true" target="_new">Market
News</A> | <A HREF="mailto:publisher@theup-tick.com" CLASS="small" onMouseOver="window.status='The Up-Tick can aslo be reached by phone 561-362-0507'; return true" onMouseout="window.status=''; return true">Contact
Us</A>&nbsp;</B>
</DIV>

</BODY>
</HTML>


Any problems then just shout.

Trevor.

P.S. Any luck with your boss??


0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1270745
Jason,

We can actually improve the script a little by making the showObject and hideObject functions use the same code method and then also make the nextSection function pass its show and hide objects using the same method:

   //-------------------------------------------------------------------------------
   // OnClick Form Expander
   //-------------------------------------------------------------------------------

      // show an object/element
      function showObject(object) {
        object.visibility = 'VISIBLE';
      }

      // hide an object/element
      function hideObject(object) {
        object.visibility = 'HIDDEN';
      }


   //-------------------------------------------------------------------------------
   // If the formChecker returns true then show next section and hide all others
   //-------------------------------------------------------------------------------

   function nextSection(curForm, num) {
     if (formChecker(curForm)) {
         showObject(eval("Section" + num));
         showObject(eval("title" + num));
         for (var i = 1; i < 11; i++) {
             if (i != num) {
                 hideObject(eval("Section" + i));
                 hideObject(eval("title" + i));
             }
         }
     }
   }

Trevor.


0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:thesurvivor
ID: 1270746
hey trevor,
you know i didn't even relize it was you until the most recent message! hey!! no, no luck with my boss. i decided when i get this next batch of stock i would more than happily send you some money for all your help. i just got tired of him telling me he would do it, and not. so, anyway, this looks great. now, i think i'm going to have to add another showobject line. if someone skips around with the section buttons i don't think it would be very affective. i think what i'm going to do, is only make the words ection1 and section2 appear, along with the first section of data. then, when they click on the section2 text, it will inact all of this and make the words section3 appear, along with section2 data. so on, and so forth. i want to be able to make up these Js funtions by myself. but i can't see the concistency yet. like carForm. how am i supposed to know that Js already knows car = current.

thanx though!!!!!
0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1270747
Hi there Jason,

I was getting a bit puzzled why you weren't recognising me I thought that maybe someone else at your company was using your login.

Anyway, I think the idea about revealing the Section buttons one at a time is brilliant.  Will definately prevent people from skipping ahead.

Now with the curForm bit.  JS doesn't automatically recognise cur as meaning current.  What I have done is this:

I call my function from a link, say:

<A HREF="javascript:formChecker(document.Form1);">Section 2</A>

Here we call the function and pass to it the name of the Form we wish to check, in this case it is:

document.Form1

Now when our function recieves it we have to tell it to expect something.  Normally we define a function like this:

function formChecker() {

}

But because we are passing something we need to tell the function to expect to be passed something and we do it like this:

function formChecker(curForm) {

}

Now curForm could equally be myForm or Jason or MrStarr.  It is simply what we are going to refer to the passed item as in the rest of the function.

Its a bit like haveing a var within the function definition (althought his wouldn't work but it theoretically is like this:)

function formChecker(var curForm = document.Form1) {

}

It is better to pass things to a function because it means you don't have to rewrite code all the time as you can get the function to do many things just by changing a key part of the function code with what you have been passed.

I'll see if I can work in the Section Swappers unless you're on the case already.

Trevor.


0
 

Author Comment

by:thesurvivor
ID: 1270748
well,
i think it would be simple just to make the section swaping part like the rest of the show(hide)Object except all the the text would have a hidden atribute. so when the form was past throught he function and all is well, the next section(text) would appear.

jason
0
 

Author Comment

by:thesurvivor
ID: 1270749
i think is all that would need to be done. as always, i'm not sure though!!!!        


        //-------------------------------------------------------------------------------
        // If the formChecker returns true then show next section and hide all others
        //-------------------------------------------------------------------------------

        function nextSection(curForm, num, numB) {
          if (formChecker(curForm)) {
              showObject(eval("Section" + num));
              showObject(eval("text" + numB));
              showObject(eval("title" + num));
              for (var i = 1; i < 11; i++) {
                  if (i != num) {
                      hideObject(eval("Section" + i));
                      hideObject(eval("text" + numB));
                      hideObject(eval("title" + i));
                  }
              }
          }
        }
0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1270750
Jason,

The function changes look about right except you wouldn't need to define a numB because it would be exactly the same as num and we are already passing that so why not just use that again. Also the second part uses the i from the loop and would not need a num or anumB.  What that part does is loop through all the sections and checks to see if any are equal to the one we want to show, which is num, if they are not (that is what != means, not equal) then we hide them.



Like this:

//-------------------------------------------------------------------------------
        // If the formChecker returns true then show next section and hide all others
        //-------------------------------------------------------------------------------

        function nextSection(curForm, num, numB) {
          if (formChecker(curForm)) {
              showObject(eval("Section" + num));
              showObject(eval("text" + num));
              showObject(eval("title" + num));
              for (var i = 1; i < 11; i++) {
                  if (i != num) {
                      hideObject(eval("Section" + i));
                      hideObject(eval("text" + i));
                      hideObject(eval("title" + i));
                  }
              }
          }
        }  
 
Don't forget you will have to define all the text.all.style bits as with the others.  They are at the bottom of the code.

Trevor.


0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1270751
Jason,

Sorry forgot to remove the numB from the function definition:

        function nextSection(curForm, num) {

wouldn't stop the function from running but is just unneccessary.

Trevor.


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 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

24 Experts available now in Live!

Get 1:1 Help Now