//**** removeAllOptions
function removeAllOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{
selectbox.remove(i);
}
}

//*** addOption

function addOption(selectbox,text,value )
{
var optn = document.createElement("option");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}

//****addOption_list(selectbox)

function addOption_list(selectbox){
addOption(document.drop_list.dtotecolor,"Bright Lime", "BrightLime");
addOption(document.drop_list.dtotecolor,"Royal", "Royal");
addOption(document.drop_list.dtotecolor,"Black", "Black");
addOption(document.drop_list.dtotecolor,"Stone", "Stone");
addOption(document.drop_list.dtotecolor,"Navy", "Navy");
addOption(document.drop_list.dtotecolor,"Red", "Red");
addOption(document.drop_list.dtotecolor,"Maroon", "Maroon");
addOption(document.drop_list.dtotecolor,"Carolina Blue", "CarolinaBlue");
addOption(document.drop_list.dtotecolor,"Tropical Pink", "TropicalPink");
addOption(document.drop_list.dtotecolor,"Kelly Green", "KellyGreen");
addOption(document.drop_list.dtotecolor,"Tangerine", "Tangerine");
addOption(document.drop_list.dtotecolor,"Brown", "Brown");
addOption(document.drop_list.dtotecolor,"Mellow Yellow", "MellowYellow");
addOption(document.drop_list.dtotecolor,"Chrome", "Chrome");
addOption(document.drop_list.dtotecolor,"Hyacinth", "Hyacinth");
addOption(document.drop_list.dtotecolor,"Athletic Gold", "AthleticGold");
addOption(document.drop_list.dtotecolor,"Charcoal", "Charcoal");
addOption(document.drop_list.dtotecolor,"Light Pink", "LightPink");
}

//****** SelectSubCat

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

removeAllOptions(document.drop_list.dboatcolor);
addOption(document.drop_list.dboatcolor, "BoatColor", "boatcolor", "BoatColor");

addOption(document.drop_list.dboatcolor,"Red", "Red");
addOption(document.drop_list.dboatcolor,"White", "White");	
addOption(document.drop_list.dboatcolor,"Light Blue", "LightBlue");
addOption(document.drop_list.dboatcolor,"Yellow", "Yellow");
addOption(document.drop_list.dboatcolor,"Dark Blue", "DarkBlue");
addOption(document.drop_list.dboatcolor,"Green", "Green");
addOption(document.drop_list.dboatcolor,"Tote Color", "ToteColor");

document.drop_list.totecolor.value = document.drop_list.dtotecolor.value;
}


//****** removeOptions(selectbox)

function removeOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{
if(selectbox.options[i].selected)
selectbox.remove(i);
}
}

//*****reload

function setColor(selObj) {

 document.drop_list.boatcolor.value = document.drop_list.dboatcolor.value

}

//*** Submit form

function addToCart()
{
	document.droplist.submit();
}
