
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.kabootar.Category, "Security Services", "Security Services", "");
addOption(document.kabootar.Category, "Housekeeping Services", "Housekeeping Services", "");
addOption(document.kabootar.Category, "Electronic Security", "Electronic Security", "");
addOption(document.kabootar.Category, "Fire Services", "Fire Services", "");
}

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

removeAllOptions(document.kabootar.SubCat);
addOption(document.kabootar.SubCat, "", "--Service/Product--", "");

if(document.kabootar.Category.value == 'Security Services'){
addOption(document.kabootar.SubCat,"Security Guards", "Security Guards");
addOption(document.kabootar.SubCat,"Body Guards", "Body Guards");
addOption(document.kabootar.SubCat,"Mobile Patrol", "Mobile Patrol");
addOption(document.kabootar.SubCat,"Other Services", "Other Services");
}
if(document.kabootar.Category.value == 'Housekeeping Services'){
addOption(document.kabootar.SubCat,"Machanised Housekeeping", "Machanised Housekeeping");
addOption(document.kabootar.SubCat,"Un-machanised Housekeeping", "Un-machanised Housekeeping");
addOption(document.kabootar.SubCat,"Office Assistant", "Office Assistant", "");
addOption(document.kabootar.SubCat,"Lift Operator", "Lift Operator", "");
addOption(document.kabootar.SubCat,"Plumber", "Plumber", "");
addOption(document.kabootar.SubCat,"Electrician", "Electrician", "");
addOption(document.kabootar.SubCat,"Gardener", "Gardener", "");
addOption(document.kabootar.SubCat,"Other Janitorial Services", "Other Janitorial Services", "");
}
if(document.kabootar.Category.value == 'Electronic Security'){
addOption(document.kabootar.SubCat,"Cameras/DVR Cards", "Cameras/DVR Cards");
addOption(document.kabootar.SubCat,"Bio-metric Access Control", "Bio-metric Access Control");
addOption(document.kabootar.SubCat,"Wireless Security Devices", "Wireless Security Devices");
addOption(document.kabootar.SubCat,"Motion Detectors", "Motion Detectors");
addOption(document.kabootar.SubCat,"Glass Break Detectors", "Glass Break Detectors");
addOption(document.kabootar.SubCat,"Magnetic Door Locks", "Magnetic Door Locks");
addOption(document.kabootar.SubCat,"Other Electronic Devices", "Other Electronic Devices");
}
if(document.kabootar.Category.value == 'Fire Services'){
addOption(document.kabootar.SubCat,"Fire Extinguisher", "Fire Extinguisher");
addOption(document.kabootar.SubCat,"Fire Annunciators", "Fire Annunciators");
addOption(document.kabootar.SubCat,"Fire/Fume/Gas/Water Detector", "Fire/Fume/Gas/Water Detector");
addOption(document.kabootar.SubCat,"Strobe", "Strobe");
addOption(document.kabootar.SubCat,"Cord Reel", "Cord Reel");
addOption(document.kabootar.SubCat,"Other Fire Tools/Services", "Other Fire Tools/Services");
}

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

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

