function goSearch() {
        
  // catch empty search
  var nonEmpty = /\w+/;
nonEmpty.test(document.searchbox.qt.value);
  if(!nonEmpty.test(document.searchbox.qt.value)) {
     alert('Please supply a search term.');
         return;
  }
   if (document.searchbox.q[0].checked) {
     var searchurl="http://webcat.winnefox.org/web2/tramp2.exe/do_keyword_search/guest?SETTING_KEY=MARKESAN&index=default&hitlist_screen=hitlist.html&record_screen=Record.html&query_screen=home.html&servers=1home&query="+document.searchbox.qt.value+"&GO=Search";
         }  
  
  if (document.searchbox.q[1].checked) {
     var searchurl="http://www.markesanlibrary.org/search/node?keys="+document.searchbox.qt.value+"&op=Search";
         }
         window.location.href = searchurl;
         return false;
}

function goWebCatSearch() {
        
  // catch empty search
  var nonEmpty = /\w+/;
nonEmpty.test(document.webcatsearchbox.qt.value);
  if(!nonEmpty.test(document.webcatsearchbox.qt.value)) {
     alert('Please supply a search term.');
         return;
  }
   if (document.webcatsearchbox.q[0].checked) {
     var searchurl="http://webcat.winnefox.org/web2/tramp2.exe/do_keyword_search/guest?SETTING_KEY=MARKESAN&index=default&hitlist_screen=hitlist.html&record_screen=Record.html&query_screen=home.html&servers=1home&query="+document.webcatsearchbox.qt.value+"&GO=Search";
         }
   if (document.webcatsearchbox.q[1].checked) {
     var searchurl="http://webcat.winnefox.org/web2/tramp2.exe/do_authority_search/guest?SETTING_KEY=MARKESAN&hitlist_screen=hitlist.html&record_screen=Record.html&query_screen=home.html&servers=1home&SETTING_KEY=Markesan&location_group_filter=all&servers=1home&index=au&query="+document.webcatsearchbox.qt.value+"&GO=Search";
         }  
   if (document.webcatsearchbox.q[2].checked) {
     var searchurl="http://webcat.winnefox.org/web2/tramp2.exe/do_authority_search/guest?SETTING_KEY=MARKESAN&hitlist_screen=hitlist.html&record_screen=Record.html&query_screen=home.html&servers=1home&SETTING_KEY=Markesan&location_group_filter=all&servers=1home&index=ti&query="+document.webcatsearchbox.qt.value+"&GO=Search";
         }
   if (document.webcatsearchbox.q[3].checked) {
     var searchurl="http://webcat.winnefox.org/web2/tramp2.exe/do_authority_search/guest?SETTING_KEY=MARKESAN&hitlist_screen=hitlist.html&record_screen=Record.html&query_screen=home.html&servers=1home&SETTING_KEY=Markesan&location_group_filter=all&servers=1home&index=su&query="+document.webcatsearchbox.qt.value+"&GO=Search";
         }
         window.location.href = searchurl;
         return false;
}

