
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "Kerala", "Kerala", "");
addOption(document.drop_list.Category, "Goa", "Goa", "");
addOption(document.drop_list.Category, "Utaranchal", "Utaranchal", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "Cities", "");
if(document.drop_list.Category.value == 'Kerala'){
addOption(document.drop_list.SubCat,"Cochin", "Cochin (Ernakulam or Kochi)");	
addOption(document.drop_list.SubCat,"Munnar", "Munnar");
addOption(document.drop_list.SubCat,"Thiruvananthapuram", "Thiruvananthapuram (Trivandrum)");
addOption(document.drop_list.SubCat,"Alappuzha", "Alappuzha (Alleppey)");
addOption(document.drop_list.SubCat,"Kottayam", "Kottayam");
addOption(document.drop_list.SubCat,"Thrissur", "Thrissur");
}
if(document.drop_list.Category.value == 'Goa'){
addOption(document.drop_list.SubCat,"Benaulim", "Benaulim");
addOption(document.drop_list.SubCat,"Mobor", "Mobor");
addOption(document.drop_list.SubCat,"Margao", "Margao");
addOption(document.drop_list.SubCat,"Panaji", "Panaji");
}
if(document.drop_list.Category.value == 'Utaranchal'){
addOption(document.drop_list.SubCat,"PHP", "PHP");
addOption(document.drop_list.SubCat,"ASP", "ASP");
addOption(document.drop_list.SubCat,"Perl", "Perl");
}
}

function SelectHotels()
{
	removeAllOptions(document.drop_list.Hotel);
	addOption(document.drop_list.Hotel, "", "Hotels", "");
	if(document.drop_list.SubCat.value == 'Cochin')
	{
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/taj-malabar-hotel.html", "Taj Malabar Hotel");
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/taj-residency-hotel.html", "Taj Residency Hotel");
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/le-meridien-hotel.html", "Le Meridien Hotel");
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/casino-hotel.html", "Casino Hotel Kerala");
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/the-trident-hotel.html", "Trident Hotel Cochin");
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/avenue-regent-hotel.html", "The Avenue Regent");
	addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/kerala-india-hotels/renaissances-hotel.html", "Renaissances Hotel Cochin");

	}
	
	if(document.drop_list.SubCat.value == 'Munnar'){
addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/goa-india-hotels/radisson-white-sands-resort.html", "Radisson White Sands");
	}
	
	if(document.drop_list.SubCat.value == 'Mobor'){
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/goa-india-hotels/leela-palace-hotel.html", "Leela Palace Goa");
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/goa-india-hotels/holiday-inn-resort.html", "Holiday Inn Resort");
	}
	
	if(document.drop_list.SubCat.value == 'Panaji'){
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/goa-india-hotels/goa-marriott-resort.html", "Marriott Resort");
	}
	
	if(document.drop_list.SubCat.value == 'Benaulim'){
		addOption(document.drop_list.Hotel,"http://www.hotelsinindia.indianexcursion.net/goa-india-hotels/the-taj-exotica-hotel.html", "The Taj Exotica");
	}
}


function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}

function GoHotels()
{
	window.open(document.drop_list.Hotel.value);
}
function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;
	selectbox.options.add(optn);
	
}
