
function filllocation(){ 
 // this function is used to fill the location list on load
//addOption(document.drop_list.location, "Orange", "Orange", "");
addOption(document.drop_list.location, "Dubbo", "Dubbo", "");
}

function SelectSubCat(){
// ON selection of location this function will work

removeAllOptions(document.drop_list.SubCat);
// addOption(document.drop_list.SubCat, "", "Subcat", ""); this is the first text for second box

//if(document.drop_list.location.value == 'Orange'){
//addOption(document.drop_list.SubCat,"Studio Suite", "Studio Suite");
//addOption(document.drop_list.SubCat,"Junior Suite", "Junior Suite");
//addOption(document.drop_list.SubCat,"2 bedroom Suite", "2 bedroom Suite");
//addOption(document.drop_list.SubCat,"The Blue Room", "The Blue Room");
//}
if(document.drop_list.location.value == 'Dubbo'){
addOption(document.drop_list.SubCat,"Executive King", "Executive King");
addOption(document.drop_list.SubCat,"Executive Twin", "Executive Twin");
addOption(document.drop_list.SubCat,"Premier King", "Premier King", "");
addOption(document.drop_list.SubCat,"Executive Family", "Executive Family", "");
}

}
////////////////// 

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);
}

