var en_astr = '' function item_tot_price(i) { total_item_price = eval((itemlist[i].price * itemlist[i].quan)); return total_item_price; } function all_order_totals() {order_total = 0; if (item_num > 0) { for (i =1;i < item_num;i++) {order_total = order_total + item_tot_price(i)} } return order_total; } function remove_nil_items(inputlist) {var i = 0; var j = 1; for (i=1;i 0) var quantities = itemlist[loc].quan else var quantities = 0; return quantities } function display_pic(graphic,price) { parent.frames[0].document.close() // parent.frames[1].document.open() parent.frames[0].document.write(st_astr); parent.frames[0].document.write('
' + price); parent.frames[0].document.write('

Navigation Table'); parent.frames[0].document.write(en_astr); parent.frames[0].document.close() } function createArray(n) //n size of array //init what you want all values initialized to { this.length = n var i = 0 for (i = 1 ; i < n ; i++) this[i] = null; return this } function product(code,price,desc,quan,url) { this.price = 0 this.code = code this.price = price this.desc = desc this.quan = quan this.url = url return this; } var itemlist = new createArray(50); var temp_array = new createArray(50); function initialize_arrays(arraysa) { for (i = 1;i < maxarray;i++) { arraysa[i] = new product('',0,'',0,'') } } function updatemain_order() { parent.frames[1].document.close() // parent.frames[1].document.open() parent.frames[1].location = "order.html"; parent.frames[1].document.close() } function updatenav_nav() { parent.frames[0].document.close() // parent.frames[0].document.open() parent.frames[0].location = "navigate.htm"; parent.frames[0].document.close() } function check_if_in(code_check) // this works { var i = 1 loc = 0; // line 47 while ((i < item_num) && (itemlist[i].code != code_check)) i = i + 1; if (itemlist[i].code == code_check) loc = i else loc = -1; //alert('loc is ' + loc); return loc; } function additem(codes,prices,descrip,url) { // adds another item to a variable length array // remember to do it via new product() // line 61 loc = check_if_in(codes) // present_item = item_num //last_item = item_num; //alert('item_num = ' + item_num) if (loc != -1){ // update existing item olditem = itemlist[loc].quan //alert(' loc is before oldvalue ' + loc); //alert('olditem is ' + olditem); itemlist[loc] = new product(codes,prices,descrip,olditem + 1,url)} else // new item {olditem = itemlist[item_num].quan itemlist[item_num] = new product(codes,prices,descrip,olditem + 1,url); items_ordered = item_num item_num = item_num + 1 } remove_nil_items(itemlist) } // line 78 function subitem(codes,prices,descrip,url) { loc = check_if_in(codes) if ((loc != -1) && (itemlist[loc].quan > 0)) { // update existing item olditem = itemlist[loc].quan //alert(' loc is before oldvalue ' + loc); //alert('olditem is ' + olditem); itemlist[loc] = new product(codes,prices,descrip,olditem - 1,url)} //updatepage(codes) } initialize_arrays(itemlist) initialize_arrays(temp_array) function check_window() { if (self == mainbody) {document.write('

Warning!


This is inside a multiple frame window.
The scripts may not work correctly!!!!,

We are jumping you directly to myMain page in 15 seconds.
'); self.location = "index.html"; parent.document.close(); } } This page requires frames.