function AllPhoneSearch1(form, root_path) { this.form = form; this.root_path = root_path; this.network_field = (this.form.network) ? this.form.network : ''; this.phone_field = this.form.phone; this.data = new Array(); this.ChangeNetwork(this.network_field.value); } AllPhoneSearch1.prototype.ChangeNetwork = function(network) { var i; // Remove all the options out of the phone field for (i = this.phone_field.options.length; i >= 0; i--) { this.phone_field.options[i] = null; } // Add the option to select the handset/network this.phone_field.options[0] = new Option(((network != "") ? "Select a Handset..." : "Select a Handset..."), ""); // If a network is selected, add the options if (network != "" && this.data[network]) { for (i = 0; i < this.data[network].length; i++) { this.phone_field.options[this.phone_field.options.length] = new Option(this.data[network][i][0], this.data[network][i][1]); } if (this.previously_selected > 0) this.phone_field.selectedIndex = this.previously_selected; if (this.network_field != '') { this.network_field.value = network; } } } AllPhoneSearch1.prototype.GoTo = function(url) { // If a url has been entered, go to it. // ((document.location.toString().indexOf("www.mobileshop.com") > -1) ? "../" : "") + //if (url != "") document.location.href = this.root_path + url; if (url != "") document.location.href = url; }