function AllPhoneSearchTwo(f, rp) { this.a = 'mobile-phone-finder'; this.f = f; this.rp = rp; this.nf = (this.f.network) ? this.f.network : ''; this.pf = this.f.phone; this.d = new Array(); this.d['HTCDesire'] = new Array(); this.d['HTCDesire'][this.d['HTCDesire'].length] = new Array('', '/mobile-phones//contract-mobile-phones/htc-desire.php/'); this.d['LGVirgo'] = new Array(); this.d['LGVirgo'][this.d['LGVirgo'].length] = new Array('', '/mobile-phones//contract-mobile-phones/lg-virgo.php/'); this.d['MotorolaZN5'] = new Array(); this.d['MotorolaZN5'][this.d['MotorolaZN5'].length] = new Array('', '/mobile-phones//contract-mobile-phones/motorola-zn5.php/'); this.d['NokiaE55'] = new Array(); this.d['NokiaE55'][this.d['NokiaE55'].length] = new Array('', '/mobile-phones//contract-mobile-phones/nokia-e55.php/'); this.d['NokiaN75'] = new Array(); this.d['NokiaN75'][this.d['NokiaN75'].length] = new Array('', '/mobile-phones//contract-mobile-phones/nokia-n75.php/'); this.d['NokiaN77'] = new Array(); this.d['NokiaN77'][this.d['NokiaN77'].length] = new Array('', '/mobile-phones//contract-mobile-phones/nokia-n77.php/'); this.d['SonyEricssonK550iWhite'] = new Array(); this.d['SonyEricssonK550iWhite'][this.d['SonyEricssonK550iWhite'].length] = new Array('', '/mobile-phones//contract-mobile-phones/sony-ericsson-k550i-white.php/'); this.d['SonyEricssonK800iBrown'] = new Array(); this.d['SonyEricssonK800iBrown'][this.d['SonyEricssonK800iBrown'].length] = new Array('', '/mobile-phones//contract-mobile-phones/sony-ericsson-k800i-brown.php/'); this.d['SonyEricssonT700Red'] = new Array(); this.d['SonyEricssonT700Red'][this.d['SonyEricssonT700Red'].length] = new Array('', '/mobile-phones//contract-mobile-phones/sony-ericsson-t700-red.php/'); this.d['SonyEricssonT700Silver'] = new Array(); this.d['SonyEricssonT700Silver'][this.d['SonyEricssonT700Silver'].length] = new Array('', '/mobile-phones//contract-mobile-phones/sony-ericsson-t700-silver.php/'); this.d['SonyEricssonXperiaX10'] = new Array(); this.d['SonyEricssonXperiaX10'][this.d['SonyEricssonXperiaX10'].length] = new Array('', '/mobile-phones//contract-mobile-phones/sony-ericsson-xperia-x10.php/'); this.h = new Array(); this.h[this.h.length] = new Array('HTC Desire', 'HTCDesire'); this.h[this.h.length] = new Array('LG Virgo', 'LGVirgo'); this.h[this.h.length] = new Array('Motorola ZN5', 'MotorolaZN5'); this.h[this.h.length] = new Array('Nokia E55', 'NokiaE55'); this.h[this.h.length] = new Array('Nokia N75', 'NokiaN75'); this.h[this.h.length] = new Array('Nokia N77', 'NokiaN77'); this.h[this.h.length] = new Array('Sony Ericsson K550i White', 'SonyEricssonK550iWhite'); this.h[this.h.length] = new Array('Sony Ericsson K800i Brown', 'SonyEricssonK800iBrown'); this.h[this.h.length] = new Array('Sony Ericsson T700 Red', 'SonyEricssonT700Red'); this.h[this.h.length] = new Array('Sony Ericsson T700 Silver', 'SonyEricssonT700Silver'); this.h[this.h.length] = new Array('Sony Ericsson Xperia X10', 'SonyEricssonXperiaX10'); this.InitHandsets(); // this.ChangeNetwork(this.nf.value); } AllPhoneSearchTwo.prototype.ChangeHandset = function(hs) { for (i = this.nf.options.length; i >= 0; i--) { this.nf.options[i] = null; } // Add the option to select the handset/network this.nf.options[0] = new Option(((hs != "") ? "Now choose Network..." : "...then choose Network"), ""); // If a network is selected, add the options if (hs != "" && this.d[hs]) { // this.nf.options[this.nf.options.length] = new Option('all', 'all'); for (i = 0; i < this.d[hs].length; i++) { this.nf.options[this.nf.options.length] = new Option(this.d[hs][i][0], this.d[hs][i][1]); } if (this.ps > 0) this.nf.selectedIndex = this.ps; if (this.pf != '') { this.pf.value = hs; } } } AllPhoneSearchTwo.prototype.ChangeNetwork = function(nw) { var i; // Remove all the options out of the phone field for (i = this.pf.options.length; i >= 0; i--) { this.pf.options[i] = null; } // Add the option to select the handset/network this.pf.options[0] = new Option(((nw != "") ? "Choose Handset first..." : "...then choose Network"), ""); // If a network is selected, add the options if (nw != "" && this.d[nw]) { for (i = 0; i < this.data[network].length; i++) { this.pf.options[this.pf.options.length] = new Option(this.d[nw][i][0], this.d[nw][i][1]); } if (this.ps > 0) this.pf.selectedIndex = this.ps; if (this.nf != '') { this.nf.value = nw; } } } AllPhoneSearchTwo.prototype.InitHandsets = function() { for (i = this.pf.options.length; i >= 0; i--) { this.pf.options[i] = null; } // Add the option to select the handset/network this.pf.options[0] = new Option("Choose Handset first...", ""); for (i = 0; i < this.h.length; i++) { this.pf.options[this.pf.options.length] = new Option(this.h[i][0], this.h[i][1]); } } AllPhoneSearchTwo.prototype.GoTo = function(url) { if (url != "") { document.location.href = url; } }