<HTML>
<TITLE>Computer Shopping using JavaScript</TITLE>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--hide script from old browser

function find_number(string){
separator="]"
lastchar=string.length;
firstchar=string.indexOf(separator)+1;
temp=string.substring(firstchar,lastchar);
return temp;
}

function compute(form){
pr_flag=parseInt(find_number(form.Processor.options[form.Processor.selectedIndex].value));
ram_flag=parseInt(find_number(form.RAM.options[form.RAM.selectedIndex].value));
hdrive_flag=parseInt(find_number(form.Hard_Drive.options[form.Hard_Drive.selectedIndex].value));
speakers_flag=parseInt(find_number(form.speakers.options[form.speakers.selectedIndex].value));
fdrive_flag=parseInt(find_number(form.Floppy_Drive.options[form.Floppy_Drive.selectedIndex].value));
cd_flag=parseInt(find_number(form.cd.options[form.cd.selectedIndex].value));
mn_flag=parseInt(find_number(form.Monitor.options[form.Monitor.selectedIndex].value));
mos_flag=parseInt(find_number(form.Mouse.options[form.Mouse.selectedIndex].value));
modem_flag=parseInt(find_number(form.Modem.options[form.Modem.selectedIndex].value));
kb_flag=parseInt(find_number(form.Keyboard.options[form.Keyboard.selectedIndex].value));
card_flag=parseInt(find_number(form.Sterio_Sound.options[form.Sterio_Sound.selectedIndex].value));
sr_flag=parseInt(find_number(form.Service.options[form.Service.selectedIndex].value));
case_flag=parseInt(find_number(form.p_case.options[form.p_case.selectedIndex].value));
vdo_flag=parseInt(find_number(form.video.options[form.video.selectedIndex].value));

form.Total_Price.value="  $  " + parseInt(pr_flag+ram_flag+hdrive_flag+speakers_flag+ fdrive_flag
+cd_flag+mn_flag+mos_flag+ kb_flag+modem_flag+card_flag+sr_flag+case_flag+vdo_flag);
}
//done hiding-->
</SCRIPT>
</HEAD>

<!-------------------START HTML PAGE----------------->
<BODY BGCOLOR="#fffbf0" TEXT="#1f1f1f">
<H2><font color=Blue> <Center><u>Computer Shopping using JavaScript</u></h2></font>
<FORM method="post" ENCTYPE="text/plain" action="mailto:name@server.com">
<TABLE  CELLPADDING="0" border=1>

<!-------- Processor ------------>
<TR><TD>Processor:	 
<P>
<SELECT NAME="Processor">
<option value="[None]0">	Select	 
<OPTION value="[Pentium 75]157">        Pentium 75 [$157]                 
<OPTION value="[Pentium 100]312" >        Pentium 100 [$312]                 
<OPTION value="[Pentium 133]387">        Pentium 133 [$387]                 
<OPTION value="[Pentium 166]533" >        Pentium 166 [$533]                 
</SELECT>
</TD>

<!-------- Sound Card ------------>
<TD>Stero Sound:  
<P>
<SELECT NAME="Sterio_Sound">	
<option value="[None]0">	Select	 	 
<OPTION value="[Acer Magic 32bit AWE]81">         Acer Magic 32bit AWE  [$81]                
<OPTION value="[Sound Blaster  16]110">        Sound Blaster  16  [$110]            
<OPTION value="[Sound Blaster 32]183">        Sound Blaster 32  [$183]              
<OPTION value="[Sound Blaster 32bit AWE]270">        Sound Blaster 32bit AWE   [$270]     
</SELECT>
</TD>

<!-------- Memory (RAM) ------------>
<TD>Memory(RAM): 
<P>
<SELECT NAME="RAM">	
<option value="[None]0">	Select	 	 
<OPTION value="[4meg RAM]39">        4meg RAM[$39]                 
<OPTION value="[8meg RAM]84">        8meg RAM [$84]                
<OPTION value="[16meg RAM]130">        16meg RAM [$130]                
<OPTION value="[32meg RAM]228">        32meg RAM [$228]        
</SELECT>
</TD></TR>

<!-------- Hard Drive ------------>
<TR><TD>Hard drive: 
<P>
<SELECT NAME="Hard_Drive">	
<option value="[None]0">	Select	 	 
<OPTION value="[1.2 Gig Hard Drive]282">        1.2 Gig Hard Drive[$282]                
<OPTION value="[2.1 Gig Hard Drive]392">         2.1 Gig Hard Drive[$392]                
</SELECT>
</TD>

<!-------- Speakers ------------>
<TD>speakers: 
<P>
<SELECT NAME="speakers">
<option value="[None]0">	Select	 		 
<OPTION value="[Acer LS-40 8w]24">        Acer LS-40 8w [$24]
<OPTION value="[Ls-80 100w w/ Sub]69" >        Ls-80 100w w/ Sub [$69]              
</SELECT>
</TD>

<!-------- Floppy Drive ------------>
<TD>Floppy Drive: 
<P>
<SELECT NAME="Floppy_Drive">	
<option value="[None]0">	Select	 	
<OPTION value="[Teac]39">        Teac [$39]                 
<OPTION value="[Panosonic]26">        Panosonic [$26]                
</SELECT>
</TD></TR>

<!-------- CD-ROM ------------>
<TR><TD>CD-Rom: 
<P>
<SELECT NAME="cd">		 
<option value="[None]0">	Select	 
<OPTION value="[6x Internal]96">        6x Internal [$96]                
<OPTION value="[8x Internal]110">        8x Internal [$110]                
</SELECT>
</TD>

<!-------- Monitor ------------>
<TD>Monitor:
<P>
<SELECT NAME="Monitor">	
<!---------for the "option value=", don not put " for inch but put '' to indicate inch------>	 
<option value="[None]0">	Select
<OPTION value="[Acer 15'']448">        Acer 15" [$448]             
<OPTION value="[Acer 17'']695">        Acer 17" [$695]             
<OPTION value="[NEC 17'']1100">        NEC 17" [$1,100]             
</SELECT>
</TD>

<!-------- Mouse ------------>
<TD>Mouse: 
<P>
<SELECT NAME="Mouse">		 
<option value="[None]0">	Select	 
<OPTION value="[Microsoft]29">	 Microsoft  [$29]           
</SELECT>
</TD></TR>

<!-------- Key Board ------------>
<TR><TD>KeyBoard: 
<P>
<SELECT NAME="Keyboard">	
<option value="[None]0">	Select	 	 
<OPTION value="[Acer 101]24">        Acer 101  [$24]           
<OPTION value="[Keytronic 101]33">        Keytronic 101  [$33]           
</SELECT>
</TD>

<!-------- Modem------------>
<TD>Modem: 
<P>
<SELECT NAME="Modem">	
<option value="[None]0.00">	Select	 	 
<OPTION value="[Zoom External 28.8]220">    Zoom External 28.8    [$220]
<OPTION value="[US Robotics 28.8 Ext]208">    US Robotics 28.8 Ext [$208]    
<OPTION value="[Rockwell 28.8 Ext]166">    Rockwell 28.8 Ext [$166]    
<OPTION value="[Zoom External 28.8]99">    Zoom External 28.8 [$99]       
</SELECT>
</TD>

<!-------- Service ------------>
<TD>Service: 
<P>
<SELECT NAME="Service">		 
<option value="[None]0.00">	Select	 
<OPTION value="[1 Year]69">        1 Year [$69]                
<OPTION value="[2 Year]139">        2 Year [$139]                
<OPTION value="[3 Year]199.95">        3 Year [$199]                
</SELECT>
</TD></TR>

<!-------- Case, Motherboard, PS ------------>
<TR><TD>Case, Motherboard, PS
<P>
<SELECT NAME="p_case">		 
<option value="[None]0.00">Select	 
<OPTION value="[Mini Tower]319">Mini Tower [$319]                
<OPTION value="[Full Tower]369">Full Tower [$369]                
</SELECT> </td>

<!-------- Video ------------>
<TD>Video
<P>
<SELECT NAME="video">		 
<option value="[None]0.00">	Select	 
<OPTION value="[S3 PCI 1meg]67">S3 PCI 1meg [$67]                
<OPTION value="[Diamond Stealth 2meg]154">Diamond Stealth 2meg [$154]    
<OPTION value="[ATI Pro 2meg]402">ATI Pro 2meg [$402]    
</SELECT> </td>
<td></td></tr>

</TABLE>
<P>
<TABLE BORDER CELLPADDING="2"><TR><TD><center>
<INPUT TYPE="BUTTON" NAME="Price" Value="Total Price" 
onClick="compute(this.form)"></center>

</TD><TD><center>
<INPUT TYPE="text" SIZE=15 NAME="Total_Price" value=""></center>

</TD></TR></TABLE><P><br>
<hr noshade width=45%>
<b>Input Your Shipping Info bellow</b><br>
<hr noshade width=45%>
<b>Your Name</b><br>
<input type="text" name="Name" SIZE="50" MAXLENGTH="50"><br>
<b>Your Phone:</b><br>
<input type="text" name="Phone" SIZE="50" MAXLENGTH="50"><BR> 
<b>Your Email:</b><br>
<input type="text" name="Email" SIZE="50" MAXLENGTH="50"><BR> 
<b>Your Address:</b><br>
<textarea name="Address" wrap=physical rows=7 cols=43></textarea><BR> 
<INPUT TYPE="submit"  Value="Send the Order"></center>
</FORM></BODY></HTML>