/* This is a multi-dimensional array containing all the attribute variations for a particular product. For example, the product might be a Viper, and the variations might be 3 types of colors and 4 types of weights */ var productList = new Array(); function Product(name, price, img_path) { this.name = name; this.price = price; this.img_path = img_path; } // The first 3 arguments to this need to be as follows: // product name // price // path to image of product // Afterwards, a variable list of arguments that are product attributes. function addProduct() { var name = arguments[0]; var price = arguments[1]; var img_path = arguments[2]; var expr = "productList"; for (var i=3; i -1); var ns4 = ((navigator.appVersion.charAt(0) == '4') && netscape); var ie4 = (document.all)? true:false; var gHide = (ns4) ? "hide" : "hidden"; var gShow = (ns4) ? "show" : "visible"; function showButton() { var id = 'Buy'; var divObj = GetDivObject(id); divObj.visibility = gShow; } function hideButton(id) { var id = 'Buy'; var divObj = GetDivObject(id); divObj.visibility = gHide; } function GetDivObject(id) { if (netscape) { return (!ns4) ? document.getElementById(id).style : document.layers[id]; } else { return document.all[id].style; } }