var current;
var message = current;
var character = 0;
var to_print = "";

function doText()
{
  if (character == message.length)
  {
    to_print += "<img src=\"images/_.gif\" />";
    document.getElementById('teletext').innerHTML = to_print;
    character++;
  }
  else if (character <= message.length - 1)
  {
    to_print += "<img src=\"images/" + message.charAt(character) + ".gif\" />";
    document.getElementById('teletext').innerHTML = to_print;
    character++;
    setTimeout("doText()", 100);
  }
}

function doNewText(text)
{
  message = text;
  character = 0;
  to_print = "";
  doText();
}

link1on= new Image(59,50);
link1on.src="images/button1b.gif";  
link2on= new Image(58,50); 
link2on.src="images/button2b.gif"; 
link3on= new Image(62,50); 
link3on.src="images/button3b.gif"; 
link4on= new Image(90,50); 
link4on.src="images/button4b.gif"; 

link1off= new Image(59,50);
link1off.src="images/button1a.gif";
link2off= new Image(58,50);
link2off.src="images/button2a.gif";   
link3off= new Image(62,50);
link3off.src="images/button3a.gif";
link4off= new Image(90,50);
link4off.src="images/button4a.gif";

function lightup(imgName)
{
  imgOn=eval(imgName + "on.src");
  document[imgName].src = imgOn;
}

function turnoff(imgName)
{
  imgOff=eval(imgName + "off.src");
  document[imgName].src = imgOff;
}




function doEmail(pre, post)
{
  document.write(
  '<a href="mailto:' + pre + '@' + post + '">' 
    + pre + '@' + post +'</a>')
}

function doEmailDisp(pre, post, disp)
{
  document.write(
  '<a href="mailto:' + pre + '@' + post + '">' 
    + disp +'</a>')
}

