
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,"non", "Non A/c Regular");
addOption(document.frm_booking.rt,"ac", "A/c");
}
if(document.frm_booking.np.value == 'BA'){
addOption(document.frm_booking.rt,"", "select");
addOption(document.frm_booking.rt,"2br", "2 Bed Room Luxury");
addOption(document.frm_booking.rt,"s", "Single Room");
}
}

function AmtIs(){
document.frm_booking.amt.value="";	
if(document.frm_booking.rt.value == '1b')
     document.frm_booking.amt.value="Rs.3000 +12% tax";
if(document.frm_booking.rt.value == '2b')
     document.frm_booking.amt.value="Rs.3600 +12% tax";
if(document.frm_booking.rt.value == '3b')
     document.frm_booking.amt.value="Rs.4800 +12% tax";
	 
if(document.frm_booking.rt.value == 'non')
     document.frm_booking.amt.value="Rs.1000 +12% tax";
if(document.frm_booking.rt.value == 'ac')
     document.frm_booking.amt.value="Rs.1250 +12% tax";

if(document.frm_booking.rt.value == '2br')
     document.frm_booking.amt.value="Rs.5000 +12% tax";
if(document.frm_booking.rt.value == 's')
     document.frm_booking.amt.value="Rs.2000 +12% tax";
 
}
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);
}
