/* Animatie in de titelbalk
 (c) 2007 Ben boukes, Ben's Hobbyhoekje
 Mag vrij worden gebruikt mits dit commentaar inatct blijft
*/

var AnimatedChars = 79;   // Deel van de titel waar de animatie plaats vindt
var WalkingChars = '*';  // Loopt heen en weer door de titel

/************************** Hieronder niet wijzigen **************************/
var theAnimation, theRest , started = false, step = 0, incr = 1;
var theTitleBar;

function welcometext() {
  theAnimation = document.title.substring(0,AnimatedChars);
  theRest = document.title.substring(AnimatedChars,document.title.length);
  theTitleBar = top.document.title;
  setTimeout("AnimateTitleText()",10);
}

function goodbyetext() {
  top.document.title = theTitleBar;
}

function AnimateTitleText() {
  step += incr;
  if (step == AnimatedChars) { incr = -1 } else 
    if (step == 0) { incr = 1 }
    
  top.document.title = theAnimation.substring(0,step) + WalkingChars + theAnimation.substring(step,AnimatedChars) + theRest;
  setTimeout("AnimateTitleText()",20);
}

window.onload=welcometext;
window.onunload=goodbyetext;


