"); sWin.close(); } function searchType(form){ count = 0; prodTypeInfo = form; var match = false; tWin = parent.frames[2].document tWin.open(); tWin.write(" "+ prodTypeInfo + " "); tWin.write("

"); tWin.write("

Welcome to our shop

"); for (var i = 1; i <= prodID.length; i++){ if(prodTypeInfo == prodID[i].type){ indexNum = i; prodID[i].show(tWin,i); match = true; } } tWin.write("




"); tWin.close(); } function product (name,description,image,price,type,link,url){ this.name = name; this.description = description; this.image = image this.price = price; this.type = type; this.show = show; if(link != ""){ this.link = "

" + link + "

"; }else{ this.link = ""; } } function show(w,prodIndexNum){ w.write("
" + this.name + "
"); w.write("
" + this.description + "
"); if(this.image.length > 1){ w.write(""); } if(this.link != ""){ w.write(this.link); } w.write("
"); //alert(prodIndexNum); orderProd(this,w,prodIndexNum); w.write("


"); // w.write("     "); } function orderProd(obj,win,index){ win.write("
Price per single unit: $" + obj.price); win.write("
Enter quantity: " + ""); win.write("     Total:" + " $      " + ""); win.write("

") count++; } function add(id, oIndex){ var theForm = parent.frames[2].document.forms[id]; productName = prodID[oIndex].name; totalSum =parent.frames[2].document.forms[id].subTotal.value; totalQuanity = parent.frames[2].document.forms[id].q.value; if(totalQuanity == 0){ alert("You entered a quantity of 0!\n We cannot process this order"); parent.frames[2].document.forms[id].q.value = 1; reTotal(id,prodID[oIndex].price); }else{ if( confirm("You are adding " + totalQuanity + " order/s of " + productName + " \n Subtotal: " + totalSum + " to your shopping cart.")){ store(oIndex,totalSum,totalQuanity); }else{ alert("\n\nThis order was not placed in your shopping cart."); } } } function store(o,ts,tq){ orderNum++; order[orderNum] = new cartGoods(o,ts,tq); showTotal = 0; for(var i = 1; i <= orderNum;i++){ showTotal += parseFloat(order[i].totSum); } parent.frames[1].document.forms[0].runningTotal.value = currency(showTotal); } function cartGoods(Indx, totSum, totQ){ this.Indx = prodID[Indx].name; this.totSum = totSum; this.totQ = totQ; } function view(){ vWin = parent.frames[2].document; vWin.open(); vWin.write("

"); if(orderNum != 0){ vWin.write("" + "You Shopping Basket Contents

"); vWin.write("

"); vWin.write(""); vWin.write(""); vWin.write(""); vWin.write(""); for(var i = 1; i <= orderNum; i++){ vWin.write(""); } vWin.write("
QuantityProductPrice
"+order[i].totQ+""); vWin.write(""+order[i].Indx+""); vWin.write(""+order[i].totSum+""); vWin.write(""); vWin.write("To remove check the"+" checkbox
"); }else{ vWin.write("
" + "
Your shopping cart is empty!
"); if(navigator.appName.indexOf("Netscape") != -1){ vWin.write("
"); } } vWin.write("



"); vWin.close(); } function remove(item){ var newSum = 0; for(var i = item+1; i <= orderNum; i++){ if(item == orderNum){ order[i].Indx = ""; order[i].totSum = 0 ; order[i].totQ = ""; break; }else{ order[i-1].Indx = order[i].Indx; order[i-1].totSum = order[i].totSum; order[i-1].totQ = order[i].totQ; } } orderNum--; for(var i = 1; i <= orderNum;i++){ newSum += parseFloat(order[i].totSum); } parent.frames[1].document.forms[0].runningTotal.value = currency(newSum); view(); } function checkOut(){ if(orderNum != 0){ cWin = parent.frames[2].document; cWin.open(); cWin.write("

"); cWin.write("
Your Shopping Basket
"); grandTotal = 0; // cWin.write(""); cWin.write(""); cWin.write(""); cWin.write(""); cWin.write(""); for(var i = 1; i <= orderNum; i++){ cWin.write(""); grandTotal += parseFloat(order[i].totSum); } finalSum = currency((grandTotal * .0825) + grandTotal); cWin.write(""); cWin.write(""); cWin.write("
QuantityProductPriceTotal Price
"+order[i].totQ+""); cWin.write(""+order[i].Indx+""); cWin.write(""+parent.currency(order[i].totSum/order[i].totQ)+""); cWin.write(""+parent.currency(order[i].totSum)+"
Total:$ " + finalSum + " (includes tax)
"); // cWin.write("

Total: $" + finalSum + " (includes CA tax)"); cWin.write("

If this is correct please fill out and submit the form below.
"); cWin.write("If there is an error in your order or something you wish" + " to change, click \"View Cart\" to make the changes.
"); cWin.write("If your area tax rate is not same, please input your area tax rate below and we will verify it.
"); cWin.write("
"); cWin.write("The tax rate of your area

"); cWin.write("Email:

"); cWin.write("Billing Address :
"); cWin.write("NAME:
"); cWin.write("Street Address:
"); cWin.write("City:
"); cWin.write("State:    "); cWin.write("Zip Code:

"); cWin.write("Telephone:
"); cWin.write("Fax:

"); cWin.write("Shipping Address(Optional) :
"); cWin.write("NAME:
"); cWin.write("Street Address:
"); cWin.write("City:
"); cWin.write("State:    "); cWin.write("Zip Code:

"); cWin.write("Telephone:
"); cWin.write("Fax:
"); cWin.write("Shipping Method:

"); cWin.write("Purchase Total = $ includes CA tax & shipping
"); cWin.write("Credit Card Type: **
"); cWin.write("Credit Card #: **
"); cWin.write("Expiration Date: **
**Optional! You can leave ** blank. We will confirm these information with you through phone. Or you can send us a check and put 'Check Account No. *****' in the credit card number box! We will process youor transaction within 24 hours.
"); cWin.write("  "); cWin.write("

"); cWin.write("  "); cWin.write(""); cWin.write("

Download Netscape Here




"); cWin.close(); }else{ alert("\n\nYour shopping cart is empty!\n\n"); } } function formData(form){ var formElems = form.elements.length; formSave = new makeArray(formElems-3); for(var i = 1; i <= formElems; i++){ formSave[i] = form.elements[i-1].value; } for(var i = 1; i <= orderNum; i++){ form.elements[21].value += "Quantity:" + order[i].totQ form.elements[21].value += " " + order[i].Indx form.elements[21].value += " at " + order[i].totSum/order[i].totQ + " |" } form.submit(); } function reTotal(c,totalPrice){ totalPrice = totalPrice * parent.frames[2].document.forms[c].q.value; newTotal = currency(totalPrice) parent.frames[2].document.forms[c].subTotal.value = newTotal; } function shipping(form, fSum){ shipCost = form.shipSelection.options[form.shipSelection.selectedIndex].value; form.finalTot.value =currency( parseFloat(shipCost) + parseFloat(fSum)); } function empty(){ if(orderNum == 0){ alert("\n\nYour cart is already empty!\n\n"); }else{ orderNum = 0; alert("\nYour cart has been emptied!\n"); } } //Insert database file here! prodID = new makeArray(17);prodID[1] = new product('Corel Office For Java','Experience the cutting edge in business software technology. Introducing','banner_welcome.gif',229.99,'Utilities','Corel Office For Java','http://www.corel.com');prodID[2] = new product('WordPerfect','With the most powerful document creation','box_cwp.gif',200.99,'Word Processor','WordPerfect','http://www.corel.com');prodID[3] = new product('Corel Office For NT','The Complete NT Server Software Solution','box_cont_3d.jpg',309.99,'Word Processor','Corel Office For NT','http://www.corel.com');prodID[4] = new product('Microsoft Office 97','integrates intelligent applications','o97_banner.GIF',199.99,'Utilities','Microsoft','http://www.microsoft.com');prodID[5] = new product('Microsoft Office For Macintosh','Built by Mac developers for Mac users','mac_banner.gif',199.99,'Utilities','Microsoft Office For Macintosh','http://www.microsoft.com');prodID[6] = new product('Microsoft Access','Read this datasheet to learn about the exciting new features in','acc_banner.gif',202.99,'Database','Microsoft Access','http://www.microsoft.com');prodID[7] = new product('','','',0,'','','');prodID[8] = new product('Web Trends','Web Trends is essential reporting tool for any web server','webtrends.gif',129.99,'Web Tools','Web Trends','http://www.WebTrends.com');prodID[9] = new product('Site Marks','Site Marks is Unified Bookmarks. Two browsers, one set of bookmarks!','130ban.gif',145.99,'Web Tools','Site Marks','http://www.SiteMarks.com');prodID[10] = new product('Eudora Mail version 3.0','Eudora Mail version 3.0 is #1 Internet E-mail program','eudmac30.gif',49.99,'Web Tools','Eudora Mail version 3.0','http://www.eudora.com');prodID[11] = new product('Net It!','Java authoring tools without actually knowing Java','netit130.gif',79.99,'Program','Net It!','http://www.netit.com');prodID[12] = new product('NetMC','NetMC is animation, music tool for your web site. Produce sound and video effects on your web!','netmc130.gif',69.99,'Web Tools','NetMC','http://www.NetMC.com');prodID[13] = new product('Lotus Notes','Lotus Notes is 1997 release of spreadsheet program.','notes130.gif',159.99,'Spreadsheet','Lotus Notes','http://www.lotus.com');prodID[14] = new product('Quick View Plus','Quick View Plus','qvp130.gif',59.99,'Graphic Design','Quick View Plus','http://www.quickview.com');prodID[15] = new product('Simply NFS','Simply NFS is file and printer sharing for windows','simnfs.gif',92.99,'Printer','Simply NFS','http://www.Simply.com');prodID[16] = new product('Lotus 1-2-3','Lotus 1-2-3: Setting stadards in spreadsheet productivity','123130.gif',0,'Spreadsheet','Lotus 1-2-3','http://www.lotus.com');prodID[17] = new product('','','',0,'','',''); //-->