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['Nokia3110Classic'] = new Array(); this.data['Nokia3110Classic'][this.data['Nokia3110Classic'].length] = new Array('Show All', '/nokia-mobile-phones/all/nokia-3110-classic.php?ttype=A&tarifftab=1'); this.data['Nokia3110Classic'][this.data['Nokia3110Classic'].length] = new Array('Orange', '/nokia-mobile-phones/orange/nokia-3110-classic.php'); this.data['Nokia3110Classic'][this.data['Nokia3110Classic'].length] = new Array('BT Mobile', '/nokia-mobile-phones/bt-mobile/nokia-3110-classic.php'); this.data['Nokia6120'] = new Array(); this.data['Nokia6120'][this.data['Nokia6120'].length] = new Array('T Mobile', '/nokia-mobile-phones/t-mobile/nokia-6120.php'); this.data['Nokia6280'] = new Array(); this.data['Nokia6280'][this.data['Nokia6280'].length] = new Array('3 Mobile', '/nokia-mobile-phones/3-mobile/nokia-6280.php'); this.data['Nokia6300'] = new Array(); this.data['Nokia6300'][this.data['Nokia6300'].length] = new Array('Show All', '/nokia-mobile-phones/all/nokia-6300.php?ttype=A&tarifftab=1'); this.data['Nokia6300'][this.data['Nokia6300'].length] = new Array('Orange', '/nokia-mobile-phones/orange/nokia-6300.php'); this.data['Nokia6300'][this.data['Nokia6300'].length] = new Array('T Mobile', '/nokia-mobile-phones/t-mobile/nokia-6300.php'); this.data['Nokia6300'][this.data['Nokia6300'].length] = new Array('BT Mobile', '/nokia-mobile-phones/bt-mobile/nokia-6300.php'); this.data['Nokia6500Classic'] = new Array(); this.data['Nokia6500Classic'][this.data['Nokia6500Classic'].length] = new Array('T Mobile', '/nokia-mobile-phones/t-mobile/nokia-6500-classic.php'); this.data['Nokia6500Slide'] = new Array(); this.data['Nokia6500Slide'][this.data['Nokia6500Slide'].length] = new Array('Show All', '/nokia-mobile-phones/all/nokia-6500-slide.php?ttype=A&tarifftab=1'); this.data['Nokia6500Slide'][this.data['Nokia6500Slide'].length] = new Array('T Mobile', '/nokia-mobile-phones/t-mobile/nokia-6500-slide.php'); this.data['Nokia6500Slide'][this.data['Nokia6500Slide'].length] = new Array('3 Mobile', '/nokia-mobile-phones/3-mobile/nokia-6500-slide.php'); this.data['NokiaN73'] = new Array(); this.data['NokiaN73'][this.data['NokiaN73'].length] = new Array('Orange', '/nokia-mobile-phones/orange/nokia-n73.php'); this.data['NokiaN80'] = new Array(); this.data['NokiaN80'][this.data['NokiaN80'].length] = new Array('3 Mobile', '/nokia-mobile-phones/3-mobile/nokia-n80.php'); this.data['NokiaN95'] = new Array(); this.data['NokiaN95'][this.data['NokiaN95'].length] = new Array('Show All', '/nokia-mobile-phones/all/nokia-n95.php?ttype=A&tarifftab=1'); this.data['NokiaN95'][this.data['NokiaN95'].length] = new Array('Orange', '/nokia-mobile-phones/orange/nokia-n95.php'); this.data['NokiaN95'][this.data['NokiaN95'].length] = new Array('T Mobile', '/nokia-mobile-phones/t-mobile/nokia-n95.php'); this.data['NokiaN95'][this.data['NokiaN95'].length] = new Array('3 Mobile', '/nokia-mobile-phones/3-mobile/nokia-n95.php'); this.data['NokiaN958Gb'] = new Array(); this.data['NokiaN958Gb'][this.data['NokiaN958Gb'].length] = new Array('3 Mobile', '/nokia-mobile-phones/3-mobile/nokia-n95-8gb.php'); this.handsets = new Array(); this.handsets[this.handsets.length] = new Array('Nokia 3110 Classic', 'Nokia3110Classic'); this.handsets[this.handsets.length] = new Array('Nokia 6120', 'Nokia6120'); this.handsets[this.handsets.length] = new Array('Nokia 6280', 'Nokia6280'); this.handsets[this.handsets.length] = new Array('Nokia 6300', 'Nokia6300'); this.handsets[this.handsets.length] = new Array('Nokia 6500 Classic', 'Nokia6500Classic'); this.handsets[this.handsets.length] = new Array('Nokia 6500 Slide', 'Nokia6500Slide'); this.handsets[this.handsets.length] = new Array('Nokia N73', 'NokiaN73'); this.handsets[this.handsets.length] = new Array('Nokia N80', 'NokiaN80'); this.handsets[this.handsets.length] = new Array('Nokia N95', 'NokiaN95'); this.handsets[this.handsets.length] = new Array('Nokia N95 8Gb', 'NokiaN958Gb'); 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; } }