function AllPhoneSearch(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.data['o2'] = new Array();
	 this.data['o2'][this.data['o2'].length] = new Array("Nokia 3100", "o2/pay-as-you-go/nokia-3100.php");
 	 this.data['o2'][this.data['o2'].length] = new Array("Nokia 6610i", "o2/pay-as-you-go/nokia-6610i.php");
	 this.data['o2'][this.data['o2'].length] = new Array("Sagem myX3-2", "o2/pay-as-you-go/sagem-myx3-2.php");
	 this.data['o2'][this.data['o2'].length] = new Array("Samsung E330", "o2/pay-as-you-go/samsung-e330.php");
	 this.data['o2'][this.data['o2'].length] = new Array("Samsung E700", "o2/pay-as-you-go/samsung-e700.php");
	 this.data['o2'][this.data['o2'].length] = new Array("Samsung E800", "o2/pay-as-you-go/samsung-e800.php");
	 this.data['o2'][this.data['o2'].length] = new Array("Sony Ericsson T630", "o2/pay-as-you-go/sony-ericsson-t630.php");
	 this.data['o2'][this.data['o2'].length] = new Array("Sim Card Pack", "o2/sim-only/pay-and-go.php");
	 	
	 this.data['orange'] = new Array();
	 this.data['orange'][this.data['orange'].length] = new Array("Motorola C385", "orange/pay-as-you-go/motorola-c385.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Motorola V220", "orange/pay-as-you-go/motorola-v220.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Motorola V500", "orange/pay-as-you-go/motorola-v500.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Nokia 3220", "orange/pay-as-you-go/nokia-3220.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Nokia 6610i", "orange/pay-as-you-go/nokia-6610i.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Sagem myX5-2", "orange/pay-as-you-go/sagem-myx5-2.php"); 
	 this.data['orange'][this.data['orange'].length] = new Array("Siemens C65", "orange/pay-as-you-go/siemens-c65.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Siemens CX65", "orange/pay-as-you-go/siemens-cx65.php"); 
	 this.data['orange'][this.data['orange'].length] = new Array("Sony Ericsson K500i", "orange/pay-as-you-go/sony-ericsson-k500i.php");   	 
	 this.data['orange'][this.data['orange'].length] = new Array("Sony Ericsson K700i", "orange/pay-as-you-go/sony-ericsson-k700i.php");
	 this.data['orange'][this.data['orange'].length] = new Array("Sim Card Pack", "orange/sim-only/just-talk.php");

	 this.data['virgin'] = new Array();
     this.data['virgin'][this.data['virgin'].length] = new Array("-- Hassle-Free Packages --", "");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Motorola C651", "virgin/pay-as-you-go/motorola-c651.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Philips 355", "virgin/pay-as-you-go/philips-355.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Sony Ericsson T610", "virgin/pay-as-you-go/sony-ericsson-t610.php");
     this.data['virgin'][this.data['virgin'].length] = new Array("-- Brand New Phones --", "");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Alcatel 756", "virgin/pay-as-you-go/alcatel-756.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 1100", "virgin/pay-as-you-go/nokia-1100.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 6230", "virgin/pay-as-you-go/nokia-6230.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 6630", "virgin/pay-as-you-go/nokia-6630.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 6670", "virgin/pay-as-you-go/nokia-6670.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Siemens A65", "virgin/pay-as-you-go/siemens-a65.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("-- Phones --", "");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Micro Snapper", "virgin/pay-as-you-go/micro-snapper.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Motorola V220", "virgin/pay-as-you-go/motorola-v220.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 3200", "virgin/pay-as-you-go/nokia-3200.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 3220", "virgin/pay-as-you-go/nokia-3220.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Panasonic X300", "virgin/pay-as-you-go/panasonic-x300.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Philips 355", "virgin/pay-as-you-go/philips-355-standard.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung A800", "virgin/pay-as-you-go/samsung-a800.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung E330", "virgin/pay-as-you-go/samsung-e330.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung E400", "virgin/pay-as-you-go/samsung-e400.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung E700", "virgin/pay-as-you-go/samsung-e700.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung E800", "virgin/pay-as-you-go/samsung-e800.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung X460", "virgin/pay-as-you-go/samsung-x460.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Siemens A60", "virgin/pay-as-you-go/siemens-a60.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Siemens C62", "virgin/pay-as-you-go/siemens-c62.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Sony-Ericsson K500i", "virgin/pay-as-you-go/sony-ericsson-k500i.php");
 	 this.data['virgin'][this.data['virgin'].length] = new Array("Sony-Ericsson K700i", "virgin/pay-as-you-go/sony-ericsson-k700i.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Sony-Ericsson T610", "virgin/pay-as-you-go/sony-ericsson-t610-standard.php");
 	 this.data['virgin'][this.data['virgin'].length] = new Array("Sim Only Joining Pack", "virgin/sim-only/joiningpack.php");
     this.data['virgin'][this.data['virgin'].length] = new Array("-- Reconditioned Handsets --", "");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Alcatel 332", "virgin/reconditioned/alcatel-332.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Motorola V220", "virgin/reconditioned/motorola-v220.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Motorola C350", "virgin/reconditioned/motorola-c350.php");
     this.data['virgin'][this.data['virgin'].length] = new Array("Nokia 7250i", "virgin/reconditioned/nokia-7250i.php");	 
	 this.data['virgin'][this.data['virgin'].length] = new Array("Philips 355", "virgin/reconditioned/philips-355.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung A800", "virgin/reconditioned/samsung-a800.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Samsung E400", "virgin/reconditioned/samsung-e400.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Sendo M550", "virgin/reconditioned/sendo-m550.php");
	 this.data['virgin'][this.data['virgin'].length] = new Array("Siemens A50", "virgin/reconditioned/siemens-a50.php");
	  
	 this.data['tmobile'] = new Array();
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("LG C1200", "t-mobile/pay-as-you-go/lg-c1200.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("LG C2200", "t-mobile/pay-as-you-go/lg-c2200.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Motorola C650", "t-mobile/pay-as-you-go/motorola-c650.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Motorola E398", "t-mobile/pay-as-you-go/motorola-e398.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Motorola V300", "t-mobile/pay-as-you-go/motorola-v300.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Nokia 3220", "t-mobile/pay-as-you-go/nokia-3220.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Nokia 3410", "t-mobile/pay-as-you-go/nokia-3410.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Sagem myX5-2", "t-mobile/pay-as-you-go/sagem-myx52.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Sony Ericsson T630", "t-mobile/pay-as-you-go/sony-ericsson-t630.php");
	 this.data['tmobile'][this.data['tmobile'].length] = new Array("Sim Card Pack", "t-mobile/sim-only/payg-sim.php");
	  
	 this.data['vodafone'] = new Array();
	 this.data['vodafone'][this.data['vodafone'].length] = new Array("Motorola V525", "vodafone/pay-as-you-go/motorola-v525.php");
	 this.data['vodafone'][this.data['vodafone'].length] = new Array("Nokia 1100", "vodafone/pay-as-you-go/nokia-1100.php");
	 this.data['vodafone'][this.data['vodafone'].length] = new Array("Sharp GX30", "vodafone/pay-as-you-go/sharp-gx30.php");
	 this.data['vodafone'][this.data['vodafone'].length] = new Array("Siemens A60", "vodafone/pay-as-you-go/siemens-a60.php");
	 this.data['vodafone'][this.data['vodafone'].length] = new Array("Sim Card Pack", "vodafone/simonly/pay-as-you-talk.php");

	 this.data['three'] = new Array();
	 this.data['three'][this.data['three'].length] = new Array("LG u8120", "three/pay-as-you-go/lg-u8120.php");
	 this.data['three'][this.data['three'].length] = new Array("LG u8130", "three/pay-as-you-go/lg-u8130.php");

	 this.data['simfree'] = new Array();
	 this.data['simfree'][this.data['simfree'].length] = new Array("Motorola V220", "sim-free/motorola-v220.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Motorola V3 RAZR", "sim-free/motorola-v3.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Motorola V620", "sim-free/motorola-v620.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Motorola V635", "sim-free/motorola-v635.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 2650", "sim-free/nokia-2650.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 3220", "sim-free/nokia-3220.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 5140", "sim-free/nokia-5140.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6020", "sim-free/nokia-6020.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6170", "sim-free/nokia-6170.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6230", "sim-free/nokia-6230.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6230i", "sim-free/nokia-6230i.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6260", "sim-free/nokia-6260.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6610i", "sim-free/nokia-6610i.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6630", "sim-free/nokia-6630.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6680", "sim-free/nokia-6680.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 6820", "sim-free/nokia-6820.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 7260", "sim-free/nokia-7260.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 7280", "sim-free/nokia-7280.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 7610", "sim-free/nokia-7610.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 8910i", "sim-free/nokia-8910i.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 9300", "sim-free/nokia-9300.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Nokia 9500", "sim-free/nokia-9500.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Samsung D500", "sim-free/samsung-d500.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Samsung E600", "sim-free/samsung-e600.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Samsung E700", "sim-free/samsung-e700.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Samsung E800", "sim-free/samsung-e800.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Siemens SL65", "sim-free/siemens-sl65.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Sony Ericsson K500i", "sim-free/sony-ericsson-k500i.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Sony Ericsson K700i", "sim-free/sony-ericsson-k700i.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Sony Ericsson P910i", "sim-free/sony-ericsson-p910i.php");
	 this.data['simfree'][this.data['simfree'].length] = new Array("Sony Ericsson T630", "sim-free/sonye-ricsson-t630.php");
	 
	 this.ChangeNetwork(this.network_field.value);
}

AllPhoneSearch.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 handset" : "Select 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;
	
	}
}
 
AllPhoneSearch.prototype.GoTo = function(url) {
	// If a url has been entered, go to it.
// ((document.location.toString().indexOf("www.gomarketcity.com") > -1) ? "../default.htm" : "") + 
	if (url != "") document.location.href = this.root_path + url;
}
