var yPos;
function FensterHoehe() {
  var y;
  if (parent.self.innerHeight) // all except Explorer
  {y = parent.self.innerHeight;}
  else if (parent.document.documentElement && parent.document.documentElement.clientHeight)// Explorer 6 Strict Mode
  {y = parent.document.documentElement.clientHeight;}
  else if (parent.document.body) // other Explorers
  {y = parent.document.body.clientHeight;}
  return y;
}

function MausPos(Ereignis) {
  if (!Ereignis) {
    Ereignis = window.event;
  }
  yPos=Ereignis.clientY;
}

function tip(id,x,y,b) {
  var name = navigator.userAgent.toLowerCase();
  if (name.indexOf('opera')>-1) {
    document.getElementById(id).style.display='block';
  }
  document.getElementById(id+'sp').style.display='block';
  document.getElementById(id+'sp').style.left=x+'px';
  //if ((screen.height-yPos) < 150) {
  if (yPos>(FensterHoehe()/2)) {
    if (name.indexOf('opera')>-1) {
      document.getElementById(id+'sp').style.removeProperty('top');
    }
    else {document.getElementById(id+'sp').style.top=null;
    }
    document.getElementById(id+'sp').style.bottom=y+'px';
  }
  else {
    if (name.indexOf('opera')>-1) {
      document.getElementById(id+'sp').style.removeProperty('bottom');
    }
    else {document.getElementById(id+'sp').style.bottom=null;}
    document.getElementById(id+'sp').style.top=y+'px';
  }
  document.getElementById(id+'sp').style.width=b+'px';
}
function toolzeig(id,x,y,b) {
  i=id;xx=x;yy=y;bb=b;
  tm=window.setTimeout("tip(i,xx,yy,bb)", 400);
}
function toolweg(id) {
  window.clearTimeout(tm);
  document.getElementById(id+'sp').style.display='none';
}
document.onmouseover = MausPos;

