
function fillCategory1(){ 
 // this function is used to fill the category list on load
	addOption(document.drop_list.Category1, "Manzanillo Olive Trees Std", "Manzanillo Olive Trees Std", "");
	addOption(document.drop_list.Category1, "Manzanillo Olive Trees Multi", "Manzanillo Olive Trees Multi", "");
	addOption(document.drop_list.Category1, "Sevillano Olive Tree Std", "Sevillano Olive Tree Std", "");
	addOption(document.drop_list.Category1, "Sevillano Olive Tree Multi", "Sevillano Olive Tree Multi", "");
	addOption(document.drop_list.Category1, "Wilsonii Olive Trees Multi", "Wilsonii Olive Trees Multi", "");
	addOption(document.drop_list.Category1, "Arbequina Olive Tree Std", "Arbequina Olive Tree Std", "");
}

function fillCategory2(){ 
	addOption(document.drop_list.Category2, "Manzanillo Olive Trees Std", "Manzanillo Olive Trees Std", "");
	addOption(document.drop_list.Category2, "Manzanillo Olive Trees Multi", "Manzanillo Olive Trees Multi", "");
	addOption(document.drop_list.Category2, "Sevillano Olive Tree Std", "Sevillano Olive Tree Std", "");
	addOption(document.drop_list.Category2, "Sevillano Olive Tree Multi", "Sevillano Olive Tree Multi", "");
	addOption(document.drop_list.Category2, "Wilsonii Olive Trees Multi", "Wilsonii Olive Trees Multi", "");
	addOption(document.drop_list.Category2, "Arbequina Olive Tree Std", "Arbequina Olive Tree Std", "");
}

function fillCategory3(){ 
	addOption(document.drop_list.Category3, "Manzanillo Olive Trees Std", "Manzanillo Olive Trees Std", "");
	addOption(document.drop_list.Category3, "Manzanillo Olive Trees Multi", "Manzanillo Olive Trees Multi", "");
	addOption(document.drop_list.Category3, "Sevillano Olive Tree Std", "Sevillano Olive Tree Std", "");
	addOption(document.drop_list.Category3, "Sevillano Olive Tree Multi", "Sevillano Olive Tree Multi", "");
	addOption(document.drop_list.Category3, "Wilsonii Olive Trees Multi", "Wilsonii Olive Trees Multi", "");
	addOption(document.drop_list.Category3, "Arbequina Olive Tree Std", "Arbequina Olive Tree Std", "");
}

function SelectSubCat1(){
// ON selection of category this function will work

	removeAllOptions(document.drop_list.SubCat1);
	addOption(document.drop_list.SubCat1, "", "Select One", "");

	if(document.drop_list.Category1.value == 'Manzanillo Olive Trees Std'){
	addOption(document.drop_list.SubCat1,"12ft", "12ft");
	addOption(document.drop_list.SubCat1,"14ft-15ft", "14'-15'");
	addOption(document.drop_list.SubCat1,"16ft-18ft", "16ft-18ft");
	addOption(document.drop_list.SubCat1,"19'-20'", "19ft-20ft");
	addOption(document.drop_list.SubCat1,"21ft-25ft", "21ft-25ft");
	}
	if(document.drop_list.Category1.value == 'Manzanillo Olive Trees Multi'){
	addOption(document.drop_list.SubCat1,"12ft", "12ft");
	addOption(document.drop_list.SubCat1,"14ft-15ft", "14ft-15ft");
	addOption(document.drop_list.SubCat1,"16ft-18ft", "16ft-18ft");
	addOption(document.drop_list.SubCat1,"19ft-20ft", "19ft-20ft");
	addOption(document.drop_list.SubCat1,"21ft-25ft", "21ft-25ft");
	}
	if(document.drop_list.Category1.value == 'Sevillano Olive Tree Std'){
	addOption(document.drop_list.SubCat1,"18ft-23ft", "18ft-23ft");
	}
	if(document.drop_list.Category1.value == 'Sevillano Olive Tree Multi'){
	addOption(document.drop_list.SubCat1,"18ft-23ft", "18ft-23ft");
	}
	if(document.drop_list.Category1.value == 'Wilsonii Olive Trees Multi'){
	addOption(document.drop_list.SubCat1,"6ft-10ft", "6ft-10ft");
	addOption(document.drop_list.SubCat1,"11ft-14ft", "11ft-14ft");
	}
	if(document.drop_list.Category1.value == 'Arbequina Olive Tree Std'){
	addOption(document.drop_list.SubCat1,"8ft-15ft", "8ft-15ft");
	}
}
function SelectSubCat2(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat2);
addOption(document.drop_list.SubCat2, "", "", "");


if(document.drop_list.Category2.value == 'Manzanillo Olive Trees Std'){
addOption(document.drop_list.SubCat2,"12ft", "12ft");
addOption(document.drop_list.SubCat2,"14ft-15ft", "14ft-15ft");
addOption(document.drop_list.SubCat2,"16ft-18ft", "16ft-18ft");
addOption(document.drop_list.SubCat2,"19ft-20ft", "19ft-20ft");
addOption(document.drop_list.SubCat2,"21ft-25ft", "21ft-25ft");
}
if(document.drop_list.Category2.value == 'Manzanillo Olive Trees Multi'){
addOption(document.drop_list.SubCat2,"12ft", "12ft");
addOption(document.drop_list.SubCat2,"14ft-15ft", "14ft-15ft");
addOption(document.drop_list.SubCat2,"16ft-18ft", "16ft-18ft");
addOption(document.drop_list.SubCat2,"19ft-20ft", "19ft-20ft");
addOption(document.drop_list.SubCat2,"21ft-25ft", "21ft-25ft");
}
if(document.drop_list.Category2.value == 'Sevillano Olive Tree Std'){
addOption(document.drop_list.SubCat2,"18ft-23ft", "18ft-23ft");
}
if(document.drop_list.Category2.value == 'Sevillano Olive Tree Multi'){
addOption(document.drop_list.SubCat2,"18ft-23ft", "18ft-23ft");
}
if(document.drop_list.Category2.value == 'Wilsonii Olive Trees Multi'){
addOption(document.drop_list.SubCat2,"6ft-10ft", "6ft-10ft");
addOption(document.drop_list.SubCat2,"11ft-14ft", "11ft-14ft");
}
if(document.drop_list.Category2.value == 'Arbequina Olive Tree Std'){
addOption(document.drop_list.SubCat2,"8ft-15ft", "8ft-15ft");
}
}
function SelectSubCat3(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat3);
addOption(document.drop_list.SubCat3, "", "", "");


if(document.drop_list.Category3.value == 'Manzanillo Olive Trees Std'){
addOption(document.drop_list.SubCat3,"12ft", "12ft");
addOption(document.drop_list.SubCat3,"14ft-15ft", "14ft-15ft");
addOption(document.drop_list.SubCat3,"16ft-18ft", "16ft-18ft");
addOption(document.drop_list.SubCat3,"19ft-20ft", "19ft-20ft");
addOption(document.drop_list.SubCat3,"21ft-25ft", "21ft-25ft");
}
if(document.drop_list.Category3.value == 'Manzanillo Olive Trees Multi'){
addOption(document.drop_list.SubCat3,"12ft", "12ft");
addOption(document.drop_list.SubCat3,"14ft-15ft", "14ft-15ft");
addOption(document.drop_list.SubCat3,"16ft-18ft", "16ft-18ft");
addOption(document.drop_list.SubCat3,"19ft-20ft", "19ft-20ft");
addOption(document.drop_list.SubCat3,"21ft-25ft", "21ft-25ft");
}
if(document.drop_list.Category3.value == 'Sevillano Olive Tree Std'){
addOption(document.drop_list.SubCat3,"18ft-23ft", "18ft-23ft");
}
if(document.drop_list.Category3.value == 'Sevillano Olive Tree Multi'){
addOption(document.drop_list.SubCat3,"18ft-23ft", "18ft-23ft");
}
if(document.drop_list.Category3.value == 'Wilsonii Olive Trees Multi'){
addOption(document.drop_list.SubCat3,"6ft-10ft", "6ft-10ft");
addOption(document.drop_list.SubCat3,"11ft-14ft", "11ft-14ft");
}
if(document.drop_list.Category3.value == 'Arbequina Olive Tree Std'){
addOption(document.drop_list.SubCat3,"8ft-15ft", "8ft-15ft");
}
}
////////////////// 

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);
}