function AllPhoneSearchTwo(form, root_path) { this.append = 'mobile-phone-finder'; 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.data['SonyEricssonC902Black'] = new Array(); this.data['SonyEricssonC902Black'][this.data['SonyEricssonC902Black'].length] = new Array('T Mobile', '/sony-ericsson-mobile-phones/t-mobile/sony-ericsson-c902-black.php'); this.data['SonyEricssonK550i'] = new Array(); this.data['SonyEricssonK550i'][this.data['SonyEricssonK550i'].length] = new Array('BT Mobile', '/sony-ericsson-mobile-phones/bt-mobile/sony-ericsson-k550i.php'); this.data['SonyEricssonK770iBrown'] = new Array(); this.data['SonyEricssonK770iBrown'][this.data['SonyEricssonK770iBrown'].length] = new Array('3 Mobile', '/sony-ericsson-mobile-phones/3-mobile/sony-ericsson-k770i-brown.php'); this.data['SonyEricssonK770iPurple'] = new Array(); this.data['SonyEricssonK770iPurple'][this.data['SonyEricssonK770iPurple'].length] = new Array('3 Mobile', '/sony-ericsson-mobile-phones/3-mobile/sony-ericsson-k770i-purple.php'); this.data['SonyEricssonK800i'] = new Array(); this.data['SonyEricssonK800i'][this.data['SonyEricssonK800i'].length] = new Array('T Mobile', '/sony-ericsson-mobile-phones/t-mobile/sony-ericsson-k800i.php'); this.data['SonyEricssonK810i'] = new Array(); this.data['SonyEricssonK810i'][this.data['SonyEricssonK810i'].length] = new Array('Orange', '/sony-ericsson-mobile-phones/orange/sony-ericsson-k810i.php'); this.data['SonyEricssonK850iBlue'] = new Array(); this.data['SonyEricssonK850iBlue'][this.data['SonyEricssonK850iBlue'].length] = new Array('T Mobile', '/sony-ericsson-mobile-phones/t-mobile/sony-ericsson-k850i-blue.php'); this.data['SonyEricssonW580i'] = new Array(); this.data['SonyEricssonW580i'][this.data['SonyEricssonW580i'].length] = new Array('Show All', '/sony-ericsson-mobile-phones/all/sony-ericsson-w580i.php?ttype=A&tarifftab=1'); this.data['SonyEricssonW580i'][this.data['SonyEricssonW580i'].length] = new Array('T Mobile', '/sony-ericsson-mobile-phones/t-mobile/sony-ericsson-w580i.php'); this.data['SonyEricssonW580i'][this.data['SonyEricssonW580i'].length] = new Array('BT Mobile', '/sony-ericsson-mobile-phones/bt-mobile/sony-ericsson-w580i.php'); this.data['SonyEricssonW610i'] = new Array(); this.data['SonyEricssonW610i'][this.data['SonyEricssonW610i'].length] = new Array('BT Mobile', '/sony-ericsson-mobile-phones/bt-mobile/sony-ericsson-w610i.php'); this.data['SonyEricssonW880i'] = new Array(); this.data['SonyEricssonW880i'][this.data['SonyEricssonW880i'].length] = new Array('Orange', '/sony-ericsson-mobile-phones/orange/sony-ericsson-w880i.php'); this.data['SonyEricssonW910iBlack'] = new Array(); this.data['SonyEricssonW910iBlack'][this.data['SonyEricssonW910iBlack'].length] = new Array('Show All', '/sony-ericsson-mobile-phones/all/sony-ericsson-w910i-black.php?ttype=A&tarifftab=1'); this.data['SonyEricssonW910iBlack'][this.data['SonyEricssonW910iBlack'].length] = new Array('T Mobile', '/sony-ericsson-mobile-phones/t-mobile/sony-ericsson-w910i-black.php'); this.data['SonyEricssonW910iBlack'][this.data['SonyEricssonW910iBlack'].length] = new Array('3 Mobile', '/sony-ericsson-mobile-phones/3-mobile/sony-ericsson-w910i-black.php'); this.handsets = new Array(); this.handsets[this.handsets.length] = new Array('Sony Ericsson C902 Black', 'SonyEricssonC902Black'); this.handsets[this.handsets.length] = new Array('Sony Ericsson K550i', 'SonyEricssonK550i'); this.handsets[this.handsets.length] = new Array('Sony Ericsson K770i Brown', 'SonyEricssonK770iBrown'); this.handsets[this.handsets.length] = new Array('Sony Ericsson K770i Purple', 'SonyEricssonK770iPurple'); this.handsets[this.handsets.length] = new Array('Sony Ericsson K800i', 'SonyEricssonK800i'); this.handsets[this.handsets.length] = new Array('Sony Ericsson K810i', 'SonyEricssonK810i'); this.handsets[this.handsets.length] = new Array('Sony Ericsson K850i Blue', 'SonyEricssonK850iBlue'); this.handsets[this.handsets.length] = new Array('Sony Ericsson W580i', 'SonyEricssonW580i'); this.handsets[this.handsets.length] = new Array('Sony Ericsson W610i', 'SonyEricssonW610i'); this.handsets[this.handsets.length] = new Array('Sony Ericsson W880i', 'SonyEricssonW880i'); this.handsets[this.handsets.length] = new Array('Sony Ericsson W910i Black', 'SonyEricssonW910iBlack'); this.InitHandsets(); } AllPhoneSearchTwo.prototype.ChangeHandset = function(handset) { for (i = this.network_field.options.length; i >= 0; i--) { this.network_field.options[i] = null; } // Add the option to select the handset/network this.network_field.options[0] = new Option(((handset != "") ? "Now choose Network..." : "...then choose Network"), ""); // If a network is selected, add the options if (handset != "" && this.data[handset]) { // this.network_field.options[this.network_field.options.length] = new Option('all', 'all'); for (i = 0; i < this.data[handset].length; i++) { this.network_field.options[this.network_field.options.length] = new Option(this.data[handset][i][0], this.data[handset][i][1]); } if (this.previously_selected > 0) this.network_field.selectedIndex = this.previously_selected; if (this.phone_field != '') { this.phone_field.value = handset; } } } AllPhoneSearchTwo.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 != "") ? "Choose Handset first..." : "...then choose Network"), ""); // 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; } } } AllPhoneSearchTwo.prototype.InitHandsets = function() { 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("Choose Handset first...", ""); for (i = 0; i < this.handsets.length; i++) { this.phone_field.options[this.phone_field.options.length] = new Option(this.handsets[i][0], this.handsets[i][1]); } } AllPhoneSearchTwo.prototype.GoTo = function(url) { if (url != "") { document.location.href = url; } }