var content
var marginright=0
var aux_fadestrength=5
var aux_texto=0
var aux_textocolor=0
var aux_menfondo=0 //mensaje de fondo
var bodywidth=0
var textboxwidth=0
var letra_max=250
var paso=1
var timer
var fontsizefactor=letra_max/100
mensaje=mensaje.split(" ")


function tam_mensaje() 
{
  if (aux_fadestrength<150) 
  {
     textbox.filters.alpha.opacity=Math.floor(100-aux_fadestrength)
     document.all.textbox.style.fontSize=aux_fadestrength*fontsizefactor
     document.all.textbox.style.posLeft=x-
     (Math.floor(aux_fadestrength/1.1*fontsizefactor))
     document.all.textbox.style.posTop=y
     document.all.textbox.style.width=bodywidth-
     document.all.textbox.style.posLeft-5
     document.all.textbox.style.overflowX="hidden"
     document.all.textbox.style.visibility="visible"
     paso+=1.5
     aux_fadestrength+=paso
     timer=setTimeout("tam_mensaje()",20)
  }
  else 
  {
    clearTimeout(timer)
    aux_fadestrength=0;
    paso=1;
    texto()
  }
}
if (document.all) 
{
  document.write("<DIV id='textbox' style='position:absolute;font-family:Verdana;filter:alpha(opacity=0);'></DIV>")
  document.write("<DIV style='position:relative;'>")
}
if (document.all) 
{
  bodywidth=document.body.clientWidth-5
  texto()
}
function texto() 
{
  if (aux_texto>=mensaje.length) 
    aux_texto=0
  if (aux_textocolor>=messagecolor.length) 
    aux_textocolor=0
  if (aux_menfondo>=messagefont.length) 
    aux_menfondo=0
  content="<nobr><font color="+messagecolor[aux_textocolor]+
  " face="+messagefont[aux_menfondo]+">"+mensaje[aux_texto]+
  "</font><nobr>"
  textbox.innerHTML=content
  aux_texto++
  aux_textocolor++
  aux_menfondo++
  timer=setTimeout("tam_mensaje()",500)
}
