<!--

var tspeed=5;     // Versatz in Pixeln bei jedem "Ticken" (5)
var tmsec=40;     // Intervall in Millisekunden bis zum nächsten "Ticken"(40)
if (is.mac || is.ns5) tspeed*=2;

var imgbase = '../img';

var scrollgifs = new Array();
scrollgifs[0] = imgbase + '/' + 'pfeil_oben.gif';  // nach oben
scrollgifs[1] = imgbase + '/' + 'pfeil_unten.gif'; // nach unten
scrollgifs[2] = 9;                                // Breite Image
scrollgifs[3] = 9;                                // Höhe Image
var trand=1;                                       // Stärke des Rahmens in Pixeln
var scrollw = scrollgifs[2]+2*trand;   // Breite des Scrollelements in Pixeln (incl. Rahmen)
var scrollh = th;                      // Höhe des Scrollelements in Pixeln (incl. Rahmen)
var scrollx = tx + tw;
var scrolly = ty;

//----------------------------------------------------------------------------

var tick;
var y1=0;
var y2=th;

//----------------------------------------------------------------------------

function getDivHandle(ID)
{
 if (is.ie && is.mac) return eval("document.all."+ID);
 else if (document.getElementById) return document.getElementById(ID);
 else if (document.layers) return eval("document."+ID);
}

function getStyleHandle(ID)
{
 if (is.ie && is.mac) return eval("document.all."+ID+".style");
 else if (document.getElementById) return document.getElementById(ID).style;
 else if (document.layers) return eval("document."+ID);
}

//-----------------------------------------------------------------------------

function scroll_up(idnr)
{
 txtstyle=getStyleHandle("content"+idnr+"txt");
 if (parseInt(txtstyle.top) <= scrollstop) { clearInterval(tick); }
 else
 { 
  txtstyle.top = parseInt(txtstyle.top) - tspeed; 
  y1 += tspeed; y2 += tspeed;
  if (document.layers) { txtstyle.clip.top=y1; txtstyle.clip.bottom=y2; }
  else { txtstyle.clip='rect('+y1+'px '+tw+'px '+y2+'px 0px)'; }
 }
 return;
}

function scroll_down(idnr)
{
 txtstyle=getStyleHandle("content"+idnr+"txt");
 if (parseInt(txtstyle.top) >= ty) { clearInterval(tick); }
 else
 { 
  txtstyle.top=parseInt(txtstyle.top) + tspeed; 
  y1 -= tspeed; y2 -= tspeed;
  if (document.layers) { txtstyle.clip.top=y1; txtstyle.clip.bottom=y2; }
  else { txtstyle.clip='rect('+y1+'px '+tw+'px '+y2+'px 0px)'; }
 }
}

function createDivStart(idnr)
{
  if (document.layers)
  { 
    regener=setTimeout("window.onresize=regenerate",450); 
    document.writeln('<layer id="content'+idnr+'txt" class="trand" z-index="100"');
    document.writeln('left="'+tx+'" top="'+ty+'" width="'+tw+'" clip="'+tw+','+th+'">');
  }
  else
  {
    document.write('<div id="content'+idnr+'txt" class="trand" ');
    document.write('style="width:'+tw+'px;');
    document.writeln('position:absolute; left:'+tx+'px; top:'+ty+'px; z-index:100;">');
  }
 return 0;
}

function createScroller(idnr)
{
 if (document.layers)
 { 
  document.write('<layer id="scroller" left="'+scrollx+'" top="'+scrolly+'" ');
  document.writeln('width="'+scrollw+'" height="'+scrollh+'" z-index="200">');
 }
 else
 {
  document.write('<div id="scroller" style="position:absolute; left:'+scrollx+'px; top:'+scrolly+'px; ');
  document.writeln('width:'+scrollw+'px; height:'+scrollh+'px; z-index:200;">');
 }
  document.writeln('<TABLE WIDTH="'+scrollw+'" BORDER="0" CELLSPACING="0" CELLPADDING="0">');
  document.writeln('<TR>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+scrollgifs[2]+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('</TR>');
  document.writeln('<TR>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.write('<TD><A HREF="javascript:void(0);" ONMOUSEDOWN="down('+idnr+')"	ONMOUSEUP="stop()" ');
  document.write('ONMOUSEOVER="if(is.mac)down('+idnr+')" ONMOUSEOUT="if(is.mac)stop()"><IMG ');
  document.write('SRC="'+scrollgifs[0]+'" WIDTH="'+scrollgifs[2]+'" HEIGHT="'+scrollgifs[3]+'" BORDER="0"></A></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('</TR>');
  scrh=scrollh-2*trand-2*scrollgifs[3];
  document.writeln('<TR>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('<TD><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+scrollgifs[2]+'" HEIGHT="'+scrh+'"></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('</TR>');
  document.writeln('<TR>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.write('<TD><A HREF="javascript:void(0);" ONMOUSEDOWN="up('+idnr+')"	ONMOUSEUP="stop()" ');
  document.write('ONMOUSEOVER="if(is.mac)up('+idnr+')" ONMOUSEOUT="if(is.mac)stop()"><IMG ');
  document.write('SRC="'+scrollgifs[1]+'" WIDTH="'+scrollgifs[2]+'" HEIGHT="'+scrollgifs[3]+'" BORDER="0"></A></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('<TR>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+scrollgifs[2]+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('<TD CLASS="tscroll"><IMG SRC="'+imgbase+'/trans.gif" WIDTH="'+trand+'" HEIGHT="'+trand+'"></TD>');
  document.writeln('</TR>');
  document.writeln('</TABLE>');
  if (document.layers) document.writeln('</layer>');
  else  document.writeln('</DIV>');
}

function regenerate() { self.location.reload(); }

function tstart(idnr)
{
  txt=getDivHandle("content"+idnr+"txt");
  if (is.ie && is.mac)
  {
    if (txt.offsetHeight) ticktexth=parseInt(txt.offsetHeight);
    else { alert("mac(ie): ticker text height not defined"); return; }
  }
  else if (document.getElementById)
  {
    if (txt.offsetHeight) ticktexth=parseInt(txt.offsetHeight);
    else if(txt.firstChild.offsetHeight) ticktexth=parseInt(txt.firstChild.offsetHeight);
    else { alert("dom: ticker text height not defined"); return; }
  }
  else if (document.layers)
  { 
   if (txt.document.height) ticktexth=txt.document.height;
   else { alert("layers: ticker text height not defined"); return; }
  }
  txtstyle=getStyleHandle("content"+idnr+"txt");
  if (is.ie && is.mac) { txtstyle.clip='rect('+y1+'px '+tw+'px '+y2+'px 0px)'; }
  else if (document.getElementById) { txtstyle.clip='rect('+y1+'px '+tw+'px '+y2+'px 0px)'; }
  else if (document.layers) { txtstyle.clip.top=y1; txtstyle.clip.bottom=y2; }

  if (ticktexth <= scrollh)
  {
    scrollstyle=getStyleHandle("scroller");
    scrollstyle.visibility="hidden";
  }
  scrollstop = (ticktexth-ty-Math.floor(th/2))*(-1);
}

function up(idnr)
{ 
  if (tick) { clearInterval(tick); }
  if (ticktexth) { tick=setInterval("scroll_up("+idnr+")",tmsec); }
}

function down(idnr)
{ 
 if (tick) { clearInterval(tick); }
 if (ticktexth) { tick=setInterval("scroll_down("+idnr+")",tmsec); }
}

function stop() { if (tick) clearInterval(tick); }
function tunload() 
{ 
 if (tick) clearInterval(tick);
 if (document.layers) clearTimeout(regener); 
}

//-->
