function rtnSubCat(){
 if (XmlHttpObj.readyState == 4)
  if (XmlHttpObj.status != 200) alert("problem retrieving data from the server, status code: "  + XmlHttpObj.status);
    else {
        var data = XmlHttpObj.responseXML.documentElement;
	    var records = data.getElementsByTagName('record');
		var subCats = document.getElementById('subcategory');
 	    for (var count = subCats.options.length-1; count >-1; count--)
            subCats.options[count] = null;
        var idValue = 0;
        var textValue = '';
        var optionItem = null;
        for(var count = 0; count < records.length; count++) {
		     idValue = records[count].getAttribute("id");
			 textValue = GetInnerText(records[count]);
		     optionItem = new Option(textValue, idValue, false, false);
		     subCats.options[subCats.length] = optionItem;
	    }
    }
}

