function validatenumbers(field) {
var valid = "0123456789";
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Sorry - \n\nOnly numbers are accepted!\n");
field.focus();
return (false);
}
if (myform.frm_imei.value == '' || myform.frm_imei.value.length!=15 ){
	alert('Please complete IMEI number correctly,\nIt must be 15 digits long.\n\nThanks'); 
	myform.frm_imei.focus(); 
	return false;
	}
}
function OptionTestOperator() {
	OptionTestOperator = true;
	lgth = document.forms[0].frm_operator.options.length - 1;
	document.forms[0].frm_operator.options[lgth] = null;
	if (document.forms[0].frm_operator.options[lgth]) OptionTestOperator = false;
}
function OptionTestModel() {
	OptionTestModel = true;
	lgth = document.forms[0].frm_model.options.length - 1;
	document.forms[0].frm_model.options[lgth] = null;
	if (document.forms[0].frm_model.options[lgth]) OptionTestModel = false;
}
var operator = new Array();
operator['Afghanistan']=new Array('','Telephone Development Co','Telephone Systems Int Inc');
operator['Albania']=new Array('','Albanian Mobile Comms','Vodafone');
operator['Algeria']=new Array('','Algerian Telecom AMN','Orascom Telecom Algerie Spa');
operator['American Samoa']=new Array('','Blue Sky');
operator['Andorra']=new Array('','S.T.A. MobilAnd');
operator['Angola']=new Array('','Unitel');
operator['Antigua & Barbuda']=new Array('','APUA PCS');
operator['Argentina']=new Array('','CTI Movil','PORT HABLE','Telecom Personal SA','UNIFON','Nextel','Globalstar');
operator['Armenia']=new Array('','ArmenTel','Karabakh Telecom');
operator['Aruba']=new Array('','SETAR');
operator['Australia']=new Array('','Hutchinson 3G','Singtel Optus','Telstra Mobile Comms','Vodafone','Australia One Tel','Globalstar');
operator['Austria']=new Array('','3 AT','Connect Austria One','MobilKom Austria A1','T-Mobile','Tele2','Telefonica Austria','Tele.ring');
operator['Azerbaijan']=new Array('','Azercell Telekom B.M.','J.V.Bakcell GSM 2000');
operator['Bahamas']=new Array('','Bahamas Telcom Co');
operator['Bahrain']=new Array('','Batelco');
operator['Bangladesh']=new Array('','Grameen Phone','Sheba Telecom','TM Int l AKTEL');
operator['Barbados']=new Array('','Cable & Wireless');
operator['Belarus']=new Array('','VELCOM');
operator['Belgium']=new Array('','KPN Orange Belgium SA','Belgacom Mobile Proximus','Mobistar');
operator['Belize']=new Array('','Belize Telecom','Int Telecom INTELCO');
operator['Benin']=new Array('','BBCOM','BeninCell','LIBERCOM','TELECEL BENIN');
operator['Bermuda']=new Array('','BTC MOBILITY');
operator['Bhutan']=new Array('','BpMobile');
operator['Bolivia']=new Array('','Entel SA','Nuevatel PCS');
operator['Bosnia Herzegovina']=new Array('','Cronet','PTT Bosnia','PE PTT BIH');
operator['Botswana']=new Array('','Mascom Wireless','Vista Cellular');
operator['Brazil']=new Array('','Tim','Tim NEW 1','Tim NEW 2','Claro','Sercomtel','BrtCell','Oi');
operator['Brunei Darussalam']=new Array('','DST Communications','Jabatan Telekom');
operator['Bulgaria']=new Array('','GLOBUL','MobilTel AD M-TEL');
operator['Cambodia']=new Array('','Cambodia Samart Comms','CamGSM');
operator['Cameroon']=new Array('','PTT Cameroon Cellnet');
operator['Caymen Islands']=new Array('','Cable & Wireless');
operator['Canada']=new Array('','Fido','Microcell Connexions Inc','Rogers AT&T Wireless');
operator['Cape Verde']=new Array('','Cabo Verde Telecom CVMOVEL');
operator['Chile']=new Array('','Entel PCS Telecom.','Entel Telefonia Movil');
operator['China']=new Array('','China Telecom GSM','China Unicom GSM','Liaoning PPTA');
operator['Colombia']=new Array('','Colombia Movil SA','Occidente y Caribe Celula SA');
operator['Croatia']=new Array('','Croatian Telecoms Cronet','VIPnet');
operator['Cyprus']=new Array('','CYTA GSM');
operator['Czech Republic']=new Array('','SPT Telecom (OSKAR)','EuroTel Praha','T-Mobile CZ(Pegas)');
operator['Denmark']=new Array('','Debitel','Debitel 3510i','Debitel DCT3','Orange','Sonofon','TDC Mobil','Telia Denmark');
operator['Dominican Republic']=new Array('','Orange');
operator['Egypt']=new Array('','MobiNil','Misrfone Telecom');
operator['Estonia']=new Array('','Estonian Mobile Telephone','Radiolinja Eesti','Q GSM');
operator['Ethiopia']=new Array('','Ethiopian Telecoms Auth.');
operator['Fiji']=new Array('','Vodafone Fiji');
operator['Finland']=new Array('','Alands Mobiltelefon','Finnet Group','Radiolinja','Sonera Corporation','Telia Finland');
operator['France']=new Array('','Bouygues Telecom','Orange+France Telecom','SFR');
operator['French Polynesia']=new Array('','Tikiphone');
operator['French West Indies']=new Array('','France Caraibe Ameris');
operator['Georgia']=new Array('','Geocell Limited','Magti GSM');
operator['Germany']=new Array('','De TeMobile D1 T-Mobile','Vodafone D2 (DCT4)','Vodafone D2 (DCT 3310) ','Vodafone D2 (DCT 3210)','E-Plus Gmbh&Co KG E-Plus','O2 Deutschland (DCT4)','O2 Deutschland (DCT3 Prepay)','O2 Deutschland (DCT3 Contract)');
operator['Ghana']=new Array('','ScanCom');
operator['Gibraltar']=new Array('','Gibraltar Telecoms Gibtel');
operator['Greece']=new Array('','Cosmote','Q-Telecom','Telestet-TIM','Vodafone Panafon');
operator['Greenland']=new Array('','Tele Greenland');
operator['Guatemala']=new Array('','COMCEL');
operator['Guinea']=new Array('','Sotelgui Lagui');
operator['Hong Kong']=new Array('','Hong Kong Telecom CSL','Hutchinson Telecom','Pacific Link','New World PCS','Peoples Telephone','SmarTone Mobile Comms','P Plus Comm','Mandarin Com Sunday');
operator['Hungary']=new Array('','Pannon GSM','Vodaphone','Westel 900 GSM Mobile');
operator['Iceland']=new Array('','Iceland Telecom Siminn','TAL hf');
operator['India']=new Array('','TATA Cellular','Bharti Cellular Telecom Airtel','Sterling Cellular Essar','Escotel Mobile Comms','Modi Telstra Modicom','Aircel Digilink Essar Cellph.','Hutchison Max Touch','Usha Martin Tel. Command','Mobilene','SkyCell Communications','RPG MAA','Srinivas Cellcom','Mobile BPL MOBILE','USWest BPL MOBILE');
operator['Indonesia']=new Array('','PT. Satelindo','Telkomsel','PT. Excelcomindo Excelcom');
operator['Iran']=new Array('','TCI');
operator['Ireland']=new Array('','Meteor','O2 - Esat Digifone-code 7','Vodaphone (was Eirecell)');
operator['Israel']=new Array('','Cellcom','Partner Communications ORANGE');
operator['Italy']=new Array('','Telecom Italia Mobile TIM','Omnitel Pronto','Wind Telecomunicazioni','Telefonia mobile Italy');
operator['Ivory Coast']=new Array('','Comstar Cellular Network','Telecel','S.I.M Ivoiris','Loteny Telecom Telecel');
operator['Jamaica']=new Array('','Cable & Wireless Jamaica','Mossel DIGICEL');
operator['Japan']=new Array('','J-Phone/Vodaphone Japan');
operator['Jordan']=new Array('','J.M.T.S Fastlink');
operator['Kazakhstan']=new Array('','K Cell','K-Mobile');
operator['Kuwait']=new Array('','Mobile Telecoms MTCNet');
operator['Kyrgyz Republic']=new Array('','Bitel');
operator['Lao']=new Array('','Lao Shinawatra Telecom');
operator['Latvia']=new Array('','Latvian Mobile Tel.','BALTCOM GSM');
operator['Lebanon']=new Array('','FTML Cellis','LibanCell');
operator['Lesotho']=new Array('','Vodacom');
operator['Liberia']=new Array('','Omega Communications');
operator['Lithuania']=new Array('','Omnitel','LT TELE2','X-GSM tele2','UAB Bite GSM');
operator['Luxembourg']=new Array('','Millicom Tango GSM','P+T LUXGSM');
operator['Macau']=new Array('','C.T.M. TELEMOVEL+');
operator['Macedonia']=new Array('','Macedonian Tel. MobiMak');
operator['Madagascar']=new Array('','Madacom','Sacel','SMM Antaris');
operator['Malawi']=new Array('','Telekom Network Callpoint');
operator['Malaysia']=new Array('','My Digi','My BSB','Binariang','Binariang Comms','Telekom Cellular TM Touch','DiGi Telecommunications','Time Wireless Adam','Celcom');
operator['Mali']=new Array('','Malitel');
operator['Malta']=new Array('','Vodafone');
operator['Mauritius']=new Array('','Cellplus Mobile Comms');
operator['Mexico']=new Array('','MOVISTAR GSM - Pegaso GSM','TELCEL');
operator['Moldova']=new Array('','Voxtel');
operator['Morocco']=new Array('','Itissalat Al-Maghrib IAM');
operator['Mozambique']=new Array('','Telecom de Mocambique');
operator['Namibia']=new Array('','MTC');
operator['Netherlands']=new Array('','KPN Telecom','Telfort/O2','Dutchtone/Orange','T-Mobile - Ben','Vodafone/Libertel');
operator['New Caledonia']=new Array('','OPT Mobilis');
operator['New Zealand']=new Array('','Telecom NZ','Telstra','Vodafone');
operator['Nicaragua']=new Array('','SERCOM');
operator['Norway']=new Array('','Telenor Mobil','NetCom GSM','Teletopia','AC','hello','BS Mobil','Chess','Combitel Networks AS','Lyse Energi','PGOne','Sense','Symfonika AS','Tele2');
operator['Oman']=new Array('','General Telecoms');
operator['Pakistan']=new Array('','Mobilink');
operator['Papua New Guinea']=new Array('','Pacific Mobile Comms');
operator['Philippines']=new Array('','Sun Cellular','Globe Telecom','Isla Comms','Smart Communications');
operator['Poland']=new Array('','ERA GSM','IDEA Centertel','Polkomtel PLUS GSM');
operator['Portugal']=new Array('','Optimus','TMN','Vodafone/Yorn');
operator['Qatar']=new Array('','Q-Tel QATARNET');
operator['Reunion']=new Array('','Societe Reunionnaise SRR');
operator['Romania']=new Array('','Cosmorom','MobiFon CONNEX GSM','Mobil Rom DIALOG');
operator['Russia']=new Array('','MTS Moscow','North-West GSM','Siberian Cellular','Zao Smarts','Don Telecom','New Telephone Company','Kuban GSM','Russia Wireless Technology','Uratel','North Caucasian GSM','KB Impuls BeeLine');
operator['Rwanda']=new Array('','Rwandacell');
operator['Saudi Arabia']=new Array('','Electronics App Est. EAE','Ministry of PTT Al Jawal');
operator['Senegal']=new Array('','Sonatel ALIZE');
operator['Seychelles']=new Array('','Airtel','Seychelles Cellular Services');
operator['Singapore']=new Array('','MobileOne','SingTel ST-GSM 1800','SingTel ST-GSM 900');
operator['Slovak Republic']=new Array('','EuroTel GSM','Orange');
operator['Slovenia']=new Array('','Mobitel','Si.mobil');
operator['South Africa']=new Array('','MTN','Vodacom');
operator['Spain']=new Array('','Vodafone / Airtel Movil','Retevision Movil Amena','Movistar (DCT3 Old Contract?)','Movistar (DCT3)','Movistar (DCT4)','Movistar (6100)');
operator['Sri Lanka']=new Array('','MTN Networks Dialog GSM');
operator['St. Vincent & the Grenadir']=new Array('','Cable & Wireless Caribbean');
operator['Sudan']=new Array('','MobiTel');
operator['Sweden']=new Array('','Telia Mobitel (3510i)','Telia Mobitel','Tre','Orange','Comviq GSM','Vodafone');
operator['Switzerland']=new Array('','Orange','diAx Mobile','Swisscom NATEL');
operator['Syria']=new Array('','Syrian Telecom Est. MOBILE SYRIA','SYRIATEL');
operator['Taiwan']=new Array('','Far EasTone Telecoms','TUNTEX Telecom','KG Telecom','Chunghwa Telecom','Mobitai Communications','Pacific Cellular TWNGSM','TransAsia Telecoms');
operator['Tanzania']=new Array('','Tritel');
operator['Thailand']=new Array('','Advanced Info Service AIS','WCS IQ','Total Access Worldphone','Digital Phone HELLO');
operator['Togo']=new Array('','Togo Telecom TOGO CELL');
operator['Trinidad and Tobago']=new Array('','TSTT');
operator['Tunisia']=new Array('','Tunisie Telecom Tunicell');
operator['Turkey']=new Array('','TELSIM Mobil Telekom.','Turk Telekom Turkcell');
operator['Turkmenistan']=new Array('','Turkmenistan BCTI');
operator['U.S.A.']=new Array('','CINGULAR - Pacific Bell Wireless','T-Mobile','T-Mobile Tampa Florida','Powertel','T-Mobile Florida','AT&T(Other DCT4)','Cincinnati Bell Wireless','Iowa Wireless Services','AT&T (3650)');
operator['Uganda']=new Array('','Celtel Cellular','MTN Uganda');
operator['Ukraine']=new Array('','Golden Telecom','Kyivstar GSM','Ukrainian Mobile Comms','Ukrainian Radio Systems');
operator['United Arab Emirates']=new Array('','UAE ETISALAT-G1','UAE ETISALAT-G2');
operator['United Kingdom']=new Array('','Tesco Mobile','02 - Cellnet','Vodafone','3G (3)','T-Mobile-One 2 One','Virgin','Orange','Jersey Telecom GSM','Guernsey Telecoms GSM','Manx Telecom Pronto GSM');
operator['Uzbekistan']=new Array('','Buztel','Coscom','Daewoo Unitel');
operator['Venezuela']=new Array('','Infonet');
operator['Vietnam']=new Array('','MTSC','DGPT');
operator['Yugoslavia']=new Array('','MOBTEL','ProMonte GSM');
operator['Zambia']=new Array('','Zamcell');
operator['Zimbabwe']=new Array('','NET*ONE','Telecel');
var model = new Array();
model['Nokia']=new Array('','**DCT3**','2100','3210','3310','3315','3330','3350','3390','3395','3410','3610','5110','5210','5510','6110','6130','6150','6210','6250','7110','8210','8250','8810','8850','8855','8890','9210','9210i','9290','**DCT4**','1100','1101','1108','1110','1600','2100','2300','2600','2650','3100','3108','3120','3120b','3200','3220','3300','3510','3510i','3530','3590','3595','3600','3620','3650','3660','5100','5140','6010','6020','6021','6030','6100','6101','6108','6111','6170','6200','6220','6230','6230i','6260','6310','6310i','6340','6340i','6510','6590','6600','6610','6610i','6620','6650','6670','6800','6810','6820','7200','7210','7250','7250i','7260','7270','7280','7600','7610','7650','7700','7710','8310','8390','8800','8910','8910i','N-Gage','N-Gage QD');
model['LG']=new Array('','1300','510','510W','520','7010','7020','B1200','B1300','G510','M1200', 'M1300','W3000');
model['Panasonic']=new Array('','G50','G51','GD50','GD55');
model['Samsung']=new Array('','SGH-A300','SGH-A400','SGH-A800','SGH-E400','SGH-E500','SGH-E700','SGH-E715','SGH-M100','SGH-P400','SGH-S100','SGH-S105','SGH-S300','SGH-S307','SGH-S500','SGH-600','SGH-2100','SGH-V200','SGH-X100','SGH-X600','SGH-R210');
model['Siemens']=new Array('','8008','CL50','CL55','ST55','ST60');
model['Sony']=new Array('','CMD-C1','CMD-CD5');
function PopulateOperators(){
	if (!OptionTestOperator) return;
	var box = document.forms[0].frm_country;
	var number = box.options[box.selectedIndex].value;
	if (!number) return;
	var list = operator[number];
	var box2 = document.forms[0].frm_operator;
	box2.options.length = 0;
	for(i=0;i<list.length;i+=1)	{
	box2.options[i] = new Option(list[i],list[i]);
	}
}
function PopulateModels(){
	if (!OptionTestModel) return;
	var box = document.forms[0].frm_manu;
	var number = box.options[box.selectedIndex].value;
	if (!number) return;
	var list = model[number];
	var box2 = document.forms[0].frm_model;
	box2.options.length = 0;
	for(i=0;i<list.length;i+=1)	{
	box2.options[i] = new Option(list[i],list[i]);
	}
}
function validate(myform) {
if (myform.frm_email.value == '') {
	alert('Valid email address required\nPlease amend and retry'); 
	myform.frm_email.focus(); 
	return false;
	}
validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
strEmail = myform.frm_email.value;
// search email text for regular exp matches
if (strEmail.search(validRegExp) == -1) 
{
alert('Valid email address required\nPlease amend and retry');
return false;
} 
if (myform.frm_imei.value == '' || myform.frm_imei.value.length!=15 ){
	alert('Please complete IMEI number correctly,\nIt must be 15 digits long.\n\nThanks'); 
	myform.frm_imei.focus(); 
	return false;
	}
if (myform.frm_manu.value == ''){
	alert('Please select the manufacturer'); 
	myform.frm_manu.focus(); 
	return false;
	}
if (myform.frm_model.value == ''){
	alert('Please select which model handset'); 
	myform.frm_model.focus(); 
	return false;
	}
if (myform.frm_country.value == ''){
	alert('Please select country'); 
	myform.frm_country.focus(); 
	return false;
	}
if (myform.frm_operator.value == ''){
	alert('Please select network'); 
	myform.frm_operator.focus(); 
	return false;
	}
if (myform.terms.checked==false) {
alert('Please agree to Terms & Conditions');
return false;
}
return true;
}

var popupcount = 0;
function openWindow(url, w,h,s) {
var options = "width=" + w + ",height=" + h +",";
options += "resizable=no,scrollbars=" + s + ",status=no,";
options += "menubar=no,toolbar=no,location=no,directories=no";
var newWin = window.open(url, 'newWin'+575128, options);
newWin.focus();
popupcount++;
return false;
}
