// Copywrite 2000 // Daniel W. Harris // Abbotsford B.C. // email: harrisd@telus.net item_num = 1 maxarray = 50 //*************************************************** 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 createArray(n) { 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].location = "order.shtml"; parent.frames[1].document.close() } function updatenav_nav() { parent.frames[0].document.close() 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; return loc; } function additem(codes,prices,descrip,url) { loc = check_if_in(codes) if (loc != -1){ olditem = itemlist[loc].quan 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)) { olditem = itemlist[loc].quan itemlist[loc] = new product(codes,prices,descrip,olditem - 1,url)} } function was_selected(code){ var checkit; loc = check_if_in(code) if ((loc != -1)&& (itemlist[loc].quan > 0)) { checkit = 1; } else{ checkit = -1; } return checkit; } 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 our Main page in 15 seconds.
'); self.location = "index.html"; parent.document.close(); } } function reset() { parent.main.reset_page(); } function get_the_values(code_check) // this works { var i = 1 loc = 0; while ((i < item_num) && (itemlist[i].code != code_check)) i = i + 1; if (itemlist[i].code == code_check) loc = i var codes = itemlist[i].code; var prices = itemlist[i].price; var descrip = itemlist[i].desc; var url = itemlist[i].quan; subitem(codes,prices,descrip,url); }