function fillCategory(){

var selectbox = document.getElementById('bg_tag');
addOption(selectbox, 'default', 'default');;
addOption(selectbox, 'aero', 'Aero');
addOption(selectbox, 'community', 'Community');
addOption(selectbox, 'corner', 'Corner');
addOption(selectbox, 'crest', 'Crest');
addOption(selectbox, 'cylinder', 'Cylinder');
addOption(selectbox, 'default', 'Default');
addOption(selectbox, 'gbar', 'Gamerbar');
addOption(selectbox, 'gel', 'Gel');
addOption(selectbox, 'gelsig', 'GelSig');
addOption(selectbox, 'geothermal', 'Geothermal');
addOption(selectbox, 'h2o', 'H2o');
addOption(selectbox, 'lastgame', 'LastGame');
addOption(selectbox, 'marble', 'Marble');
addOption(selectbox, 'micro', 'Micro');
addOption(selectbox, 'mini', 'Mini');
addOption(selectbox, 'presence', 'Presence');
addOption(selectbox, 'quote', 'Quote');
addOption(selectbox, 'recessed', 'Recessed');
addOption(selectbox, 'royale', 'Royale');
addOption(selectbox, 'sig', 'Sig');
}

function SelectSubCat(category, subCategory)
{
var category = document.getElementById('bg_tag');
var subCategory = document.getElementById('bg_style');
removeAllOptions(subCategory);
/*
addOption(subCategory, 'default', 'default');
*/

if(category.value == 'aero'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'community'){
addOption(subCategory,"360style", "360Style");
addOption(subCategory,"evav", "Eval Avatar");
addOption(subCategory,"kkz", "Konsole kingz");
addOption(subCategory,"mondoxbox", "MondoXbox");
addOption(subCategory,"tbs", "The Blue Skittle");
addOption(subCategory,"u360", "Unscripted 360");
addOption(subCategory,"xba", "XboxAddict");
}

if(category.value == 'corner'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"black", "Black");
addOption(subCategory,"blue", "Blue");
addOption(subCategory,"green", "Green");
addOption(subCategory,"lightblue", "LightBlue");
addOption(subCategory,"orange", "Orange");
addOption(subCategory,"pink", "Pink");
addOption(subCategory,"red", "Red");
addOption(subCategory,"teal", "Teal");
addOption(subCategory,"violet", "Violet");
addOption(subCategory,"yellow", "Yellow");
}

if(category.value == 'crest'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'cylinder'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"fire", "Fire");
addOption(subCategory,"ice", "Ice");
addOption(subCategory,"steel", "Steel");
}

if(category.value == 'default'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'gbar'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"360", "360");
addOption(subCategory,"abyss", "Abyss");
addOption(subCategory,"carbon", "Carbon");
addOption(subCategory,"dream", "Dream");
addOption(subCategory,"galaxy", "Galaxy");
addOption(subCategory,"grill", "Grill");
addOption(subCategory,"lime", "Lime");
addOption(subCategory,"live", "Live");
addOption(subCategory,"mgc", "Mgc");
}

if(category.value == 'gel'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"blue", "Blue");
addOption(subCategory,"black", "Black");
addOption(subCategory,"gold", "Gold");
addOption(subCategory,"green", "Green");
addOption(subCategory,"orange", "Orange");
addOption(subCategory,"pink", "Pink");
addOption(subCategory,"purple", "Purple");
addOption(subCategory,"red", "Red");
addOption(subCategory,"teal", "Teal");
addOption(subCategory,"violet", "Violet");
addOption(subCategory,"white", "White");
addOption(subCategory,"yellow", "Yellow");
}

if(category.value == 'gelsig'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"blue", "Blue");
addOption(subCategory,"black", "Black");
addOption(subCategory,"gold", "Gold");
addOption(subCategory,"green", "Green");
addOption(subCategory,"orange", "Orange");
addOption(subCategory,"pink", "Pink");
addOption(subCategory,"purple", "Purple");
addOption(subCategory,"red", "Red");
addOption(subCategory,"teal", "Teal");
addOption(subCategory,"violet", "Violet");
addOption(subCategory,"white", "White");
addOption(subCategory,"yellow", "Yellow");
}

if(category.value == 'geothermal'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"blue", "Blue");
addOption(subCategory,"grey", "Grey");
addOption(subCategory,"green", "Green");
addOption(subCategory,"orange", "Orange");
addOption(subCategory,"pink", "Pink");
addOption(subCategory,"purple", "Purple");
addOption(subCategory,"red", "Red");
addOption(subCategory,"teal", "Teal");
addOption(subCategory,"yellow", "Yellow");
}

if(category.value == 'h2o'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"brushed", "Brushed");
addOption(subCategory,"diamond", "Diamond");
addOption(subCategory,"meltdown", "Meltdown");
addOption(subCategory,"rubber", "Rubber");
addOption(subCategory,"rust", "Rust");
}

if(category.value == 'lastgame'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'marble'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"blue", "Blue");
addOption(subCategory,"green", "Green");
addOption(subCategory,"orange", "Orange");
addOption(subCategory,"pink", "Pink");
addOption(subCategory,"purple", "Purple");
addOption(subCategory,"red", "Red");
addOption(subCategory,"teal", "Teal");
addOption(subCategory,"yellow", "Yellow");
}

if(category.value == 'micro'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'mini'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'presence'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"glass", "Glass");
}

if(category.value == 'quote'){
addOption(subCategory,"default", "Default");
}

if(category.value == 'recessed'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"plate", "Plate");
addOption(subCategory,"wood", "Wood");
}

if(category.value == 'royale'){
addOption(subCategory,"default", "Default");
addOption(subCategory,"black", "Black");
addOption(subCategory,"breen", "Green");
addOption(subCategory,"orange", "Orange");
addOption(subCategory,"pink", "Pink");
addOption(subCategory,"purple", "Purple");
addOption(subCategory,"redstripe", "RedStripe");
addOption(subCategory,"royale", "Royale");
addOption(subCategory,"sky", "Sky");
addOption(subCategory,"tan", "Tan");
addOption(subCategory,"taxi", "Taxi");
}

if(category.value == 'sig'){
addOption(subCategory,"default", "Default");
}

}

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		selectbox.remove(i);
	}
}

function addOption(selectbox, value, text ){
		var optn = document.createElement("OPTION");
			optn.text = text;
			optn.value = value;
				selectbox.options.add(optn);
}