// Must be kept in synch with values in esid_inc.asp
var SEARCH_TYPES = new Array("Application","Executable","Company");
var SEARCH_TYPES_MSG = new Array("an application","an executable","a software company");
var SEARCH_APP = 0;
var SEARCH_EXE = 1;
var SEARCH_MAN = 2;

function checkSearchInput(st)
{
        var radios = document.forms["esid-search-form"].searchType;
        if (st.length < 1) {
                // Get which radio button was selected
                for (var i=0; i<SEARCH_TYPES.length; i++) {
                        if (radios[i].checked) {
                                alert("Please enter the name of " + SEARCH_TYPES_MSG[i] + " to search for.");
                        }
                }
                return false;
        }
        if (radios[SEARCH_EXE].checked && st.toLowerCase()==".exe") {
                alert("You must enter a portion of the name of a file.");
                return false;
        }
        return true;
}

