var toID, oldImgName = "", actMidPic = 1, scrollOn = false;

function picOver(me, source) { 
  oldImgName = me.src;
  me.src = "bilder/" + source;
}

function picOut(me) { me.src = oldImgName; }

function preLoadPics() {
  if (!document.prePics) 
  {
    document.prePics = new Array();
  }
  var i,j,a = preLoadPics.arguments;
  for (i=0;i<a.length;i++) 
  {
   document.prePics[i]=new Image(); 
   document.prePics[i].src=a[i];
  }
}


function scrollDown() {
  var posY = parseInt(document.getElementById("textfeld").style.top);
  var bottomY = parseInt(document.getElementById("textfeld").style.height) * -1;
  if (posY > bottomY) {
    document.getElementById("textfeld").style.top = (posY - 4) + "px";
  }
  if (scrollOn) {toID = setTimeout("scrollDown()",20);}
}

function scrollUp() {
  var posY = parseInt(document.getElementById("textfeld").style.top);
  var bottomY = parseInt(document.getElementById("textfeld").style.height) * -1;
  if (posY < 0) {
    document.getElementById("textfeld").style.top = (posY + 4) + "px";
  }
  if (scrollOn) {toID = setTimeout("scrollUp()",20);}
}




function startScrollDown() { scrollOn = true; scrollDown(); }

function startScrollUp() { scrollOn = true; scrollUp(); }

function stopScroll() { scrollOn = false; clearTimeout(toID); }
