function hideLayer(div) {
  document.getElementById(div).style.visibility="hidden";
}

function showLayer(div) {
  document.getElementById(div).style.visibility="visible";
}

function focusLogin() {
  if (document.forms[0].username != null) {
    setTimeout("document.forms[0].username.focus()",250);
    document.getElementById('loginLayer').style.zIndex = 2;
  } else {
    document.getElementById('loginLayer').style.zIndex = 2;
  }
}

function focusSoek() {
  setTimeout("document.soekForm.keyword.focus()",250);
  document.getElementById('soekLayer').style.zIndex = 2;
}

function popup_scroll(location, width, height){
   OpenWin = this.open(location, "help",'toolbar=no,menubar=no,location=no,scrollbars=yes,resize=no,width='+width+',height='+height+'screenX=50,left=50,screenY=50,top=50');
}

function popup_chat(location, width, height) {
   OpenWin = this.open(location, "chatwnd",'toolbar=no,menubar=no,location=no,scrollbars=yes,resize=yes,width='+width+',height='+height+',screenX=50,left=50,screenY=50,top=50');
}

function help(){
   popup_scroll('index.php3?use=help&helpuse={USE}&helpcmd={CMD}', 450, 350);
}

function printpage(){
   if(document.location.search.length>0)
      loc = 'index.php3'+document.location.search+'&showTemp=print';
   else
      loc = '?&showTemp=print';
   OpenWin = this.open(loc, "help",'toolbar=yes,menubar=yes,location=no,scrollbars=yes,resize=no,width='+780+',height='+400+'screenX=10,left=10,screenY=10,top=10');
}

function PopUpWin(source,name,width,height) {
        if(width>0) {
          width = width + 20;
          height = height + 20;
        }
        window.open(source, name,"location=0,toolbar=no,menubar=yes,scrollbars=no,resizable=yes" + (width>0 ? ",width="+width+",height="+height : ""));
}
