
function fillCategory(){ 
 // this function is used to fill the L_point list on load
addOption(document.Parkscape.L_point, "Jesse H. Jones Park", "Jesse H. Jones Park", "");
addOption(document.Parkscape.L_point, "Mercer Arboretum", "Mercer Arboretum", "");
addOption(document.Parkscape.L_point, "Pundt Park", "Pundt Park", "");
addOption(document.Parkscape.L_point, "Cypresswood Bridge", "Cypresswood Bridge", "");
}

function SelectSubCat(){
// ON selection of L_point this function will work

removeAllOptions(document.Parkscape.R_point);
addOption(document.Parkscape.R_point, "", "Retrieval Point", "");

if(document.Parkscape.L_point.value == 'Jesse H. Jones Park'){
addOption(document.Parkscape.R_point,"Hwy 59 and Hamblen Road", "Hwy 59 and Hamblen Road");
//addOption(document.Parkscape.R_point,"Banana", "Banana");
//addOption(document.Parkscape.R_point,"Orange", "Orange");
}
if(document.Parkscape.L_point.value == 'Mercer Arboretum'){
addOption(document.Parkscape.R_point,"Jesse H. Jones Park", "Jesse H. Jones Park");
addOption(document.Parkscape.R_point,"Hwy 59 and Hamblen Road", "Hwy 59 and Hamblen Road");
//addOption(document.Parkscape.R_point,"Polo", "Polo", "");
}
if(document.Parkscape.L_point.value == 'Pundt Park'){
addOption(document.Parkscape.R_point,"Jesse H. Jones Park", "Jesse H. Jones Park");
addOption(document.Parkscape.R_point,"Hwy 59 and Hamblen Road", "Hwy 59 and Hamblen Road");
//addOption(document.Parkscape.R_point,"Perl", "Perl");
}
if(document.Parkscape.L_point.value == 'Cypresswood Bridge'){
addOption(document.Parkscape.R_point,"Jesse H. Jones Park", "Jesse H. Jones Park");
//addOption(document.Parkscape.R_point,"Hwy 59 and Hamblen Road", "Hwy 59 and Hamblen Road");
//addOption(document.Parkscape.R_point,"Perl", "Perl");
}

}
////////////////// 

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);
}
