// JavaScript Document
	function showRoomOptions() { 
	
		document.getElementById('roomAllocationContainer').style.display="block";
		var ddRooms=document.getElementById('rooms');// No. rooms dropdown name
		var ddAges=new Array(document.getElementById('children0'),document.getElementById('children1'),document.getElementById('children2'));// No.children dropdown names
		var numRooms=ddRooms.options[ddRooms.selectedIndex].value;
		for(i=0;i<3;i++){
			lm.getElementsBy({tagName:'div',className:'roomNumber'})[i].style.display=(numRooms>1)?"block":"none";
			document.getElementById('room'+i).style.display=(numRooms>i)?"block":"none";
			for(j=0;j<4;j++){
				var numChildren = ddAges[i].options[ddAges[i].selectedIndex].value;
				document.getElementById('room'+i+'_childAge'+j).style.display=(numChildren>j)?"none":"none";
				document.getElementById('childrensAges'+i).style.display=(numChildren>0)?"none":"none";
				document.getElementById('childAgeRange'+i).className=(numChildren>0)?"hidden":"";
			}
		}
	}

 function populate_city(ctry, ctrl)
 { 
 	if (ctry.value == '9') {
		populate_uae(ctry.form, ctrl);
		populate_property(ctrl, ctrl.form.hot_name);
 	} else if (ctry.value == '26') {
		populate_bahrain(ctry.form, ctrl);
		populate_property(ctrl, ctrl.form.hot_name);
 	} else if (ctry.value == '167') {
		populate_oman(ctry.form, ctrl);
		populate_property(ctrl, ctrl.form.hot_name);
 	} else if (ctry.value == '1') {
		populate_india(ctry.form, ctrl);
		populate_property(ctrl, ctrl.form.hot_name);
	} else {
		newOpt = document.createElement("option");
		newOpt.text = '';
		newOpt.value = '';
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_property(city, ctrl)
 {
	if (city.value == 'Abu Dhabi') {
		populate_abu(ctrl);
 	} else if (city.value == 'Dubai') {
		populate_dubai(ctrl);
 	} else if (city.value == 'Off Exhibition Road') {
		populate_exhibition(ctrl);
 	} else if (city.value == 'Hoora') {
		populate_hoora(ctrl);
 	} else if (city.value == 'Manama/Hoora') {
		populate_manama(ctrl);
 	} else if (city.value == 'Juffair') {
		populate_juffair(ctrl);
 	} else if (city.value == 'Qurum') {
		populate_qurum(ctrl);
 	} else if (city.value == 'Seeb') {
		populate_seeb(ctrl);
 	} else if (city.value == 'Bangalore') {
		populate_bangalore(ctrl);
 	} else if (city.value == 'Mumbai') {
		populate_mumbai(ctrl);
 	} else if (city.value == 'Tirupati') {
		populate_tirupati(ctrl);
	} else {
		newOpt = document.createElement("option");
		newOpt.text = '';
		newOpt.value = '';
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_abu(ctrl) {
 	var city = new Array();
 
	city[0] = "182_Ramee Royal Hotel Apartments";
	city[1] = "102_Ramee Hotel Apartments Abu Dhabi";
	city[2] = "104_Ramee Guestline Hotel Apartments 1";
	city[3] = "105_Euro Hotel Apartments";
	city[4] = "107_Ramee Garden Hotel Apartments";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_dubai(ctrl) {
 	var city = new Array();
 
/*
	city[0] = "106_Ramee Dhow Cruise";
	city[1] = "96_Ramee Guestline Deira Hotel";
	city[2] = "97_Ramee Guestline Hotel";
	city[3] = "98_Ramee Guestline Hotel Apartments 3";
	city[4] = "95_Ramee Guestline Hotel Apt 2, Dubai";
	city[5] = "94_Ramee Hotel Apartments, Dubai";
	city[6] = "100_Ramee International Hotel";
	city[7] = "101_Ramee Royal Hotel";
	city[8] = "93_Regal Plaza, Dubai";
	city[9] = "92_Regent Beach Resort, Dubai";
    city[10] = "183_Ramee Rose Hotel, Dubai";
	city[11] = "91_Regent Palace Hotel, Dubai";
*/

        city[0] = "91_Regent Palace Hotel, Dubai";
        city[1] = "101_Ramee Royal Hotel";
        city[2] = "92_Regent Beach Resort, Dubai";
        city[3] = "93_Regal Plaza, Dubai";
        city[4] = "95_Ramee Guestline Hotel Apt 2, Dubai";
        city[5] = "94_Ramee Hotel Apartments, Dubai";
        city[6] = "98_Ramee Guestline Hotel Apartments 3";
        city[7] = "96_Ramee Guestline Deira Hotel";
        city[8] = "97_Ramee Guestline Hotel";
	    city[9] = "100_Ramee International Hotel";
        city[10] = "183_Ramee Rose Hotel, Dubai";
    	city[11] = "106_Ramee Dhow Cruise";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_exhibition(ctrl) {
 	var city = new Array();
 
	city[0] = "137_Ramee Suites 3 Apartments - Bahrain";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_hoora(ctrl) {
 	var city = new Array();
 
	city[0] = "115_Windsor Tower, Bahrain";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_manama(ctrl) {
 	var city = new Array();
 
	city[0] = "146_Ramee Baisan Hotel Bahrain";
	city[1] = "137_Ramee Suites 3 Apartments - Bahrain";
	city[2] = "114_Metropolitan Hotel Bahrain";
	city[3] = "112_Grand Hotel, Bahrain";
	city[4] = "115_Windsor Tower, Bahrain";
	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_juffair(ctrl) {
 	var city = new Array();
 
	city[0] = "147_Ramee Palace Hotel Bahrain";
	city[1] = "180_Ramee California Hotel";
	city[2] = "116_Ramee International Hotel, Bahrain";
	city[3] = "117_Ramee Suites 2. Apartments  Bahrain";
	city[4] = "148_Ramee Suite 4 Apartment Bahrain";

   
	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_qurum(ctrl) {
 	var city = new Array();
 
	city[0] = "125_Ramee Guestline Hotel Qurum - Oman";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_seeb(ctrl) {
 	var city = new Array();
 
	city[0] = "134_Ramee Dream Resort";
	city[1] = "126_Al Bhajah - Oman";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }
 
 function populate_bangalore(ctrl) {
 	var city = new Array();
 
 	city[0] = "121_Ramee Guestline Hotel, Bangalore";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }
 
 function populate_mumbai(ctrl) {
 	var city = new Array();
 
	city[0] = "118_Ramee Guestline Hotel, Juhu";
	city[1] = "120_Ramee Guestline Hotel, Dadar";
	city[2] = "119_Ramee Guestline Hotel, Khar";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_tirupati(ctrl) {
 	var city = new Array();
 
	city[0] = "122_Ramee Guestline Hotel, Tirupati";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");
		
		var res = city[i].split("_");

		newOpt.value = res[0];
		newOpt.text = res[1];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_uae(form, ctrl)
 {
 	var city = new Array();
 
	city[0] = "Abu Dhabi";
	city[1] = "Dubai";

	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");

		newOpt.text = city[i];
		newOpt.value = city[i];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_bahrain(form, ctrl)
 {
 	var city = new Array();

	
	city[0] = "Manama/Hoora";
	city[1] = "Juffair";

	
	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");

		newOpt.text = city[i];
		newOpt.value = city[i];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_oman(form, ctrl)
 {
 	var city = new Array();

	city[0] = "Qurum";
	city[1] = "Seeb";
	
	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");

		newOpt.text = city[i];
		newOpt.value = city[i];
		ctrl.options.add(newOpt, i);
	}
 }

 function populate_india(form, ctrl)
 {
 	var city = new Array();

	city[0] = "Mumbai";
	city[1] = "Bangalore";
	city[2] = "Tirupati";
	
	ctrl.length = 0;
	var newOpt;

	for (var i = 0; i < city.length; i++) {
		newOpt = document.createElement("option");

		newOpt.text = city[i];
		newOpt.value = city[i];
		ctrl.options.add(newOpt, i);
	}
 }

