function toggleTab(theTab, theActionURL) {
    if (!theTab) return;

    var searchType = 0;
    var srchtabs = document.getElementById("om_srchtab");
    var tabLCollection = srchtabs.getElementsByTagName('li');
    var tabACollection = srchtabs.getElementsByTagName('a');
    for (var loop = 0, max = tabACollection.length; loop < max; loop++) {
        tabACollection[loop].className = '';
        tabLCollection[loop].className = '';
        if (tabACollection[loop] == theTab) {
            tabACollection[loop].className = 'nb';
            tabLCollection[loop].className = 'wBt';
            searchType = loop;
        }
    }
    var searchForm = document.getElementById("topft2");
    searchForm.action = theActionURL;
    if (searchType == 0)
        document.getElementById("slnks").style.display = "block";
    else
        document.getElementById("slnks").style.display = "none";
}
