
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.frm_booking.np, "AR", "Airport Road - Apartments", "");
addOption(document.frm_booking.np, "KA", "Kormangala Apartments", "");
addOption(document.frm_booking.np, "BA", "Banashankari Apartments", "");
}

function SelectNp(){
// ON selection of category this function will work
removeAllOptions(document.frm_booking.rt);
document.frm_booking.amt.value="";	
if(document.frm_booking.np.value == 'AR'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"1b", "One Bed Room");
addOption(document.frm_booking.rt,"2b", "Two Bed Room");
addOption(document.frm_booking.rt,"3b", "Three Bed Room");
}
if(document.frm_booking.np.value == 'KA'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"cindia", "Chalet India");
addOption(document.frm_booking.rt,"Transita", "Transit-Airport Road");
addOption(document.frm_booking.rt,"Transitb", "Transit-Banshankari Ring Road");
addOption(document.frm_booking.rt,"Transitk", "Transit-Koramangala");
addOption(document.frm_booking.rt,"Tranzell", "Tranzell Hospitality");
}
if(document.frm_booking.np.value == 'BA'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"cindia", "Chalet India");
addOption(document.frm_booking.rt,"Transita", "Transit-Airport Road");
addOption(document.frm_booking.rt,"Transitb", "Transit-Banshankari Ring Road");
addOption(document.frm_booking.rt,"Transitk", "Transit-Koramangala");
addOption(document.frm_booking.rt,"Tranzell", "Tranzell Hospitality");
}
}

function SelectRt(){
removeAllOptions(document.frm_booking.rt);
document.frm_booking.amt.value="";
if(document.frm_booking.np.value == '1b'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"cis", "Studio type Serviced Apartment");
addOption(document.frm_booking.rt,"ci1b", "1 Bed Serviced Apartment");
addOption(document.frm_booking.rt,"ci2b", "2 Bed Room Serviced Apartment");
addOption(document.frm_booking.rt,"ci3b", "3 Bed Room Serviced Apartmnets");
}
if(document.frm_booking.np.value == '2b'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"tlsbr", "Single Bed Room-Regular");
addOption(document.frm_booking.rt,"tlsbl", "Single Bed Room-Luxury");
addOption(document.frm_booking.rt,"tlssar", "Studio Serviced apartment-Regular");
addOption(document.frm_booking.rt,"tlssal", "Studio Serviced apartment-Luxury");
addOption(document.frm_booking.rt,"tl2br", "2 Bed Room Serviced apartment-Regular");
addOption(document.frm_booking.rt,"tl2bl", "2 Bed Room Serviced apartment-Luxury");
addOption(document.frm_booking.rt,"tl3br", "3 Bed Room Serviced apartment-Regular");
addOption(document.frm_booking.rt,"tl3bl", "3 Bed Room Serviced apartment-Luxury");
addOption(document.frm_booking.rt,"tlksr", "King Size Luxury Suite-Luxury");
}
if(document.frm_booking.np.value == 'Transitb'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"tlnac", "Non A/c Room");
addOption(document.frm_booking.rt,"tlac", "A/c Room");
}
if(document.frm_booking.np.value == 'Transitk'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"tlp3b", "Pent House 3 Bed room Serviced apartment");
addOption(document.frm_booking.rt,"tlps", "Pent House studio serviced room");
}

if(document.frm_booking.np.value == 'Tranzell'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"tr2bl", "Two bedroom luxury apartment");
addOption(document.frm_booking.rt,"treap", "Executive Apartment- 2 BHK");
addOption(document.frm_booking.rt,"tr2bs", "Two bedroom standard apartment");
addOption(document.frm_booking.rt,"trsp", "Studio apartment");
addOption(document.frm_booking.rt,"trsr", "Tranzell Suite - A/c");
addOption(document.frm_booking.rt,"trer", "Executive Room - A/c");
addOption(document.frm_booking.rt,"trcr", "Club Room - A/c Single");
addOption(document.frm_booking.rt,"trstr", "Standard Room Non - A/c Single");
addOption(document.frm_booking.rt,"trexb", "Extra Bed or Person");
}
}

function AmtIs(){
document.frm_booking.amt.value="";	
if(document.frm_booking.rt.value == 'cis')
     document.frm_booking.amt.value="Rs.3800 +12% tax";
if(document.frm_booking.rt.value == 'ci1b')
     document.frm_booking.amt.value="Rs.4200 +12% tax";
if(document.frm_booking.rt.value == 'ci2b')
     document.frm_booking.amt.value="Rs.465000 +12% tax";
if(document.frm_booking.rt.value == 'ci3b')
     document.frm_booking.amt.value="Rs.5800 +12% tax";
	 
if(document.frm_booking.rt.value == 'tlsbr')
     document.frm_booking.amt.value="Rs.1620";
if(document.frm_booking.rt.value == 'tlsbl')
     document.frm_booking.amt.value="Rs.2160";
if(document.frm_booking.rt.value == 'tlssar')
     document.frm_booking.amt.value="Rs.2700";
if(document.frm_booking.rt.value == 'tlssal')
     document.frm_booking.amt.value="Rs.3600";
if(document.frm_booking.rt.value == 'tl2br')
     document.frm_booking.amt.value="Rs.3600";
if(document.frm_booking.rt.value == 'tl2bl')
     document.frm_booking.amt.value="Rs.4500";
if(document.frm_booking.rt.value == 'tl3br')
     document.frm_booking.amt.value="Rs.4500";
if(document.frm_booking.rt.value == 'tl3bl')
     document.frm_booking.amt.value="Rs.5400";
if(document.frm_booking.rt.value == 'tlksr')
     document.frm_booking.amt.value="Rs.6750";
///
if(document.frm_booking.rt.value == 'tlnac')
     document.frm_booking.amt.value="Rs.900";
if(document.frm_booking.rt.value == 'tlac')
     document.frm_booking.amt.value="Rs.1080";
	 
//
if(document.frm_booking.rt.value == 'tlp3b')
     document.frm_booking.amt.value="Rs.4050";
if(document.frm_booking.rt.value == 'tlps')
     document.frm_booking.amt.value="Rs.1440";

////
if(document.frm_booking.rt.value == 'tr2bl')
     document.frm_booking.amt.value="Rs.3850";
if(document.frm_booking.rt.value == 'treap')
     document.frm_booking.amt.value="Rs.2750";
if(document.frm_booking.rt.value == 'tr2bs')
     document.frm_booking.amt.value="Rs.2250";
if(document.frm_booking.rt.value == 'trsp')
     document.frm_booking.amt.value="Rs.2250";
if(document.frm_booking.rt.value == 'trsr')
     document.frm_booking.amt.value="Rs.2250";
if(document.frm_booking.rt.value == 'trer')
     document.frm_booking.amt.value="Rs.1800";
if(document.frm_booking.rt.value == 'trcr')
     document.frm_booking.amt.value="Rs.1500";
if(document.frm_booking.rt.value == 'trstr')
     document.frm_booking.amt.value="Rs.1000";
if(document.frm_booking.rt.value == 'trexb')
     document.frm_booking.amt.value="Rs.250";

}
function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

