//**** 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.dsize,"2T", "2T");
addOption(document.drop_list.dsize,"3T", "3T");
addOption(document.drop_list.dsize,"4T", "4T");
}

//****** SelectSubCat

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

removeAllOptions(document.drop_list.dshirtcolor);
addOption(document.drop_list.dshirtcolor, "ShirtColor", "shirtcolor", "ShirtColor");

addOption(document.drop_list.dshirtcolor,"Light Pink", "LightPink");	
addOption(document.drop_list.dshirtcolor,"Light Blue", "LightBlue");	
addOption(document.drop_list.dshirtcolor,"Daisy", "Daisy");
addOption(document.drop_list.dshirtcolor,"Navy", "Navy");
addOption(document.drop_list.dshirtcolor,"Sport Grey", "SportGrey");
addOption(document.drop_list.dshirtcolor,"Red", "Red");
addOption(document.drop_list.dshirtcolor,"Royal", "Royal");

document.drop_list.size.value = document.drop_list.dsize.value;
}

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

removeAllOptions(document.drop_list.dballerinacolor);
addOption(document.drop_list.dballerinacolor, "BallerinaColor", "ballerinacolor", "BallerinaColor");

addOption(document.drop_list.dballerinacolor,"Black", "Black");	
addOption(document.drop_list.dballerinacolor,"Red", "Red");
addOption(document.drop_list.dballerinacolor,"Green", "Green");
addOption(document.drop_list.dballerinacolor,"Yellow", "Yellow");
addOption(document.drop_list.dballerinacolor,"Royal", "Royal");
addOption(document.drop_list.dballerinacolor,"White", "White");


document.drop_list.shirtcolor.value = document.drop_list.dshirtcolor.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);
}
}

function setColor(selObj) {

 document.drop_list.ballerinacolor.value = document.drop_list.dballerinacolor.value

}


//*****reload

//*** Submit form

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