// Browser
var IE=false,W3C=false,N4=false;
if (document.layers)
 N4=true;
else if (document.all)
 IE=true
if (document.getElementById)
 W3C=true;


function goup(pic){

if (!document.layers) {
// document.writeln("<div id=\"logo\" style=\"position:absolute;visibility:'hide';visibility:'hidden'; right:10px; top:600px; z-index:2\">");
 document.writeln("<div id=\"logo\" style=\"position:absolute;visibility:'hide';visibility:'hidden'; left:20px; top:600px; z-index:2\">");
 document.writeln("<a href='javascript:window.scrollTo(0,0)'><img src=\""+pic+"\" border=0 alt='Seitenanfang'></a></div>");
 }
}

function setVariables(){
 if (IE){
  pYO="document.body.scrollTop";
  iH="document.body.clientHeight";
  checkLocation();
 }
 else if (W3C) {
  pYO="window.pageYOffset";
  iH="window.innerHeight";
  checkLocation();
 }
}

function checkLocation()
{
 innerY=eval(iH)-100 // place at the bottom
 yy=eval(pYO);
 if (yy==0)
  SetVisible("logo",0);
 else{
  SetVisible("logo",1);
  aktPos=GetPosTop("logo");
  if ((yy+innerY-parseInt(aktPos))<10)
   SetPosTop("logo",yy+innerY);
  else
   SetPosTop("logo",parseInt(aktPos)+(yy+innerY-parseInt(aktPos))/3);
 }
 setTimeout("checkLocation()",80)
}

function SetVisible(aktElem,bVisible){
 if (IE){
  if (bVisible)
   document.all[aktElem].style.visibility="visible";
  else
   document.all[aktElem].style.visibility="hidden";
 }
 else if (N4){
  if (bVisible)
   document.layers[aktElem].visibility = "show";
  else
   document.layers[aktElem].visibility = "hide";
 }
 else if (W3C) {
  if (bVisible)
   document.getElementById(aktElem).style.visibility = "visible";
  else
   document.getElementById(aktElem).style.visibility = "hidden";
 }
}

function GetPosTop(aktElem,top){
 if (IE)
  return document.all[aktElem].style.top;
 else if (N4)
  return document.layers[aktElem].top;
 else if (W3C)
  return document.getElementById(aktElem).style.top;
}

function SetPosTop(aktElem,top){
 if (IE)
  document.all[aktElem].style.top=top;
 else if (N4)
  document.layers[aktElem].top=top;
 else if (W3C)
  document.getElementById(aktElem).style.top=top;
}



