function doSearch(oForm) {

    if (isInteger(oForm, 3, "Points Value", "") &&
        isValidNumber(oForm, 3, "Points Value", "", true)) {
        // exit function and submit iff validated ok
        
        oForm.n.value = oForm.c1.options[oForm.c1.selectedIndex].text;
        oForm.submit();
    }
    
    return false;
}

function fillCategory(sCatIdx)
{
    with (document.frmSearch.c1) {
        length = 0;

        // build 'All Categories' option item.
        // remove this section if do not wish to have 'All Categories' option,
        // and set n=0 in for do loop
        length++;
        options[0].text = "Select Category";
        options[0].value = "All";          
    
        // build other option items
        for (var i=0, n=1; i<c.length; i++) {
        
            // show all categories from both catalogue, or
            // show subset of categories depend on chosen catalogue        
            if ((c[i][0] == sCatIdx) || (sCatIdx == "All")) {
                length++;
                options[n].text = c[i][2];
                options[n++].value = c[i][1];
            }
            
        }
        
        selectedIndex = 0;
    }        
}