/*
Author: Andrew Newnham
Creation Date: 09/03/09
Last Update:
*/

/* Creating a 3d array to hold all language data */
function fieldDef(title,residence,location,checkin,nights,rooms,adults,children,infants,select,trvClass,tripType,hotelType,dprt,rtrn,holidayTitle,searchButton){
	this.title=title;
	this.residence=residence;
	this.location=location
	this.checkin=checkin;
	this.nights=nights;
	this.rooms=rooms;
	this.adults=adults;
	this.children=children;
	this.infants=infants;
	this.select=select;
	this.trvClass=trvClass;
	this.tripType=tripType;
	this.hotelType=hotelType;
	this.dprt=dprt;
	this.rtrn=rtrn;
	this.holidayTitle=holidayTitle;
	this.searchButton=searchButton;
}

var langList=new Array();

//English
langList[0]=new fieldDef('Hotels','Country of Residence','Destination','Check-in','Nights','Rooms','Adults','Children','Infants','select','Class','Trip Type','Hotel Type','Depart','Return','Book together and save Flight + Hotel', 'Search');


//Creating a 3D array to hold the destination list and any translations.
function destDef (auh,amd,aly,alg,amm,atq,ams,esb,ath,atl,bah,dps,bkk,bcn,pek,bey,blr,txl,bio,bos,bru,eze,cai,cpt,cmn,ceb,clt,maa,cnx,ord,cmb,cph,ork,dfw,dam,dmm,dar,del,den,dac,doh,dxb,dub,edi,fra,fuk,gbe,gva,gla,goi,can,han,sgn,hkg,iah,hyd,isb,ist,cgk,jed,jnb,kbl,khi,ktm,krt,cok,ccj,kul,kwi,lhe,lon,lax,lxr,mad,agp,mle,man,mnl,mhd,mel,msp,mxp,yul,dme,bom,muc,mct,nbo,nyc,kix,osl,pmi,cdg,pen,pew,phl,pnh,hkt,ruh,fco,slc,sfo,sah,gru,cts,icn,sez,pvg,sin,arn,syd,ika,trv,tyo,yto,tip,tun,vie,iad,wdh,zrh){
	this.auh=auh;
	this.amd=amd;
	this.aly=aly;
	this.alg=alg;
	this.amm=amm;
	this.atq=atq;
	this.ams=ams;
	this.esb=esb;
	this.ath=ath;
	this.atl=atl;
	this.bah=bah;
	this.dps=dps;
	this.bkk=bkk;
	this.bcn=bcn;
	this.pek=pek;
	this.bey=bey;
	this.blr=blr;
	this.txl=txl;
	this.bio=bio;
	this.bos=bos;
	this.bru=bru;
	this.eze=eze;
	this.cai=cai;
	this.cpt=cpt;
	this.cmn=cmn;
	this.ceb=ceb;
	this.clt=clt;
	this.maa=maa;
	this.cnx=cnx;
	this.ord=ord;
	this.cmb=cmb;
	this.cph=cph;
	this.ork=ork;
	this.dfw=dfw;
	this.dam=dam;
	this.dmm=dmm;
	this.dar=dar;
	this.del=del;
	this.den=den
	this.dac=dac;
	this.doh=doh;
	this.dxb=dxb;
	this.dub=dub;
	this.edi=edi;
	this.fra=fra;
	this.fuk=fuk;
	this.gbe=gbe;
	this.gva=gva;
	this.gla=gla;
	this.goi=goi;
	this.can=can;
	this.han=han;
	this.sgn=sgn;
	this.hkg=hkg;
	this.iah=iah;
	this.hyd=hyd;
	this.isb=isb;
	this.ist=ist;
	this.cgk=cgk;
	this.jed=jed;
	this.jnb=jnb;
	this.kbl=kbl;
	this.khi=khi;
	this.ktm=ktm;
	this.krt=krt;
	this.cok=cok;
	this.ccj=ccj;
	this.kul=kul;
	this.kwi=kwi;
	this.lhe=lhe;
	this.lon=lon;
	this.lax=lax;
	this.lxr=lxr;
	this.mad=mad;
	this.agp=agp;
	this.mle=mle;
	this.man=man;
	this.mnl=mnl;
	this.mhd=mhd;
	this.mel=mel;
	this.msp=msp;
	this.mxp=mxp;
	this.yul=yul;
	this.dme=dme;
	this.bom=bom;
	this.muc=muc;
	this.mct=mct;
	this.nbo=nbo;
	this.nyc=nyc;
	this.kix=kix;
	this.osl=osl;
	this.pmi=pmi;
	this.cdg=cdg;
	this.pen=pen;
	this.pew=pew;
	this.phl=phl;
	this.pnh=pnh;
	this.hkt=hkt;
	this.ruh=ruh;
	this.fco=fco;
	this.slc=slc;
	this.sfo=sfo;
	this.sah=sah;
	this.gru=gru;
	this.cts=cts;
	this.icn=icn;
	this.sez=sez;
	this.pvg=pvg;
	this.sin=sin;
	this.arn=arn;
	this.syd=syd;
	this.ika=ika;
	this.trv=trv;
	this.tyo=tyo;
	this.yto=yto;
	this.tip=tip;
	this.tun=tun;
	this.vie=vie;
	this.iad=iad;
	this.wdh=wdh;
	this.zrh=zrh;
}

var destList=new Array();
var encodingType=new Array();
//English
destList[0]=new destDef('Abu Dhabi','Ahmedabad','Alexandria','Algiers','Amman','Amritsar','Amsterdam','Ankara','Athens','Atlanta','Bahrain','Bali','Bangkok','Barcelona','Beijing','Beirut','Bengaluru','Berlin','Bilbao','Boston','Brussels','Buenos Aires','Cairo','Cape Town','Casablanca','Cebu','Charlotte','Chennai','Chiang Mai','Chicago','Colombo','Copenhagen','Cork','Dallas','Damascus','Dammam','Dar Es Salaam','Delhi','Denver','Dhaka','Doha','Dubai','Dublin','Edinburgh','Frankfurt','Fukuoka','Gaborone','Geneva','Glasgow','Goa','Guangzhou','Hanoi','Ho Chi Minh','Hong Kong','Houston','Hyderabad','Islamabad','Istanbul','Jakarta','Jeddah','Johannesburg','Kabul','Karachi','Kathmandu','Khartoum','Kochi','Kozhikode','Kuala Lumpur','Kuwait','Lahore','London','Los Angeles','Luxor','Madrid','Malaga','Maldives','Manchester','Manila','Mashad','Melbourne','Minneapolis','Milan','Montreal','Moscow','Mumbai','Munich','Muscat','Nairobi','New York','Osaka','Oslo','Palma','Paris','Penang','Peshawar','Philadelphia','Phnom Penh','Phuket','Riyadh','Rome','Salt Lake City','San Francisco','Sanaa','Sao Paulo','Sapporo','Seoul','Seychelles','Shanghai','Singapore','Stockholm','Sydney','Tehran','Trivandrum','Tokyo','Toronto','Tripoli','Tunis','Vienna','Washington','Windhoek','Zurich');


//3d Arrary for RezGateway City info
function cityDef(countryName,countryCode,cityName,cityCode,iata,airport){
 this.countryName=countryName;
 this.countryCode=countryCode;
 this.cityName=cityName;
 this.cityCode=cityCode;
 this.iata=iata;
 this.airport=airport;
}
function countryDef(counrtyId,countryCode,countryName){
 	this.counrtyId=counrtyId;
	this.countryCode=countryCode;
	this.countryName=countryName;
}

var cityList=new Array();
var countryList=new Array();

//Countries List
countryList[0]=new countryDef('0','0~AF','Afghanistan');
countryList[1]=new countryDef('0','0~AL','Albania');
countryList[2]=new countryDef('143','0~DZ','Algeria');
countryList[3]=new countryDef('144','0~AS','American Samoa');
countryList[4]=new countryDef('145','0~AD','Andorra');
countryList[5]=new countryDef('146','0~AO','Angola');
countryList[6]=new countryDef('147','0~AI','Anguilla');
countryList[7]=new countryDef('0','0~AQ','Antarctica');
countryList[8]=new countryDef('149','0~AG','Antigua And Barbuda');
countryList[9]=new countryDef('150','0~AR','Argentina');
countryList[10]=new countryDef('151','0~AM','Armenia');
countryList[11]=new countryDef('152','0~AW','Aruba');
countryList[12]=new countryDef('153','0~AU','Australia');
countryList[13]=new countryDef('154','0~AT','Austria');
countryList[14]=new countryDef('155','0~AZ','Azerbaijan');
countryList[15]=new countryDef('156','0~BS','Bahamas');
countryList[16]=new countryDef('157','1~BH','Bahrain');
countryList[17]=new countryDef('158','0~BD','Bangladesh');
countryList[18]=new countryDef('159','0~BB','Barbados');
countryList[19]=new countryDef('160','0~BY','Belarus');
countryList[20]=new countryDef('161','0~BE','Belgium');
countryList[21]=new countryDef('162','0~BZ','Belize');
countryList[22]=new countryDef('163','0~BJ','Benin');
countryList[23]=new countryDef('164','0~BM','Bermuda');
countryList[24]=new countryDef('165','0~BT','Bhutan');
countryList[25]=new countryDef('166','0~BO','Bolivia');
countryList[26]=new countryDef('167','0~BA','Bosnia and Herzegovina');
countryList[27]=new countryDef('168','0~BW','Botswana');
countryList[28]=new countryDef('169','0~BV','Bouvet Island');
countryList[29]=new countryDef('170','0~BR','Brazil');
countryList[30]=new countryDef('172','0~BN','Brunei');
countryList[31]=new countryDef('173','0~BG','Bulgaria');
countryList[32]=new countryDef('174','0~BF','Burkina Faso');
countryList[33]=new countryDef('175','0~BI','Burundi');
countryList[34]=new countryDef('176','0~KH','Cambodia');
countryList[35]=new countryDef('177','0~CM','Cameroon');
countryList[36]=new countryDef('178','0~CA','Canada');
countryList[37]=new countryDef('179','0~CV','Cape Verde');
countryList[38]=new countryDef('180','0~KY','Cayman Islands');
countryList[39]=new countryDef('182','0~TD','Chad');
countryList[40]=new countryDef('183','0~CL','Chile');
countryList[41]=new countryDef('184','0~CN','China');
countryList[42]=new countryDef('187','0~CO','Colombia');
countryList[43]=new countryDef('188','0~KM','Comoros');
countryList[44]=new countryDef('189','0~CG','Congo');
countryList[45]=new countryDef('190','0~CD','Congo Democractic Republic');
countryList[46]=new countryDef('191','0~CK','Cook Islands');
countryList[47]=new countryDef('192','0~CR','Costa Rica');
countryList[48]=new countryDef('193','0~CI','Cote DIvoire (Ivory Coast)');
countryList[49]=new countryDef('194','0~HR','Croatia (Hrvatska)');
countryList[50]=new countryDef('195','0~CU','Cuba');
countryList[51]=new countryDef('196','0~CY','Cyprus');
countryList[52]=new countryDef('197','0~CZ','Czech Republic');
countryList[53]=new countryDef('198','0~DK','Denmark');
countryList[54]=new countryDef('199','0~DJ','Djibouti');
countryList[55]=new countryDef('200','0~DM','Dominica');
countryList[56]=new countryDef('201','0~DO','Dominican Republic');
countryList[57]=new countryDef('202','0~TP','East Timor');
countryList[58]=new countryDef('203','0~EC','Ecuador');
countryList[59]=new countryDef('204','0~EG','Egypt');
countryList[60]=new countryDef('205','0~SV','El Salvador');
countryList[61]=new countryDef('208','0~EE','Estonia');
countryList[62]=new countryDef('209','0~ET','Ethiopia');
countryList[63]=new countryDef('210','0~FK','Falkland Islands (Islas Malvinas)');
countryList[64]=new countryDef('211','0~FO','Faroe Islands');
countryList[65]=new countryDef('212','0~FJ','Fiji');
countryList[66]=new countryDef('213','0~FI','Finland');
countryList[67]=new countryDef('214','0~FR','France');
countryList[68]=new countryDef('215','0~GF','French Guiana');
countryList[69]=new countryDef('216','0~PF','French Polynesia');
countryList[70]=new countryDef('217','0~TF','French Southern Territories');
countryList[71]=new countryDef('218','0~GA','Gabon');
countryList[72]=new countryDef('219','0~GM','Gambia');
countryList[73]=new countryDef('220','0~GE','Georgia');
countryList[74]=new countryDef('221','4~DE','Germany');
countryList[75]=new countryDef('222','0~GH','Ghana');
countryList[76]=new countryDef('223','0~GI','Gibraltar');
countryList[77]=new countryDef('224','0~GR','Greece');
countryList[78]=new countryDef('225','0~GL','Greenland');
countryList[79]=new countryDef('226','0~GD','Grenada');
countryList[80]=new countryDef('227','0~GP','Guadeloupe');
countryList[81]=new countryDef('0','0~GU','Guam');
countryList[82]=new countryDef('0','0~GT','Guatemala');
countryList[83]=new countryDef('0','0~GN','Guinea');
countryList[84]=new countryDef('0','0~GW','Guinea-Bissau');
countryList[85]=new countryDef('0','0~GY','Guyana');
countryList[86]=new countryDef('0','0~HT','Haiti');
countryList[87]=new countryDef('0','0~HM','Heard and McDonald Islands');
countryList[88]=new countryDef('0','0~HN','Honduras');
countryList[89]=new countryDef('78','0~HK','Hong Kong');
countryList[90]=new countryDef('79','0~HU','Hungary');
countryList[91]=new countryDef('80','0~IS','Iceland');
countryList[92]=new countryDef('81','0~IN','India');
countryList[93]=new countryDef('82','0~ID','Indonesia');
countryList[94]=new countryDef('83','0~IR','Iran');
countryList[95]=new countryDef('84','0~IQ','Iraq');
countryList[96]=new countryDef('85','0~IE','Ireland');
countryList[97]=new countryDef('86','0~IL','Israel');
countryList[98]=new countryDef('87','2~IT','Italy');
countryList[99]=new countryDef('88','0~JM','Jamaica');
countryList[100]=new countryDef('89','0~JP','Japan');
countryList[101]=new countryDef('90','0~JO','Jordan');
countryList[102]=new countryDef('91','0~KZ','Kazakhstan');
countryList[103]=new countryDef('92','0~KE','Kenya');
countryList[104]=new countryDef('93','0~KI','Kiribati');
countryList[105]=new countryDef('94','0~KR','Korea');
countryList[106]=new countryDef('95','1~KW','Kuwait');
countryList[107]=new countryDef('96','0~KG','Kyrgyzstan');
countryList[108]=new countryDef('98','0~LA','Laos');
countryList[109]=new countryDef('99','0~LV','Latvia');
countryList[110]=new countryDef('100','0~LB','Lebanon');
countryList[111]=new countryDef('101','0~LS','Lesotho');
countryList[112]=new countryDef('102','0~LR','Liberia');
countryList[113]=new countryDef('103','0~LY','Libya');
countryList[114]=new countryDef('104','0~LI','Liechtenstein');
countryList[115]=new countryDef('105','0~LT','Lithuania');
countryList[116]=new countryDef('106','0~LU','Luxembourg');
countryList[117]=new countryDef('107','0~MO','Macau');
countryList[118]=new countryDef('108','0~MK','Macedonia');
countryList[119]=new countryDef('109','0~MG','Madagascar');
countryList[120]=new countryDef('110','0~MW','Malawi');
countryList[121]=new countryDef('111','0~MY','Malaysia');
countryList[122]=new countryDef('112','0~MV','Maldives');
countryList[123]=new countryDef('113','0~ML','Mali');
countryList[124]=new countryDef('114','0~MT','Malta');
countryList[125]=new countryDef('115','0~MH','Marshall Islands');
countryList[126]=new countryDef('116','0~MQ','Martinique');
countryList[127]=new countryDef('117','0~MR','Mauritania');
countryList[128]=new countryDef('118','0~MU','Mauritius');
countryList[129]=new countryDef('119','0~YT','Mayotte');
countryList[130]=new countryDef('120','0~MX','Mexico');
countryList[131]=new countryDef('121','0~FM','Micronesia');
countryList[132]=new countryDef('122','0~MD','Moldova');
countryList[133]=new countryDef('123','0~MC','Monaco');
countryList[134]=new countryDef('124','0~MN','Mongolia');
countryList[135]=new countryDef('125','0~ME','Montenegro');
countryList[136]=new countryDef('126','0~MA','Morocco');
countryList[137]=new countryDef('127','0~MZ','Mozambique');
countryList[138]=new countryDef('128','0~MM','Myanmar');
countryList[139]=new countryDef('129','0~NA','Namibia');
countryList[140]=new countryDef('130','0~NR','Nauru');
countryList[141]=new countryDef('131','0~NP','Nepal');
countryList[142]=new countryDef('133','0~NL','Netherlands');
countryList[143]=new countryDef('132','0~AN','Netherlands Antilles');
countryList[144]=new countryDef('134','0~NC','New Caledonia');
countryList[145]=new countryDef('135','0~NZ','NewZ ealand');
countryList[146]=new countryDef('136','0~NI','Nicaragua');
countryList[147]=new countryDef('137','0~NE','Niger');
countryList[148]=new countryDef('138','0~NG','Nigeria');
countryList[149]=new countryDef('139','0~NU','Niue');
countryList[150]=new countryDef('140','0~NF','Norfolk Island');
countryList[151]=new countryDef('238','0~NY','North Cyprus');
countryList[152]=new countryDef('230','0~NO','Norway');
countryList[153]=new countryDef('231','1~OM','Oman');
countryList[154]=new countryDef('232','0~PK','Pakistan');
countryList[155]=new countryDef('233','0~PW','Panama');
countryList[156]=new countryDef('234','0~PA','Panama');
countryList[157]=new countryDef('235','0~PG','Papua new Guinea');
countryList[158]=new countryDef('236','0~PY','Paraguay');
countryList[159]=new countryDef('237','0~PE','Peru');
countryList[160]=new countryDef('1','0~PH','Philippines');
countryList[161]=new countryDef('2','0~PN','Pitcairn Island');
countryList[162]=new countryDef('3','0~PL','Poland');
countryList[163]=new countryDef('4','0~PT','Portugal');
countryList[164]=new countryDef('5','0~PR','Puerto Rico');
countryList[165]=new countryDef('6','1~QA','Qatar');
countryList[166]=new countryDef('7','0~RE','Reunion');
countryList[167]=new countryDef('8','0~RO','Romania');
countryList[168]=new countryDef('9','0~RU','Russia');
countryList[169]=new countryDef('10','0~RW','Rwanda');
countryList[170]=new countryDef('11','0~SH','Saint Helena');
countryList[171]=new countryDef('12','0~KN','Saint Kitts And Nevis');
countryList[172]=new countryDef('13','0~LC','Saint Lucia');
countryList[173]=new countryDef('14','0~PM','Saint Pierre and Miquelon');
countryList[174]=new countryDef('15','0~VC','Saint Vincent And The Grenadines');
countryList[175]=new countryDef('16','0~WS','Samoa');
countryList[176]=new countryDef('17','0~SM','San Marino');
countryList[177]=new countryDef('18','0~MF','San Martin');
countryList[178]=new countryDef('19','1~SA','Saudi Arabia');
countryList[179]=new countryDef('265','0~SC','Scotland');
countryList[180]=new countryDef('0','0~SN','Senegal');
countryList[181]=new countryDef('0','0~RS','Serbia');
countryList[182]=new countryDef('21','0~SC','Seychelles');
countryList[183]=new countryDef('22','0~SL','Sierra Leone');
countryList[184]=new countryDef('23','0~SG','Singapore');
countryList[185]=new countryDef('24','0~SK','Slovakia');
countryList[186]=new countryDef('25','0~SI','Slovenia');
countryList[187]=new countryDef('26','0~SB','Solomon Islands');
countryList[188]=new countryDef('27','0~SO','Somalia');
countryList[189]=new countryDef('28','0~ZA','South Africa');
countryList[190]=new countryDef('239','0~AG','South Korea');
countryList[191]=new countryDef('29','3~ES','Spain');
countryList[192]=new countryDef('30','0~LK','Sri Lanka');
countryList[193]=new countryDef('31','0~SD','Sudan');
countryList[194]=new countryDef('32','0~SR','Suriname');
countryList[195]=new countryDef('33','0~SJ','Svalbard And Jan Mayen Islands');
countryList[196]=new countryDef('34','0~SZ','Swaziland');
countryList[197]=new countryDef('35','0~SE','Sweden');
countryList[198]=new countryDef('36','0~CH','Switzerland');
countryList[199]=new countryDef('37','0~SY','Syria');
countryList[200]=new countryDef('38','0~TW','Taiwan');
countryList[201]=new countryDef('39','0~TJ','Tajikistan');
countryList[202]=new countryDef('40','0~TZ','Tanzania');
countryList[203]=new countryDef('41','0~TH','Thailand');
countryList[204]=new countryDef('42','0~TG','Togo');
countryList[205]=new countryDef('43','0~TK','Tokelau');
countryList[206]=new countryDef('44','0~TO','Tonga');
countryList[207]=new countryDef('45','0~TT','Trinidad And Tobago');
countryList[208]=new countryDef('46','0~TN','Tunisia');
countryList[209]=new countryDef('47','0~TR','Turkey');
countryList[210]=new countryDef('48','0~TM','Turkmenistan');
countryList[211]=new countryDef('49','0~TC','Turks And Caicos Islands');
countryList[212]=new countryDef('50','0~TV','Tuvalu');
countryList[213]=new countryDef('51','0~UG','Uganda');
countryList[214]=new countryDef('52','0~UA','Ukraine');
countryList[215]=new countryDef('53','1~AE','United Arab Emirates');
countryList[216]=new countryDef('54','5~UK','United Kingdom');
countryList[217]=new countryDef('57','0~UY','Uruguay');
countryList[218]=new countryDef('56','0~UM','US Minor Outlying Islands');
countryList[219]=new countryDef('55','0~US','USA');
countryList[220]=new countryDef('56','0~UZ','Uzbekistan');
countryList[221]=new countryDef('57','0~VU','Vanuatu');
countryList[222]=new countryDef('58','0~VA','Vatican City State (Holy See)');
countryList[223]=new countryDef('59','0~VE','Venezuela');
countryList[224]=new countryDef('62','0~VN','Vietnam');
countryList[225]=new countryDef('63','0~VG','Virgin Islands (British)');
countryList[226]=new countryDef('64','0~VI','Virgin Islands (US)');
countryList[227]=new countryDef('65','0~WA','Wales');
countryList[228]=new countryDef('0','0~WF','Wallis And Futuna Islands');
countryList[229]=new countryDef('66','0~YE','Yemen');
countryList[230]=new countryDef('67','0~YU','Yugoslavia');
countryList[231]=new countryDef('68','0~ZM','Zambia');
countryList[232]=new countryDef('69','0~ZW','Zimbabwe');

//Cities List
cityList[0]=new cityDef('Algeria','143','Algiers','11234','ALG','Houari Boumediene');
cityList[1]=new cityDef('Austria','154','Vienna','1639','VIE','SCHWECHAT');
cityList[2]=new cityDef('Bahrain','157','Bahrain','10760','BAH','Bahrain International');										
cityList[3]=new cityDef('Bangladesh','158','Dhaka','2244','DAC','Zia International');										
cityList[4]=new cityDef('Belgium','161','Brussels','266','BRU','');										
cityList[5]=new cityDef('China','184','Beijing','2294','PEK','Beijing Capital Int.');										
cityList[6]=new cityDef('China','184','Guangzhou','10285','CAN','Baiyun');										
cityList[7]=new cityDef('China','184','Shanghai','2279','PVG','Pu Dong');										
cityList[8]=new cityDef('Denmark','198','Copenhagen','393','CPH','');										
cityList[9]=new cityDef('Egypt','204','Alexandria','36','ALY','EL NOUZHA');										
cityList[10]=new cityDef('Egypt','204','Cairo','286','CAI','CAIRO INTERNATIONAL');
cityList[11]=new cityDef('Egypt','204','Luxor','935','LXR','LUXOR AIRPORT');										
cityList[12]=new cityDef('Finland','213','Helsinki','660','HEL','');										
cityList[13]=new cityDef('France','214','Paris','1210','CDG','CHARLES DE GAULLE INTERNATIONAL');										
cityList[14]=new cityDef('Germany','221','Berlin','180','TXL','TEGEL AIRPORT');										
cityList[15]=new cityDef('Germany','221','Frankfurt','549','FRA','FRANKFURT INTERNATIONAL');										
cityList[16]=new cityDef('Germany','221','Munich','1081','MUC','FRANZ JOSEF STRAUSS');										
cityList[17]=new cityDef('Greece','224','Athens','97','ATH','ATHINAI');	
cityList[18]=new cityDef('Hong Kong','184','Hong Kong','11090','HKG','Hong Kong Int\'l');										
//cityList[18]=new cityDef('Hong Kong','78','Hong Kong','2315','HKG','Hong Kong Int\'l');										
cityList[19]=new cityDef('India','81','Ahmedabad','11503','AMD','Ahmedabad');										
cityList[20]=new cityDef('India','81','Chennai','4015','MAA','CHENNAI');										
cityList[21]=new cityDef('India','81','Cochin','11510','COK','');										
cityList[22]=new cityDef('India','81','Delhi','2329','DEL','');	
cityList[23]=new cityDef('India','81','Goa','10372','GOI','Dabolim');	
cityList[23]=new cityDef('India','81','Hyderabad','11518','HYD','Begumpet');										
cityList[24]=new cityDef('India','81','Kozhikode','11528','CCJ','Kozhikode');										
cityList[25]=new cityDef('India','81','Mumbai','2327','BOM','Chhatrapati Shivaji');										
cityList[26]=new cityDef('India','81','Nagpur','11536','NAG','Sonegaon');										
cityList[27]=new cityDef('India','81','Trivandrum','13207','TRV','International');										
cityList[28]=new cityDef('Indonesia','82','Denpasar','2863','DPS','');										
cityList[29]=new cityDef('Indonesia','82','Jakarta','2318','CGK','Soekarno-Hatta International');										
cityList[30]=new cityDef('Iran','83','Tehran','11570','IKA','Tehran Imam Khomeini International Airport');										
cityList[31]=new cityDef('Italy','87','Milan','1031','MXP','MALPENSA');										
cityList[32]=new cityDef('Italy','87','Rome','1331','FCO','LEONARDO DA VINCI');										
cityList[33]=new cityDef('Japan','89','Fukuoka','2337','FUK','');										
cityList[34]=new cityDef('Japan','89','Sapporo','2345','CTS','');									
cityList[35]=new cityDef('Japan','89','Tokyo','2536','HND','');										
cityList[36]=new cityDef('Jordan','90','Amman','54','AMM','QUEEN ALIA INTERNATIONAL');										
cityList[37]=new cityDef('Kenya','92','Nairobi','4169','NBO','JOMO KENYATTA INTERNATIONAL');										
cityList[38]=new cityDef('Lebanon','100','Beirut','10321','BEY','International');										
cityList[39]=new cityDef('Libya','103','Tripoli','11746','TIP','International');										
cityList[40]=new cityDef('Malaysia','111','Kuala Lumpur','10161','KUL','Kuala Lumpur International Airport');										
cityList[41]=new cityDef('Malaysia','111','Penang','10168','PEN','');										
cityList[42]=new cityDef('Maldives','112','Male','2381','MLE','International');										
cityList[43]=new cityDef('Morocco','126','Casablanca','317','CMN','MOHAMED V');										
cityList[44]=new cityDef('Nepal','131','Kathmandu','2382','KTM','Tribhuvan');										
cityList[45]=new cityDef('Oman','231','Muscat','10425','MCT','Seeb');										
cityList[46]=new cityDef('Pakistan','232','Islamabad','12289','ISB','Islamabad Int\'l');										
cityList[47]=new cityDef('Pakistan','232','Karachi','2397','KHI','Quaid-E-Azam Int\'l');										
cityList[48]=new cityDef('Pakistan','232','Lahore','12293','LHE','Lahore');										
cityList[49]=new cityDef('Pakistan','232','Peshawar','12304','PEW','Peshawar');										
cityList[50]=new cityDef('Philippines','1','Cebu','2533','CEB','Mactan-Cebu International');										
cityList[51]=new cityDef('Philippines','1','Manila','2393','MNL','');										
cityList[52]=new cityDef('Qatar','6','Doha','10355','DOH','Doha');										
cityList[53]=new cityDef('Russia','9','Moscow','1070','DME','');										
cityList[54]=new cityDef('Saudi Arabia','19','Jeddah','6699','JED','');										
cityList[55]=new cityDef('Saudi Arabia','19','Riyadh','6695','RUH','');										
cityList[56]=new cityDef('Seychelles','21','Mahe Island','12451','SEZ','');										
cityList[57]=new cityDef('Singapore','23','Singapore','2399','SIN','');										
cityList[58]=new cityDef('South Africa','28','Cape Town','305','CPT','');										
cityList[59]=new cityDef('South Africa','28','Johannesburg','733','JNB','');										
cityList[60]=new cityDef('South Korea','239','Seoul','2354','ICN','');										
cityList[61]=new cityDef('Spain','29','Barcelona','143','BCN','');										
cityList[62]=new cityDef('Spain','29','Madrid','950','MAD','');										
cityList[63]=new cityDef('Sri Lanka','30','Colombo','382','CMB','');										
cityList[64]=new cityDef('Sudan','31','Khartoum','12454','KRT','');										
cityList[65]=new cityDef('Sweden','35','Stockholm','1766','ARN','');										
cityList[66]=new cityDef('Switzerland','36','Zurich','1712','ZRH','');										
cityList[67]=new cityDef('Syria','37','Damascus','5037','DAM','');										
cityList[68]=new cityDef('Taiwan','38','Taipei','2414','TPE','');										
cityList[69]=new cityDef('Tanzania','40','Dar Es Salaam','12539','DAR','');										
cityList[70]=new cityDef('Thailand','41','Bangkok','138','BKK','');										
cityList[71]=new cityDef('Thailand','41','Chiang Mai','355','CNX','');										
cityList[72]=new cityDef('Thailand','41','Phuket','1233','HKT','');										
cityList[73]=new cityDef('Turkey','47','Istanbul','1772','IST','');										
cityList[74]=new cityDef('United Arab Emirates','53','Abu Dhabi','12','AUH','');										
cityList[75]=new cityDef('United Arab Emirates','53','Dubai','466','DXB','DUBAI INTERNATIONAL');										
cityList[76]=new cityDef('United Kingdom','54','London','906','LON','');										
cityList[77]=new cityDef('United Kingdom','54','Manchester','970','MAN','');										
cityList[78]=new cityDef('USA','55','Houston','684','IAH','');										
cityList[79]=new cityDef('USA','55','New York City','1117','JFK','');										
cityList[80]=new cityDef('USA','55','Washington D.C.','1660','IAD','');										
cityList[81]=new cityDef('Vietnam','62','Ho Chi Minh City','13115','SGN','');										
cityList[82]=new cityDef('Yemen','66','Sanaa','13167','SAH','');																

//Dynamic date generation
var today=new Date();
var day=today.getDate();
var month=today.getMonth();
var monthName=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var year=today.getFullYear();
var dayNum=daysInMonth(month,year);
var initialDepDay=day+1;
if(initialDepDay>dayNum)initialDepDay-=dayNum;
var initialRetDay=initialDepDay+2;
if(initialRetDay>dayNum)initialRetDay-=dayNum;

function daysInMonth(iMonth,iYear){
	//alert(iMonth);
	if(iMonth == "5")
	{
	//alert(33-new Date(iYear,iMonth,32).getDate());
	return 33-new Date(iYear,iMonth,32).getDate(); 
	}
	else
	{
	
	return 32-new Date(iYear,iMonth,32).getDate(); 
	}
	
	}

function generateDays(ddID){
	var day=today.getDate();
	var month=today.getMonth();
	var year=today.getFullYear();
	var dayNum=daysInMonth(month,year);
	var dropDown=document.getElementById(ddID);
	var depMonthYear;	var retuMonthYear;
	if(document.packageIbe.dprtYr.selectedIndex>0){depMonthYear=document.packageIbe.dprtYr.options[document.packageIbe.dprtYr.selectedIndex].value;}
if(document.packageIbe.rtrnYr.selectedIndex>0){retuMonthYear=document.packageIbe.rtrnYr.options[document.packageIbe.rtrnYr.selectedIndex].value;}
	if(ddID=='retuDay' && document.packageIbe.rtrnYr.selectedIndex>0){
		month=retuMonthYear.substring(0,retuMonthYear.indexOf('/'));
		year=retuMonthYear.substring(retuMonthYear.indexOf('/')+1,retuMonthYear.length);
	}
	if(ddID=='deptDay' && document.packageIbe.dprtYr.selectedIndex>0){
		month=depMonthYear.substring(0,depMonthYear.indexOf('/'));
		year=depMonthYear.substring(depMonthYear.indexOf('/')+1,depMonthYear.length);
	}	
	var selected=initialDepDay;
	if(ddID=='retuDay')selected=initialRetDay;
	if((ddID=='retuDay' && document.packageIbe.rtrnYr.selectedIndex>0)||(ddID=='deptDay' && document.packageIbe.dprtYr.selectedIndex>0)){dayNum=daysInMonth(month-1,year);}
	while(dropDown.hasChildNodes()){dropDown.removeChild(dropDown.childNodes[0]);}
	var startDay=1;
	
	if(ddID=='deptDay' && month==today.getMonth() && year==today.getYear()){startDay=today.getDate();}

	for(i=startDay;i<dayNum+1;i++){
 		var option=document.createElement('option');
		if(i>9){option.setAttribute('value',i);}else{option.setAttribute('value','0'+i);}
		if(i==selected)option.setAttribute('selected','selected');
		var optionTxt=document.createTextNode(i);
		option.appendChild(optionTxt);
		dropDown.appendChild(option);
	}
}

function generateMonths(ddID){
	var dropDown=document.getElementById(ddID);
	month=today.getMonth();
	if((ddID=='deptYr'&&initialDepDay<day)||(ddID=='retuYr'&&initialRetDay<day))month++;
	for(i=month;i<month+12;i++){
		var option=document.createElement('option');
		var optionLbl='';
		var optionVal='';
		if((i<9)||(i>11))optionVal='0';
		if(i<12){
			optionVal=optionVal+((i+1)+'/'+year);
			optionLbl=monthName[i]+' '+year;
		}else{
			optionVal=optionVal+((i-11)+'/'+(year+1));
			optionLbl=monthName[i-12]+' '+(year+1);
		}
		option.setAttribute('value',optionVal);
		if(i==month)option.setAttribute('selected','selected');
		var optionTxt=document.createTextNode(optionLbl);
		option.appendChild(optionTxt);
		dropDown.appendChild(option);
	}
}


function displayHolsSearch(lang){
var lang=lang; 
//if(lang==null||lang==""){lang="0";}
switch(lang){
	case "en":
	lang="0";
  break;    
	case "fr":
  lang="1";
  break;
default:
  lang="0";
}




document.writeln('<form id="packageIbe" name="packageIbe" action="" method="post">');
document.writeln('<h3>'+langList[lang].holidayTitle+'</h3>');
document.writeln('<input type="hidden" id="residence" name="residence" value="QA" />');
document.writeln('<div class="fields">');
//document.writeln('<div class="row"><span class="label"><label for="tripType">'+langList[lang].tripType+'</label></span>');
//document.writeln('<span class="field"><select id="tripType" name="tripType" class="medium">');
//document.writeln('<option value="R" selected="selected">Return</option>');
//document.writeln('<option value="O">One way</option>');
//document.writeln('</select></span></div>');
document.writeln('<div class="row"><span class="label"><label id="originLabel" for="location">From</label></span>');
document.writeln('<span class="field"><strong>Doha (DOH)</strong>');
document.writeln('<input value="DOH" id="origin" name="origin" type="hidden"/></span></div>');

//var optionList='';
//optionList+='<option value="select" selected="selected">-- '+langList[lang].select+' --</option>';
//optionList+='<option value="AUH">'+destList[lang].auh+' (AUH)</option>';
//optionList+='<option value="AMD">'+destList[lang].amd+' (AMD)</option>';
//optionList+='<option value="ALY">'+destList[lang].aly+' (ALY)</option>';
//optionList+='<option value="ALG">'+destList[lang].alg+' (ALG)</option>';
//optionList+='<option value="ATQ">'+destList[lang].atq+' (ATQ)</option>';
//optionList+='<option value="AMM">'+destList[lang].amm+' (AMM)</option>';
//optionList+='<option value="AMS">'+destList[lang].ams+' (AMS)</option>';
//optionList+='<option value="ESB">'+destList[lang].esb+' (ESB)</option>';
//optionList+='<option value="ATH">'+destList[lang].ath+' (ATH)</option>';
//optionList+='<option value="ATL">'+destList[lang].atl+' (ATL)</option>';
//optionList+='<option value="BAH">'+destList[lang].bah+' (BAH)</option>';
//optionList+='<option value="DPS">'+destList[lang].dps+' (DPS)</option>';
//optionList+='<option value="BKK">'+destList[lang].bkk+' (BKK)</option>';
//optionList+='<option value="BCN">'+destList[lang].bcn+' (BCN)</option>';
//optionList+='<option value="PEK">'+destList[lang].pek+' (PEK)</option>';
//optionList+='<option value="BEY">'+destList[lang].bey+' (BEY)</option>';
//optionList+='<option value="BLR">'+destList[lang].blr+' (BLR)</option>';
//optionList+='<option value="TXL">'+destList[lang].txl+' (TXL)</option>';
//optionList+='<option value="BIO">'+destList[lang].bio+' (BIO)</option>';
//optionList+='<option value="BOS">'+destList[lang].bos+' (BOS)</option>';
//optionList+='<option value="BRU">'+destList[lang].bru+' (BRU)</option>';
//optionList+='<option value="EZE">'+destList[lang].eze+' (EZE)</option>';
//optionList+='<option value="CAI">'+destList[lang].cai+' (CAI)</option>';
//optionList+='<option value="CPT">'+destList[lang].cpt+' (CPT)</option>';
//optionList+='<option value="CMN">'+destList[lang].cmn+' (CMN)</option>';
//optionList+='<option value="CEB">'+destList[lang].ceb+' (CEB)</option>';
//optionList+='<option value="CLT">'+destList[lang].clt+' (CLT)</option>';
//optionList+='<option value="MAA">'+destList[lang].maa+' (MAA)</option>';
//optionList+='<option value="CNX">'+destList[lang].cnx+' (CNX)</option>';
//optionList+='<option value="ORD">'+destList[lang].ord+' (ORD)</option>';
//optionList+='<option value="CMB">'+destList[lang].cmb+' (CMB)</option>';
//optionList+='<option value="CPH">'+destList[lang].cph+' (CPH)</option>';
//optionList+='<option value="ORK">'+destList[lang].ork+' (ORK)</option>';
//optionList+='<option value="DFW">'+destList[lang].dfw+' (DFW)</option>';
//optionList+='<option value="DAM">'+destList[lang].dam+' (DAM)</option>';
//optionList+='<option value="DMM">'+destList[lang].dmm+' (DMM)</option>';
//optionList+='<option value="DAR">'+destList[lang].dar+' (DAR)</option>';
//optionList+='<option value="DEL">'+destList[lang].del+' (DEL)</option>';
//optionList+='<option value="DEN">'+destList[lang].den+' (DEN)</option>';
//optionList+='<option value="DAC">'+destList[lang].dac+' (DAC)</option>';
//optionList+='<option value="DOH">'+destList[lang].doh+' (DOH)</option>';
//optionList+='<option value="DXB">'+destList[lang].dxb+' (DXB)</option>';
//optionList+='<option value="DUB">'+destList[lang].dub+' (DUB)</option>';
//optionList+='<option value="EDI">'+destList[lang].edi+' (EDI)</option>';
//optionList+='<option value="FRA">'+destList[lang].fra+' (FRA)</option>';
//optionList+='<option value="FUK">'+destList[lang].fuk+' (FUK)</option>';
//optionList+='<option value="GBE">'+destList[lang].gbe+' (GBE)</option>';
//optionList+='<option value="GVA">'+destList[lang].gva+' (GVA)</option>';
//optionList+='<option value="GLA">'+destList[lang].gla+' (GLA)</option>';
//optionList+='<option value="GOI">'+destList[lang].goi+' (GOI)</option>';
//optionList+='<option value="CAN">'+destList[lang].can+' (CAN)</option>';
//optionList+='<option value="HAN">'+destList[lang].han+' (HAN)</option>';
//optionList+='<option value="SGN">'+destList[lang].sgn+' (SGN)</option>';
//optionList+='<option value="HKG">'+destList[lang].hkg+' (HKG)</option>';
//optionList+='<option value="IAH">'+destList[lang].iah+' (IAH)</option>';
//optionList+='<option value="HYD">'+destList[lang].hyd+' (HYD)</option>';
//optionList+='<option value="ISB">'+destList[lang].isb+' (ISB)</option>';
//optionList+='<option value="IST">'+destList[lang].ist+' (IST)</option>';
//optionList+='<option value="CGK">'+destList[lang].cgk+' (CGK)</option>';
//optionList+='<option value="JED">'+destList[lang].jed+' (JED)</option>';
//optionList+='<option value="JNB">'+destList[lang].jnb+' (JNB)</option>';
//optionList+='<option value="KBL">'+destList[lang].kbl+' (KBL)</option>';
//optionList+='<option value="KHI">'+destList[lang].khi+' (KHI)</option>';
//optionList+='<option value="KTM">'+destList[lang].ktm+' (KTM)</option>';
//optionList+='<option value="KRT">'+destList[lang].krt+' (KRT)</option>';
//optionList+='<option value="COK">'+destList[lang].cok+' (COK)</option>';
//optionList+='<option value="CCJ">'+destList[lang].ccj+' (CCJ)</option>';
//optionList+='<option value="KUL">'+destList[lang].kul+' (KUL)</option>';
//optionList+='<option value="KWI">'+destList[lang].kwi+' (KWI)</option>';
//optionList+='<option value="LHE">'+destList[lang].lhe+' (LHE)</option>';
//optionList+='<option value="LON">'+destList[lang].lon+' (LON)</option>';
//optionList+='<option value="LAX">'+destList[lang].lax+' (LAX)</option>';
//optionList+='<option value="LXR">'+destList[lang].lxr+' (LXR)</option>';
//optionList+='<option value="MAD">'+destList[lang].mad+' (MAD)</option>';
//optionList+='<option value="AGP">'+destList[lang].agp+' (AGP)</option>';
//optionList+='<option value="MLE">'+destList[lang].mle+' (MLE)</option>';
//optionList+='<option value="MAN">'+destList[lang].man+' (MAN)</option>';
//optionList+='<option value="MNL">'+destList[lang].mnl+' (MNL)</option>';
//optionList+='<option value="MHD">'+destList[lang].mhd+' (MHD)</option>';
//optionList+='<option value="MEL">'+destList[lang].mel+' (MEL)</option>';
//optionList+='<option value="MSP">'+destList[lang].msp+' (MSP)</option>';
//optionList+='<option value="MXP">'+destList[lang].mxp+' (MXP)</option>';
//optionList+='<option value="YUL">'+destList[lang].yul+' (YUL)</option>';
//optionList+='<option value="DME">'+destList[lang].dme+' (DME)</option>';
//optionList+='<option value="BOM">'+destList[lang].bom+' (BOM)</option>';
//optionList+='<option value="MUC">'+destList[lang].muc+' (MUC)</option>';
//optionList+='<option value="MCT">'+destList[lang].mct+' (MCT)</option>';
//optionList+='<option value="NBO">'+destList[lang].nbo+' (NBO)</option>';
//optionList+='<option value="NYC">'+destList[lang].nyc+' (NYC)</option>';
//optionList+='<option value="KIX">'+destList[lang].kix+' (KIX)</option>';
//optionList+='<option value="OSL">'+destList[lang].osl+' (OSL)</option>';
//optionList+='<option value="PMI">'+destList[lang].pmi+' (PMI)</option>';
//optionList+='<option value="CDG">'+destList[lang].cdg+' (CDG)</option>';
//optionList+='<option value="PEN">'+destList[lang].pen+' (PEN)</option>';
//optionList+='<option value="PEW">'+destList[lang].pew+' (PEW)</option>';
//optionList+='<option value="PHL">'+destList[lang].phl+' (PHL)</option>';
//optionList+='<option value="PNH">'+destList[lang].pnh+' (PNH)</option>';
//optionList+='<option value="HKT">'+destList[lang].hkt+' (HKT)</option>';
/*optionList+='<option value="RUH">'+destList[lang].ruh+' (RUH)</option>';
optionList+='<option value="FCO">'+destList[lang].fco+' (FCO)</option>';
optionList+='<option value="SLC">'+destList[lang].slc+' (SLC)</option>';
optionList+='<option value="SFO">'+destList[lang].sfo+' (SFO)</option>';
optionList+='<option value="SAH">'+destList[lang].sah+' (SAH)</option>';
optionList+='<option value="GRU">'+destList[lang].gru+' (GRU)</option>';
optionList+='<option value="CTS">'+destList[lang].cts+' (CTS)</option>';
optionList+='<option value="ICN">'+destList[lang].icn+' (ICN)</option>';
optionList+='<option value="SEZ">'+destList[lang].sez+' (SEZ)</option>';
optionList+='<option value="PVG">'+destList[lang].pvg+' (PVG)</option>';
optionList+='<option value="SIN">'+destList[lang].sin+' (SIN)</option>';
optionList+='<option value="ARN">'+destList[lang].arn+' (ARN)</option>';
optionList+='<option value="SYD">'+destList[lang].syd+' (SYD)</option>';
optionList+='<option value="IKA">'+destList[lang].ika+' (IKA)</option>';
optionList+='<option value="TRV">'+destList[lang].trv+' (TRV)</option>';
optionList+='<option value="TYO">'+destList[lang].tyo+' (TYO)</option>';
optionList+='<option value="YTO">'+destList[lang].yto+' (YTO)</option>';
optionList+='<option value="TIP">'+destList[lang].tip+' (TIP)</option>';
optionList+='<option value="TUN">'+destList[lang].tun+' (TUN)</option>';
optionList+='<option value="VIE">'+destList[lang].vie+' (VIE)</option>';
optionList+='<option value="IAD">'+destList[lang].iad+' (IAD)</option>';
optionList+='<option value="WDH">'+destList[lang].wdh+' (WDH)</option>';
optionList+='<option value="ZRH">'+destList[lang].zrh+' (ZRH)</option>';*/
//document.write(optionList);
//document.writeln('</select></span></div>');
//document.writeln('<span class="field"><strong>Doha (DOH)</strong></span></div>');
document.writeln('<div class="row"><span class="label"><label id="locationLabel" for="location">To</label></span>');

document.writeln('<span class="field"><select id="dest" name="dest" class="middle2">');
var optionList='';
optionList+='<option value="select" selected="selected">-- '+langList[lang].select+' --</option>';
//optionList+='<option value="AUH">'+destList[lang].auh+' (AUH)</option>';
//optionList+='<option value="AMD">'+destList[lang].amd+' (AMD)</option>';
//optionList+='<option value="ALY">'+destList[lang].aly+' (ALY)</option>';
//optionList+='<option value="ALG">'+destList[lang].alg+' (ALG)</option>';
//optionList+='<option value="ATQ">'+destList[lang].atq+' (ATQ)</option>';
//optionList+='<option value="AMM">'+destList[lang].amm+' (AMM)</option>';
//optionList+='<option value="AMS">'+destList[lang].ams+' (AMS)</option>';
//optionList+='<option value="ESB">'+destList[lang].esb+' (ESB)</option>';
optionList+='<option value="ATH">'+destList[lang].ath+' (ATH)</option>';
//optionList+='<option value="ATL">'+destList[lang].atl+' (ATL)</option>';
optionList+='<option value="BAH">'+destList[lang].bah+' (BAH)</option>';
//optionList+='<option value="DPS">'+destList[lang].dps+' (DPS)</option>';
optionList+='<option value="BKK">'+destList[lang].bkk+' (BKK)</option>';
//optionList+='<option value="BCN">'+destList[lang].bcn+' (BCN)</option>';
//optionList+='<option value="PEK">'+destList[lang].pek+' (PEK)</option>';
//optionList+='<option value="BEY">'+destList[lang].bey+' (BEY)</option>';
//optionList+='<option value="BLR">'+destList[lang].blr+' (BLR)</option>';
//optionList+='<option value="TXL">'+destList[lang].txl+' (TXL)</option>';
//optionList+='<option value="BIO">'+destList[lang].bio+' (BIO)</option>';
//optionList+='<option value="BOS">'+destList[lang].bos+' (BOS)</option>';
//optionList+='<option value="BRU">'+destList[lang].bru+' (BRU)</option>';
//optionList+='<option value="EZE">'+destList[lang].eze+' (EZE)</option>';
//optionList+='<option value="CAI">'+destList[lang].cai+' (CAI)</option>';
//optionList+='<option value="CPT">'+destList[lang].cpt+' (CPT)</option>';
//optionList+='<option value="CMN">'+destList[lang].cmn+' (CMN)</option>';
//optionList+='<option value="CEB">'+destList[lang].ceb+' (CEB)</option>';
//optionList+='<option value="CLT">'+destList[lang].clt+' (CLT)</option>';
//optionList+='<option value="MAA">'+destList[lang].maa+' (MAA)</option>';
//optionList+='<option value="CNX">'+destList[lang].cnx+' (CNX)</option>';
//optionList+='<option value="ORD">'+destList[lang].ord+' (ORD)</option>';
//optionList+='<option value="CMB">'+destList[lang].cmb+' (CMB)</option>';
//optionList+='<option value="CPH">'+destList[lang].cph+' (CPH)</option>';
//optionList+='<option value="ORK">'+destList[lang].ork+' (ORK)</option>';
//optionList+='<option value="DFW">'+destList[lang].dfw+' (DFW)</option>';
//optionList+='<option value="DAM">'+destList[lang].dam+' (DAM)</option>';
//optionList+='<option value="DMM">'+destList[lang].dmm+' (DMM)</option>';
//optionList+='<option value="DAR">'+destList[lang].dar+' (DAR)</option>';
//optionList+='<option value="DEL">'+destList[lang].del+' (DEL)</option>';
//optionList+='<option value="DEN">'+destList[lang].den+' (DEN)</option>';
//optionList+='<option value="DAC">'+destList[lang].dac+' (DAC)</option>';
//optionList+='<option value="DOH">'+destList[lang].doh+' (DOH)</option>';
optionList+='<option value="DXB">'+destList[lang].dxb+' (DXB)</option>';
//optionList+='<option value="DUB">'+destList[lang].dub+' (DUB)</option>';
//optionList+='<option value="EDI">'+destList[lang].edi+' (EDI)</option>';
//optionList+='<option value="FRA">'+destList[lang].fra+' (FRA)</option>';
//optionList+='<option value="FUK">'+destList[lang].fuk+' (FUK)</option>';
//optionList+='<option value="GBE">'+destList[lang].gbe+' (GBE)</option>';
//optionList+='<option value="GVA">'+destList[lang].gva+' (GVA)</option>';
//optionList+='<option value="GLA">'+destList[lang].gla+' (GLA)</option>';
//optionList+='<option value="GOI">'+destList[lang].goi+' (GOI)</option>';
//optionList+='<option value="CAN">'+destList[lang].can+' (CAN)</option>';
//optionList+='<option value="HAN">'+destList[lang].han+' (HAN)</option>';
//optionList+='<option value="SGN">'+destList[lang].sgn+' (SGN)</option>';
optionList+='<option value="HKG">'+destList[lang].hkg+' (HKG)</option>';
//optionList+='<option value="IAH">'+destList[lang].iah+' (IAH)</option>';
//optionList+='<option value="HYD">'+destList[lang].hyd+' (HYD)</option>';
//optionList+='<option value="ISB">'+destList[lang].isb+' (ISB)</option>';
//optionList+='<option value="IST">'+destList[lang].ist+' (IST)</option>';
//optionList+='<option value="CGK">'+destList[lang].cgk+' (CGK)</option>';
//optionList+='<option value="JED">'+destList[lang].jed+' (JED)</option>';
//optionList+='<option value="JNB">'+destList[lang].jnb+' (JNB)</option>';
//optionList+='<option value="KBL">'+destList[lang].kbl+' (KBL)</option>';
//optionList+='<option value="KHI">'+destList[lang].khi+' (KHI)</option>';
//optionList+='<option value="KTM">'+destList[lang].ktm+' (KTM)</option>';
//optionList+='<option value="KRT">'+destList[lang].krt+' (KRT)</option>';
//optionList+='<option value="COK">'+destList[lang].cok+' (COK)</option>';
//optionList+='<option value="CCJ">'+destList[lang].ccj+' (CCJ)</option>';
//optionList+='<option value="KUL">'+destList[lang].kul+' (KUL)</option>';
//optionList+='<option value="KWI">'+destList[lang].kwi+' (KWI)</option>';
//optionList+='<option value="LHE">'+destList[lang].lhe+' (LHE)</option>';
//optionList+='<option value="LON">'+destList[lang].lon+' (LON)</option>';
//optionList+='<option value="LAX">'+destList[lang].lax+' (LAX)</option>';
//optionList+='<option value="LXR">'+destList[lang].lxr+' (LXR)</option>';
//optionList+='<option value="MAD">'+destList[lang].mad+' (MAD)</option>';
//optionList+='<option value="AGP">'+destList[lang].agp+' (AGP)</option>';
//optionList+='<option value="MLE">'+destList[lang].mle+' (MLE)</option>';
//optionList+='<option value="MAN">'+destList[lang].man+' (MAN)</option>';
//optionList+='<option value="MNL">'+destList[lang].mnl+' (MNL)</option>';
//optionList+='<option value="MHD">'+destList[lang].mhd+' (MHD)</option>';
//optionList+='<option value="MEL">'+destList[lang].mel+' (MEL)</option>';
//optionList+='<option value="MSP">'+destList[lang].msp+' (MSP)</option>';
//optionList+='<option value="MXP">'+destList[lang].mxp+' (MXP)</option>';
//optionList+='<option value="YUL">'+destList[lang].yul+' (YUL)</option>';
//optionList+='<option value="DME">'+destList[lang].dme+' (DME)</option>';
//optionList+='<option value="BOM">'+destList[lang].bom+' (BOM)</option>';
//optionList+='<option value="MUC">'+destList[lang].muc+' (MUC)</option>';
optionList+='<option value="MCT">'+destList[lang].mct+' (MCT)</option>';
//optionList+='<option value="NBO">'+destList[lang].nbo+' (NBO)</option>';
//optionList+='<option value="NYC">'+destList[lang].nyc+' (NYC)</option>';
//optionList+='<option value="KIX">'+destList[lang].kix+' (KIX)</option>';
//optionList+='<option value="OSL">'+destList[lang].osl+' (OSL)</option>';
//optionList+='<option value="PMI">'+destList[lang].pmi+' (PMI)</option>';
//optionList+='<option value="CDG">'+destList[lang].cdg+' (CDG)</option>';
//optionList+='<option value="PEN">'+destList[lang].pen+' (PEN)</option>';
//optionList+='<option value="PEW">'+destList[lang].pew+' (PEW)</option>';
//optionList+='<option value="PHL">'+destList[lang].phl+' (PHL)</option>';
//optionList+='<option value="PNH">'+destList[lang].pnh+' (PNH)</option>';
//optionList+='<option value="HKT">'+destList[lang].hkt+' (HKT)</option>';
/*optionList+='<option value="RUH">'+destList[lang].ruh+' (RUH)</option>';
optionList+='<option value="FCO">'+destList[lang].fco+' (FCO)</option>';
optionList+='<option value="SLC">'+destList[lang].slc+' (SLC)</option>';
optionList+='<option value="SFO">'+destList[lang].sfo+' (SFO)</option>';
optionList+='<option value="SAH">'+destList[lang].sah+' (SAH)</option>';
optionList+='<option value="GRU">'+destList[lang].gru+' (GRU)</option>';
optionList+='<option value="CTS">'+destList[lang].cts+' (CTS)</option>';
optionList+='<option value="ICN">'+destList[lang].icn+' (ICN)</option>';
optionList+='<option value="SEZ">'+destList[lang].sez+' (SEZ)</option>';
optionList+='<option value="PVG">'+destList[lang].pvg+' (PVG)</option>';
optionList+='<option value="SIN">'+destList[lang].sin+' (SIN)</option>';
optionList+='<option value="ARN">'+destList[lang].arn+' (ARN)</option>';
optionList+='<option value="SYD">'+destList[lang].syd+' (SYD)</option>';
optionList+='<option value="IKA">'+destList[lang].ika+' (IKA)</option>';
optionList+='<option value="TRV">'+destList[lang].trv+' (TRV)</option>';
optionList+='<option value="TYO">'+destList[lang].tyo+' (TYO)</option>';
optionList+='<option value="YTO">'+destList[lang].yto+' (YTO)</option>';
optionList+='<option value="TIP">'+destList[lang].tip+' (TIP)</option>';
optionList+='<option value="TUN">'+destList[lang].tun+' (TUN)</option>';
optionList+='<option value="VIE">'+destList[lang].vie+' (VIE)</option>';
optionList+='<option value="IAD">'+destList[lang].iad+' (IAD)</option>';
optionList+='<option value="WDH">'+destList[lang].wdh+' (WDH)</option>';
optionList+='<option value="ZRH">'+destList[lang].zrh+' (ZRH)</option>';*/
document.write(optionList);
document.writeln('</select></span></div>');
//document.writeln('<span class="field"><strong>Dubai (DXB)</strong></span></div>');
document.writeln('<div class="row"><span class="label"><label for="deptDay">'+langList[lang].dprt+'</label></span>');
document.write('<span class="field"><select id="deptDay" name="dprtDay" class="sml"></select></span>');
document.write('<span class="field"><select id="deptYr" name="dprtYr" onChange="generateDays(\'deptDay\')" class="medium"></select></span></div>');
document.writeln('<div class="row"><span class="label"><label for="retuDay">'+langList[lang].rtrn+'</label></span>');
document.write('<span class="field"><select id="retuDay" name="rtrnDay" class="sml"></select></span>');
document.write('<span class="field"><select id="retuYr" name="rtrnYr" onChange="generateDays(\'retuDay\')" class="medium"></select></span></div>');
//document.writeln('<div class="row"><span class="label"><label for="trvClass">'+langList[lang].trvClass+'</label></span>');
//document.writeln('<span class="field"><select id="trvClass" name="trvClass">');
//document.writeln('<option value="Economy" selected="selected">Economy</option>');
//document.writeln('<option value="Business">Business</option>');
//document.writeln('<option value="First">First</option>');
//document.writeln('</select></span></div>');
//document.writeln('<div class="row"><span class="label"><label for="hotelType">'+langList[lang].hotelType+'</label></span>');
//document.writeln('<span class="field"><select id="hotelType" name="hotelType">');
//document.writeln('<option value="ALL" selected="selected">All Types</option>');
//document.writeln('<option value="7">Beach</option>');
//document.writeln('<option value="6">Spa and Wellness</option>');
//document.writeln('<option value="10">City Stopover</option>');
//document.writeln('<option value="11">Eco-Tourism</option>');
//document.writeln('<option value="12">Family</option>');
//document.writeln('<option value="13">Honeymoon</option>');
//document.writeln('</select></span></div>');
//document.writeln('<div class="row"><span class="label"><label for="rooms">'+langList[lang].rooms+'</label></span>');
//document.writeln('<span class="field"><select id="rooms" name="rooms" class="sml">');
//document.writeln('<option value="1" selected="selected">1</option>');
//document.writeln('<option value="2">2</option>');
//document.writeln('<option value="3">3</option>');
//document.writeln('<option value="4">4</option>');
//document.writeln('<option value="5">5</option>');
//document.writeln('</select></span></div>');
//document.writeln('<input type="hidden" id="adults" name="adults" value="1" />');
document.writeln('<div class="row"><span class="label"><label for="adults">Adults</label></span>');
document.writeln('<span class="field"><select id="adults" name="adults" class="sml">');
document.writeln('<option value="1">1</option>');
document.writeln('<option value="2" selected="selected">2</option>');
document.writeln('<option value="3">3</option>');
document.writeln('<option value="4">4</option>');
document.writeln('<option value="5">5</option>');
document.writeln('<option value="6">6</option>');
document.writeln('<option value="7">7</option>');
document.writeln('<option value="8">8</option>');
document.writeln('<option value="9">9</option>');
document.writeln('</select></span></div>');
/*document.writeln('<script type="text/javascript">');
document.writeln('function balance(num){');
document.writeln('var first=document.getElementById("children");');
document.writeln('var second=document.getElementById("infants");');
document.writeln('if(num==1){if(first.selectedIndex==0){second.selectedIndex=1}else{second.selectedIndex=0}}');
document.writeln('if(num==2){if(second.selectedIndex==0){first.selectedIndex=1}else{first.selectedIndex=0}}');
document.writeln('}</script>');*/
document.writeln('<div class="row"><span class="label"><label for="children">Children (2-11)</label></span>');
document.writeln('<span class="field"><select id="children" name="children" class="sml" >');//onchange="balance(\'1\')"
document.writeln('<option value="0" selected="selected">0</option>');
document.writeln('<option value="1">1</option>');
document.writeln('<option value="2">2</option>');
document.writeln('<option value="3">3</option>');
document.writeln('<option value="4">4</option>');
//document.writeln('<option value="5">5</option>');
//document.writeln('<option value="6">6</option>');
//document.writeln('<option value="7">7</option>');

//document.writeln('<option value="8">8</option>');
//document.writeln('<option value="9">9</option>');
document.writeln('</select></span></div>');
/*document.writeln('<div class="row"><span class="label"><label for="infants">Infants (0-1)</label></span>');
document.writeln('<span class="field"><select id="infants" name="infants" class="sml" onchange="balance(\'2\')">');
document.writeln('<option value="0" selected="selected">0</option>');
document.writeln('<option value="1">1</option>');
document.writeln('</select></span></div>');*/
document.writeln('</div><div class="submit">');
document.writeln('<div class="formSubmit"><input type="button" id="btnFltSearch" class="ButtonBig buttonLLBig" value="'+langList[lang].searchButton+'" onclick="submitPkgSearch('+lang+')">');
document.writeln('</div></div></form>');
/*document.writeln('</div>');
document.writeln('</div>');//tabber*/
/*document.write('<script type="text/javascript">generateDays(\'checkinDay\')</script>');
document.write('<script type="text/javascript">generateMonths(\'checkinYr\');</script>');*/
document.write('<script type="text/javascript">generateDays(\'deptDay\')</script>');
document.write('<script type="text/javascript">generateMonths(\'deptYr\');</script>');
document.write('<script type="text/javascript">generateDays(\'retuDay\')</script>');
document.write('<script type="text/javascript">generateMonths(\'retuYr\');</script>');
}

function validate(lang){
	var language=lang;

	var from=document.getElementById('originLabel');
	var to=document.getElementById('destLabel');
	var missing="0";
	if(document.getElementById('origin').options[document.getElementById('origin').selectedIndex].value=="select"){
		from.style.fontWeight="bold";from.style.color="red";missing="1";
	}else{from.style.fontWeight="normal";from.style.color="black";}
	if(document.getElementById('dest').options[document.getElementById('dest').selectedIndex].value=="select"){
		to.style.fontWeight="bold";to.style.color="red";missing="1";
	}else{to.style.fontWeight="normal";to.style.color="black";}
	if(missing=="0")submitFltSearch(language);

	submitHotelSearch(language);
}

function submitHotelSearch(lang){
	var formAction;
	formAction="http://holidays.qatarairways.com/qatarairways/packaging/reservation/ResPkgSearchCriteria.do?ActionType=Pkg&dlr=Y";
	//var location=document.hotelIbe.location.options[document.hotelIbe.location.selectedIndex];
	var monthYear=document.hotelIbe.checkinYr.options[document.hotelIbe.checkinYr.selectedIndex].value;
	var rooms=document.hotelIbe.rooms.options[document.hotelIbe.rooms.selectedIndex].value;
	var city=location.text;
	city=city.substring(0,city.indexOf(' '));
	//var iata=location.value;
	var countryCode="";
	var cityCode="";
	for(i=0;i<cityList.length;i++){
		if(cityList[i].iata==iata){countryCode=cityList[i].countryCode;cityCode=cityList[i].cityCode;}
	}
	var nights=document.hotelIbe.nights.options[document.hotelIbe.nights.selectedIndex].value;
	var day=document.hotelIbe.checkinDay.options[document.hotelIbe.checkinDay.selectedIndex].value;
	var month=monthYear.substring(0,monthYear.indexOf('/'));
	var year=monthYear.substring(monthYear.indexOf('/')+1,monthYear.length);
	var outDay="-";
	var outMonth="-";
	var outYear="-";
	var roomCode=""
	for(i=0;i<rooms;i++){
		roomCode+='1|0|-|%25|%25@';
	}
	var regionCode='-1~-1';
	var searchString="";
/*
	searchString=formAction+'&DLR1='+city+'&DLR2='+countryCode+'&DLR3='+cityCode+'&DLR4='+nights+'&DLR5='+day+'&DLR6='+month+'&DLR7='+year+'&DLR8='+rooms+'&DLR9='+outDay+'&DLR10='+outMonth+'&DLR11='+outYear+'&DLR12='+roomCode+'&DLR13='+regionCode;
	document.hotelIbe.action=searchString;
	document.hotelIbe.method="post";
//	document.hotelIbe="_top";
	document.hotelIbe.submit();
*/
	document.location.href='http://www.qatarairways.com/disabled.html';
}

//Package Search
function submitPkgSearch(lang){
	var formAction;
	formAction="http://holidays.qatarairways.com/qatarairways/packaging/reservation/ResPkgSearchCriteria.do?ActionType=Pkg&dlr=Y";
//	var location=document.packageIbe.location.options[document.packageIbe.location.selectedIndex];
//	var rooms=document.packageIbe.rooms.options[document.packageIbe.rooms.selectedIndex].value;
	var rooms="1";
//	var trvClass=document.packageIbe.trvClass.options[document.packageIbe.trvClass.selectedIndex].value;
	var trvClass="Economy";
//	var tripType=document.packageIbe.tripType.options[document.packageIbe.tripType.selectedIndex].value;
	var tripType="R";
//	var hotelType=document.packageIbe.hotelType.options[document.packageIbe.hotelType.selectedIndex].value;
	var hotelType="10";
	var origin = document.getElementById('origin').value;
	var dest = document.getElementById('dest').value;
	
	var ToCountryCode="";
	var ToCountryName="";
	var ToCityCode="";
	var ToCityName="";
	var ToIataCode="";
	var ToAirport="";
	var FromCountryCode="";
	var FromCountryName="";
	var FromCityCode="";
	var FromCityName="";
	var FromIataCode="";
	var FromAirport="";
	
	for(var i=0;i<cityList.length;i++){
		if(cityList[i].iata==dest){
			ToCountryCode=cityList[i].countryCode;
			ToCountryName=cityList[i].countryName;
			ToCityName=cityList[i].cityName;
			ToCityCode=cityList[i].cityCode;
			ToIataCode=cityList[i].iata;
			ToAirport=cityList[i].airport;}
	}

	for(var i=0;i<cityList.length;i++){
		if(cityList[i].iata==origin){
			FromCountryCode=cityList[i].countryCode;
			FromCountryName=cityList[i].countryName;
			FromCityName=cityList[i].cityName;
			FromCityCode=cityList[i].cityCode;
			FromIataCode=cityList[i].iata;
			FromAirport=cityList[i].airport;
			fromId=i;}
	}
	
	var regionCode='';
	for(var i=0;i<countryList.length;i++){
		
		if(countryList[i].counrtyId==FromCountryCode){
			regionCode = countryList[i].countryCode;
			}
	}
	
	var FromCountryIata=""; var ToCountryIata="";
	
	for(var i=0;i<countryList.length;i++){
		if(countryList[i].counrtyId==FromCountryCode){
			
			FromCountryIata = countryList[i].countryCode.substring(countryList[i].countryCode.indexOf('~')+1,countryList[i].countryCode.length);
			}
		if(countryList[i].counrtyId==ToCountryCode){
			ToCountryIata = countryList[i].countryCode.substring(countryList[i].countryCode.indexOf('~')+1,countryList[i].countryCode.length);}
	}
	
	
	var fromLocation = FromCityName+'|'+FromIataCode+'|'+FromCityCode+'|'+FromAirport+'|-|'+FromCountryCode+'| |'+FromCountryName+'|1|'+FromCountryIata;
	
	var toLocation = ToCityName+'|'+ToIataCode+'|'+ToCityCode+'|'+ToAirport+'|-|'+ToCountryCode+'| |'+ToCountryName+'|1|'+ToCountryIata;
    
	var monthYear=document.packageIbe.dprtYr.options[document.packageIbe.dprtYr.selectedIndex].value;
	var day=document.packageIbe.dprtDay.options[document.packageIbe.dprtDay.selectedIndex].value;
	var month=monthYear.substring(0,monthYear.indexOf('/'));
	var year=monthYear.substring(monthYear.indexOf('/')+1,monthYear.length);
//Return Date
	var rtrnMonthYear=document.packageIbe.rtrnYr.options[document.packageIbe.rtrnYr.selectedIndex].value;
	var rtrnDay=document.packageIbe.rtrnDay.options[document.packageIbe.rtrnDay.selectedIndex].value;
	var rtrnMonth=rtrnMonthYear.substring(0,rtrnMonthYear.indexOf('/'));
	
	var rtrnYear=rtrnMonthYear.substring(rtrnMonthYear.indexOf('/')+1,rtrnMonthYear.length);
	var roomCode=""
//	for(i=0;i<rooms;i++){
	var adults=document.packageIbe.adults.options[document.packageIbe.adults.selectedIndex].value;
	var children=document.packageIbe.children.options[document.packageIbe.children.selectedIndex].value;
	//alert("children-->"+children);
	if(children == 0)
	{
	var infants="";
		roomCode+=adults+'|'+children+'|-|%25|%25@';
		//alert(roomCode);
	}
	if(children == 1)
	{
	var infants="";
		roomCode+=adults+'|'+children+'|5|%25|%25@';
		//alert(roomCode);
	}
	if(children == 2)
	{
	var infants="";
		roomCode+=adults+'|'+children+'|5,5|%25|%25@';
		//alert(roomCode);
	}
	if(children == 3)
	{
	var infants="";
		roomCode+=adults+'|'+children+'|5,5,5|%25|%25@';
		//alert(roomCode);
	}
	if(children == 4)
	{
	var infants="";
		roomCode+=adults+'|'+children+'|5,5,5,5|%25|%25@';
		//alert(roomCode);
	}
//	}
	
	var searchString="";
	var city=ToCityName;
	if(ToCityName=="Bahrain")
	{
	searchString=formAction+'&DLR16=17:05:00@4@3&DLR18=18:55:00@4@3&DLR20=0&DLR21=Economy&DLR22=R&DLR23='+year+'-'+month+'-'+day+'&DLR24='+rtrnYear+'-'+rtrnMonth+'-'+rtrnDay+'&DLR12='+roomCode+'&DLR34='+fromLocation+'&DLR36='+toLocation+'&DLR14='+hotelType+'&DLR13='+regionCode+'&DLR38=V&DLR44=N';
	//alert("url:"+searchString);
	
	}
	if(ToCityName=="Muscat")
	{
	searchString=formAction+'&DLR16=15:15:00@3@2&DLR18=18:40:00@4@3&DLR20=0&DLR21=Economy&DLR22=R&DLR23='+year+'-'+month+'-'+day+'&DLR24='+rtrnYear+'-'+rtrnMonth+'-'+rtrnDay+'&DLR12='+roomCode+'&DLR34='+fromLocation+'&DLR36='+toLocation+'&DLR14='+hotelType+'&DLR13='+regionCode+'&DLR38=V&DLR44=N';
	//alert("url:"+searchString);
	}
    if(ToCityName=="Dubai")
	{
	searchString=formAction+'&DLR16=15:00:00@3@2&DLR18=15:00:00@3@2&DLR20=0&DLR21=Economy&DLR22=R&DLR23='+year+'-'+month+'-'+day+'&DLR24='+rtrnYear+'-'+rtrnMonth+'-'+rtrnDay+'&DLR12='+roomCode+'&DLR34='+fromLocation+'&DLR36='+toLocation+'&DLR14='+hotelType+'&DLR13='+regionCode+'&DLR38=V&DLR44=N';
	//alert("url:"+searchString);
	}
	 //alert(ToCityName);
	 if(ToCityName=="Hong Kong")
	{
	searchString=formAction+'&DLR16=AnyTime&DLR18=AnyTime&DLR20=0&DLR21=Economy&DLR22=R&DLR23='+year+'-'+month+'-'+day+'&DLR24='+rtrnYear+'-'+rtrnMonth+'-'+rtrnDay+'&DLR12='+roomCode+'&DLR34='+fromLocation+'&DLR36='+toLocation+'&DLR14='+hotelType+'&DLR13='+regionCode+'&DLR38=V&DLR44=N';
	//alert("url:"+searchString);
	}
	else
	{
	searchString=formAction+'&DLR16=AnyTime&DLR18=AnyTime&DLR20=0&DLR21=Economy&DLR22=R&DLR23='+year+'-'+month+'-'+day+'&DLR24='+rtrnYear+'-'+rtrnMonth+'-'+rtrnDay+'&DLR12='+roomCode+'&DLR34='+fromLocation+'&DLR36='+toLocation+'&DLR14='+hotelType+'&DLR13='+regionCode+'&DLR38=V&DLR44=N';
	//alert("url:"+searchString);
	}
	
//AnyTime
	//searchString=formAction+'&DLR16=AnyTime&DLR18=AnyTime&DLR20=0&DLR21=Economy&DLR22=R&DLR23='+year+'-'+month+'-'+day+'&DLR24='+rtrnYear+'-'+rtrnMonth+'-'+rtrnDay+'&DLR12='+roomCode+'&DLR34='+fromLocation+'&DLR36='+toLocation+'&DLR14='+hotelType+'&DLR13='+regionCode+'&DLR38=V&DLR44=N';
	

    

	document.packageIbe.action=searchString;
	document.packageIbe.method="post";
//	document.packageIbe="_top";
	
	var depDate = new Date ();
	//depDate.setFullYear(year,month-1,day);
	//alert(year+","+month-1+","+day);
	depDate.setFullYear(year,month-1,day);
	
	var rtrnDate = new Date ();
	rtrnDate.setFullYear(rtrnYear,rtrnMonth-1,rtrnDay);

	var today = new Date();
	if(depDate<today){alert('Departure date cannot be in the past.');document.packageIbe.deptDay.focus();}
	else if(depDate>rtrnDate){alert('Return date cannot be before Departure date.');document.packageIbe.deptDay.focus();}
	else {document.packageIbe.submit(); 
	}

/*	document.location.href='http://www.qatarairways.com/disabled.html';*/
}