
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.category, "cat1", "Models Cat. 1", "");
addOption(document.drop_list.category, "cat2", "Models Cat. 2", "");
addOption(document.drop_list.category, "pcat1", "People Cat. 1", "");
addOption(document.drop_list.category, "pcat2", "People Cat. 2", "");
addOption(document.drop_list.category, "kinderen", "Kids", "");
addOption(document.drop_list.category, "tieners", "Teens", "");
addOption(document.drop_list.category, "special", "Specials", "");
}

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

removeAllOptions(document.drop_list.age);
//addOption(document.drop_list.age, "18to200", "All", "");

if(document.drop_list.category.value == 'cat1' || document.drop_list.category.value == 'cat2' ){
addOption(document.drop_list.age,"18to35", "All", "");
addOption(document.drop_list.age,"18to25", "18 to 25");
addOption(document.drop_list.age,"26to35", "26 to 35");
}

if(document.drop_list.category.value == 'pcat1' || document.drop_list.category.value == 'pcat2' ){
addOption(document.drop_list.age,"18to200", "All", "");
addOption(document.drop_list.age,"18to25", "18 to 25");
addOption(document.drop_list.age,"26to35", "26 to 35");
addOption(document.drop_list.age,"36to55", "36 to 55");
addOption(document.drop_list.age,"55to200", "+55");
}

if(document.drop_list.category.value == 'tieners' ){
addOption(document.drop_list.age,"12to17", "All", "");
addOption(document.drop_list.age,"12to14", "12 to 14");
addOption(document.drop_list.age,"14to17", "14 to 17");
}

if(document.drop_list.category.value == 'kinderen' ){
addOption(document.drop_list.age,"0to11", "All", "");
addOption(document.drop_list.age,"0to5", "0 to 5");
addOption(document.drop_list.age,"6to8", "6 to 8");
addOption(document.drop_list.age,"9to11", "9 to 11");
}

if(document.drop_list.category.value == 'special'){
addOption(document.drop_list.age,"0to200", "All", "");
addOption(document.drop_list.age,"0to5", "0 to 5");
addOption(document.drop_list.age,"6to8", "6 to 8");
addOption(document.drop_list.age,"9to11", "9 to 11");
addOption(document.drop_list.age,"12to14", "12 to 14");
addOption(document.drop_list.age,"14to17", "14 to 17");
addOption(document.drop_list.age,"18to25", "18 to 25");
addOption(document.drop_list.age,"26to35", "26 to 35");
addOption(document.drop_list.age,"36to55", "36 to 55");
addOption(document.drop_list.age,"55to200", "+55");
}

}
////////////////// 

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

