var timer
function scrolltop() {
  scrollmenu.style.pixelTop=document.body.scrollTop
  timer=setTimeout("scrolltop()",1)
}
function stoptimer() {
  clearTimeout(timer)
}

function checkframeset() {
if (top==self||!top.frames['HauptframeRFV']) { 
top.location.href=self.location.href.substr(0,top.location.href.indexOf(".de")+3)+"/index.htm?"+self.location.href;
}
}

// Resize picture to frame size 
// function showpic()
// src      Picture
// w, h     Original size of picture (Default size of frame)
// alt      Alternate text (Default "Picture")
// iw, ih   Size of frame
// pw, ph   Size in percent (default 100%)
// bw, bh   Size of border (default 24)
// sw, sh   Displayed size of picture 
function showpic(src, w, h, alt, text, pw, ph, bw, bh) {
  if (src == null) return;
  var iw, ih; // Set inner width and height
  if (window.innerWidth == null) {
    iw = document.body.clientWidth;
    ih=document.body.clientHeight; 
  } else {
    iw = window.innerWidth;
    ih = window.innerHeight;
  }
  
  if (w == null)    w = iw;
  if (h == null)    h = ih;
  if (alt == null)  alt = src;
  if (text == null) text = src;
  if (pw == null)   pw = 100;
  if (ph == null)   ph = 100;
  if (bw == null)   bw = 30;
  if (bh == null)   bh = 30;
  
  var sw = Math.round((iw - bw) * pw / 100);
  var sh = Math.round((ih - bh) * ph / 100);
  if ((w * sh) / (h * sw) < 1) 
    sw = Math.round(w * sh / h);
  else 
    sh = Math.round(h * sw / w);

  if (sw > w || sh > h ) {
    sw = w; 
    sh = h;
  }

  document.write('<body background="/images/background.jpg">');
  document.write('<div align="center"><center>');
  document.write('<table border="0" cellpadding="5" cellspacing="0" width="100%" height="100%">');
  if ((sw/sh) < (iw/ih)) { 
    // Horizontal 
    document.write('<tr><td width="'+ sw + '" valign="middle" align="center">');
    document.write('<A HREF="javascript:history.go(-1)">');
    document.write('<img src="' + src + '" alt="' + alt + '" width="' + sw + '" height="' + sh + '" align="middle">');
    document.write('</A>');
    document.write('</td><td valign="middle" align="left">');
    document.write(text);
    document.write('<br><br><font size=-1>Bildgröße: ' + w + 'x' + h + ' Pixel</font>');
    document.write('<br><A HREF="javascript:history.go(-1)">Zurück</A>');
  } else {
    // Vertikal
    document.write('<tr><td height="'+ sh + '" valign="middle" align="center">');
    document.write('<A HREF="javascript:history.go(-1)">');
    document.write('<img src="' + src + '" alt="' + alt + '" width="' + sw + '" height="' + sh + '" align="middle">');
    document.write('</A>');
    document.write('</td></tr><tr><td valign="middle" align="center">');
    document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">');
      document.write('<tr><td align="left" valign="top">');
      document.write(text);
      document.write('</td><td align="right" valign="top">');
      document.write('<font size=-1>Bildgröße: ' + w + 'x' + h + ' Pixel</font>');
      document.write('<br><A HREF="javascript:history.go(-1)">Zurück</A>');
    document.write('</td></tr></table>');
  }
  document.write('</td></tr>');
  document.write('</table>');
  document.write('</center></div>');
  document.write('</body>');
}


