function stick() {
setTimeout("position()",100); }
wannabepos=1;
actypos=1;

function position() {
if (document.all)
{ wannabepos=document.body.scrollTop+1; }

else 
{ wannabepos=window.pageYOffset+1; }

if (wannabepos<10 ) { wannabepos=1; }
setTimeout("position()",10);
action(); }

function action() {
actypos=actypos+(wannabepos-actypos)/20;

if (document.all) {
xwidth=document.body.scrollWidth;
//document.all.stick.style.top=actypos;
document.all.stick.style.left=((xwidth-15)/2)-492; }

else if (document.getElementById){
xwidth=window.innerWidth;
//document.getElementById("stick").style.top=actypos;
document.getElementById("stick").style.left=((xwidth-15)/2)-502; }

else if (document.captureEvents && !document.getElementById){
xwidth=window.innerWidth;
//document.layers.stick.top=actypos;
document.layers.stick.left=((xwidth-15)/2)-502; }

}

function Bildwechsel(Bildnr,Bildobjekt) {
if (browserVer == 1) {
 window.document.images[Bildnr].src = Bildobjekt.src;
}}

function random_img() {
 images = new Array(
  new Array("img/random_01.jpg"),
 new Array("img/random_02.jpg"),
 new Array("img/random_03.jpg"),
  new Array("img/random_04.jpg"),
   new Array("img/random_05.jpg"),
    new Array("img/random_06.jpg"),
     new Array("img/random_07.jpg"),
  new Array("img/random_08.jpg")



 );
for (i=0;i<images.length+i;i++) {
 a = Math.round(Math.random()*images.length);
 if ((a >= 0) && (a < images.length)) {
  bild = images[a];
  URL = bild[0];

   if (navigator.appName.indexOf('Netscape') != -1) { FensterBreite = self.innerWidth }
   else if (navigator.appName.indexOf('Microsoft') != -1) { FensterBreite = document.body.clientWidth };
   
   document.write("<img src=\""+URL+"\" border=\"0\" >");
  break;
  }
 }
}


