/*
// author: bk
// last changed: 31 Oct 2004
// last changed: 15 Apr 2007
*/


// *************** scroll bottom line ****************************************
function scrolButtomLine(seed) {
  var msg = "  -stop-  Ballonfahrt ab 179 Euro/Person (Mo-Do, ausserhalb, 5-er Gruppe)  -stop-  Bernhard Krumm Hamburg Ballooning  -stop-  Tel: 040  551 00 11  -stop-  Heissluftballonfahrten in Hamburg und Umgebung  -stop-  ";
  var out = " ";
  var c   = 1;
  if (seed > 100) {
    seed--;
    var cmd = "scrolButtomLine(" + seed + ")";
    timerTwo = window.setTimeout(cmd, 100);
  }
  else if (seed <= 100 && seed > 0) {
    for (c = 0; c < seed; c++) {
      out += " ";
    }
    out += msg;
    seed--;
    var cmd = "scrolButtomLine(" + seed + ")";
    window.status = out;
    timerTwo = window.setTimeout(cmd, 100);
  }
  else if (seed <= 0) {
    if (-seed < msg.length) {
      out += msg.substring(-seed, msg.length);
		seed--;
      var cmd = "scrolButtomLine(" + seed + ")";
      window.status = out;
      timerTwo = window.setTimeout(cmd, 100);
    }
    else {
      window.status = " ";
      timerTwo = window.setTimeout("scrolButtomLine(100)", 75);
    }
  }
}


// *************** begin show time ****************************************
		var clocktimerID = null;
		var pics = "/clockimages/";
		var lastminute = -1;
		var x;
		var digits = new Array(10); // pre-load images;
		for (x=0; x<10; x++) {
			digits[x] = new Image;
			digits[x].src = pics +	x + ".gif";
		}
		
		function changedigits(h, m){
		  var digita = h%10;
		  var digitb = Math.floor((h-digita)/10);
		  document.clockdigit1.src = digits[digitb].src;
		  document.clockdigit2.src = digits[digita].src;
		  digita = m%10;
		  digitb = Math.floor((m-digita)/10);
		  document.clockdigit3.src = digits[digitb].src;
		  document.clockdigit4.src = digits[digita].src;
		}

		function showtime(){
		  var now = new Date();
		  var hours = now.getHours();
		  var minutes = now.getMinutes();
		  if (lastminute != minutes) {
		    changedigits(hours, minutes);
		    lastminute = minutes;
		    clocktimerID = setTimeout("showtime()",1000);
		  }
		}

/*
		var lastsecond = -1;

		function changedigits(h, m, s){
		  var digita = h%10;
		  var digitb = Math.floor((h-digita)/10);
		  document.clockdigit1.src = digits[digitb].src;
		  document.clockdigit2.src = digits[digita].src;
		  digita = m%10;
		  digitb = Math.floor((m-digita)/10);
		  document.clockdigit3.src = digits[digitb].src;
		  document.clockdigit4.src = digits[digita].src;
		  digita = s%10;
		  digitb = Math.floor((s-digita)/10);
		  document.clockdigit5.src = digits[digitb].src;
		  document.clockdigit6.src = digits[digita].src;
		}

		function showtime(){
		  var now = new Date();
		  var hours = now.getHours();
		  var minutes = now.getMinutes();
		  var seconds = now.getSeconds();
		  if (lastsecond != seconds) {
		    changedigits(hours, minutes, seconds);
		    lastsecond = seconds;
		    clocktimerID = setTimeout("showtime()",1000);
		  }
		}
*/
