var showOneHitList=false;

function onloadFunctions() {
  //error on loading from the list view, nrhits does not exist 
   if (nrhits==1) {reload+="&directfromlist=true"};// ik moet in hde stylesheets nog inbouwen dat ie
//<!-- change  -->
    if  (((showrec != '-1')||(nrhits==1))&&(!showOneHitList)&&(replytype=="caption")) {document.location.href=reload}
//<!-- end change -->
// enable return to send the query
  setResultsKeyEvents();
}

// enable return to send the query
function zoekenplus_handler(e) {
    if (document.all) { e = window.event;}
    var key;
    if (document.layers) { key = e.which;}
    if (document.all) { key = e.keyCode}
    if (key==13) {zoekenplus(); return false;}
}

function zoeken_handler(e) {
    if (document.all) { e = window.event;}
    var key;
    if (document.layers) { key = e.which;}
    if (document.all) { key = e.keyCode}
    if (key==13) {doTheSubmitThing();   }
}

function setResultsKeyEvents(){
   var zpns = (navigator.appName == "Netscape");
   if (zpns){document.layers["zoeken"].document.forms['usersearchform'].txt0.onkeydown=zoekenplus_handler} else {document.forms['usersearchform'].txt0.onkeydown=zoekenplus_handler}
}
// einde enable return to send the query


var isMac=navigator.userAgent.indexOf('Mac')!=-1;
var ns = (navigator.appName == "Netscape");
var popupWindowNr=0;
var zzlnRoot="/coop/bibliop/bibl-html";


function makeRemote(theURL) {
  //You can 'or'  together every browser that does not support the zooming
  // in fact it is only the following, but I've set the zoom option off for every Netscape
  // on the mac, cause it is an eventhandling problem which will certainly turn oup again
  // in new versions
    var NOTzoomable=isMac;//(isMac&&ns) //(isMac&&ns&&(navigator.appVersion.indexOf('4.7')!=-1));
   //MACHINEAFHANKELIJK
  if (!NOTzoomable) {
    remote = window.open('','afbeelding_'+popupWindowNr++,'scrollbars=yes,resizable=yes,width=460,height=620');
    remote.location.href=zzlnRoot+'/resources/popupwindowframe.html?'+theURL;
  } 
  else {
    remote = window.open(theURL,'afbeelding','scrollbars=yes,resizable=yes');
  }
  //EINDE MACHINEAFHANKELIJK
  //De volgende twee statements zijn voor een mooi in beeld springen van het popupwindow
  remote.opener.blur;
  remote.focus();
}


function zoekenplus() {
    var zpns = (navigator.appName == "Netscape");
    var zoekveldvalue='';
    if (zpns){zoekveldvalue=eval('document.layers["zoeken"].document.usersearchform.txt0.value')}
    else {zoekveldvalue=eval('document.usersearchform.txt0.value')}
    var dbcodequery='dbcode:(HBB OR BBB OR THESAUR OR ADRES OR ALFABET OR ALF1851 OR PICATHES OR BKVB OR DOCUBOEK OR REPCOL OR REPVEIL OR DBSC OR VERZCAT OR TERMEN)';
     document.searchform.query.value=dbcodequery+' AND ('+ zoekveldvalue+')';
  if (zoekveldvalue != ''){
    document.searchform.submit();
  }
}

