//line will be an array of domains (generated!)
lines=line.length-1 //--Number of lines

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate()
{
  if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines)
  {
    document.getElementById("bannerlink").innerHTML=line[nextline]; 
    if (alwaysGoHome)
    {
      document.getElementById("bannerlink").href=siteURL+affiliateKey;
    }
    else
    {
      document.getElementById("bannerlink").href=siteURL+line[nextline]+affiliateKey;
    }
    nextline++;
    nextchar=-1;
    temp="";
    setTimeout("nextstep()",2000)
  }
  else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length)
  {
    document.getElementById("bannerlink").innerHTML=line[nextline]; 
    document.getElementById("bannerlink").href=siteURL+line[nextline]+affiliateKey; 
    nextline=1;
    nextchar=-1;
    temp="";
    setTimeout("nextstep()",2000)
  }
  else
  {
    nextstep()
  }
}

function nextstep()
{
  if (cursor=="\\")
  {
    cursor="|"
  }
  else if (cursor=="|")
  {
    cursor="/"
  }
  else if (cursor=="/")
  {
    cursor="-"
  }
  else if (cursor=="-")
  {
    cursor="\\"
  }

  nextchar++;
  temp+=line[nextline].charAt(nextchar);
  document.getElementById("bannerlink").innerHTML=temp+cursor; 
  setTimeout("animate()",50)
}

//if IE 4+ or NS6
if (document.all||document.getElementById)
  window.onload=animate
