var activated_div = "";
function show(div){
  document.getElementById(div).style.visibility = "visible";
  document.getElementById(div).style.width = "auto";
  document.getElementById(div).style.height = "auto";
  activated_div = div;
}
function hidden(div){
//  document = document.getElementById("div");
  document.getElementById(div).style.visibility = "hidden";
}
function hidden_def(){
//  document = document.getElementById("div");
  if(activated_div != ""){
      document.getElementById(activated_div).style.visibility = "hidden";
  }
}


function submitSearch(){
  document.f.action.value = 'search';
  document.f.submit();
}

function submitExtraTop(cat, ex_link){
  top.CENTER.document.location.href=ex_link;
  top.TOP.document.location.href="to_" + cat +".html";
}

function submitTop(cat){
  top.CENTER.document.location.href="ce_" + cat +".html";
  top.TOP.document.location.href="to_" + cat +".html";
}

function submitExtra(cat, ex_link){
  getImgLogo(cat);
  top.CENTER.document.location.href=ex_link;
  top.LEFT.document.location.href="li_" + cat +".html";
}

function submitExtraSelf(ex_link){
  top.CENTER.document.location.href=ex_link;
}
function submitExtraLiter(ref){
  top.CENTER.document.location.href= "/cgi-bin/_liter/lit_display.pl?db=" + ref;
}

function submitSelf(name){
  top.CENTER.document.location.href="ce_" + name +".html";
}

function submitCenter(cat){
  top.CENTER.document.location.href="ce_" + cat +".html";
  top.LEFT.document.location.href="li_" + cat +".html";
}

function submitMinus(cat){
  getImgLogo(cat);
  var f=document.f;
  f.minus.value = cat
  f.curr_ref.value = cat;
  top.CENTER.document.location.href="ce_" + cat +".html";
  top.LEFT.document.location.href="li_" + cat +".html";
}

function submitPlus(cat){
  getImgLogo(cat);
  var f=document.f;
  if(f.cats.value == ""){
    f.cats.value = cat;
  } else {
    f.cats.value = f.cats.value + "," + cat;
  }
  f.curr_ref.value = cat;
  top.CENTER.document.location.href="ce_" + cat +".html";
  top.LEFT.document.location.href="li_" + cat +".html";
}

function getUrl(cat){
  var f=document.f;
  var usr= f.usr.value;
  var url = "action=dynamic&amp;xml=navigation&amp;xslt=print&amp;usr=" + usr + "&amp;curr_ref=" + cat + "&amp;cats=" +cat;//log-access_2
  winopen(url,660,800);
}

var winoff=0;
function winopen(url,W,H){ 
  var pref = document.URL.split("?")[0];
  //alert(pref+"?"+url);
  if(W=='' || W==undefined){W=800;}
  if(H=='' || H==undefined){H=650;}
  if(winoff==1){
    var fenster = window.open(url,"klwin",eingensch);
    fenster.close(); winoff=0;
  }
  var eingensch="scrollbars=yes,menubar=yes,resizable=yes,width="+W+",height="+H;
  var fenster = window.open(pref+"?"+url,"klwin",eingensch);
  fenster.focus(); winoff=1;
}

function winopenMail(url,W,H){
  if(W=='' || W==undefined){W=650;}
  if(H=='' || H==undefined){H=450;}
  if(mail_winoff==1){
    var fenster = window.open(url,"klwin",eingensch);
    fenster.close(); mail_winoff=0;
  }
  var eingensch="scrollbars=yes,menubar=yes,resizable=yes,width="+W+",height="+H;
  var fenster = window.open(url,"klwin",eingensch);
  fenster.focus(); mail_winoff=1;
}
