<!--
    //functions needed for dual list boxes where one is categories, and if you change the category select box
    //it will then repopulate the sub category boxes, fill the arrays catarr and subarr when loading the page
    //call listChanged(ctrl,fillform) function with 'this' for ctrl,
    //and 'document.mainform.sub_id' for form element to refill

	function fillcatarr(cat_id,cat_desc)
	{
	    this.cat_id = cat_id;
	    this.cat_desc = cat_desc;
	}

	var catarr = new Array();
	var ncatarr = 0;

	function fillsubarr(sub_id,cat_id,sub_desc)
	{
	    this.sub_id = sub_id;
	    this.cat_id = cat_id;
	    this.sub_desc = sub_desc;
	}

	var subarr = new Array();
	var nsubarr = 0;

	function listChanged(ctrl,fillform)
	{
	    //call this function with 'this' for ctrl, and 'document.mainform.sub_id' for form element to refill
	    var obj = eval(fillform);
	    changeCategories(ctrl,obj);
	    var strind = fillform+".selectedIndex = 0;"
	    eval(strind);
	}
	function changeCategories(ctrl, selList)
	{
	    clearSelectList(selList);
	    var i,j=0;

	    if(ctrl.options[ctrl.options.selectedIndex].value!=-1)
	    {
	        for(i=0;i<nsubarr;i++)
	        {
	            if(subarr[i].cat_id==ctrl.options[ctrl.options.selectedIndex].value)
	            {
	                var opt = new Option (subarr[i].sub_desc,subarr[i].sub_id);
	                selList.options[j] = opt;
	                j++;
	            }
	        }
	    }
	}
	function clearSelectList(selList)
	{
	    while(selList.options.length>0)
	    {
	        selList.options[0] = null;
	    }
	}

//-->