function doSearch() {
    var thisForm = document.forms['journalsearch'];
    if (thisForm.cmd.value == 'search') {
        if (thisForm.term.value.replace(/\s+/g,'').length > 0) {
            if (thisForm.elements['search-option'][1].checked) {
                // PMC-7182:  Changed this so that the search results always
                // open in the same window/tab.
                var newUrl = pmc_fp.entrez_script_URL +
                    '?EntrezSystem2.PEntrez.Pmc.Pmc_LimitsTab.LimitsOff=true&amp;db=pmc&amp;cmd=search&amp;term=' +
                    thisForm.term.value;
                location.href = newUrl;
                //var wnd = window.open(newUrl, 'pmc_search');
                //wnd.focus();
            }
            else {
                //return true;
                Go('search');
                return false;
            }
        }
        return false;
    }

    return true;
}

function Go(cmd) {
    var thisForm = document.forms['journalsearch'];
    var url = buildFPUrl(cmd);
    if (url.length != 0) {
        location.href = url;
    }
}


