
var bannercontent=new Array()
bannercontent[0]= 'At Mason, we practice <b>Responsibility</b>'
bannercontent[1]= 'At Mason, we practice <b>Self-Control</b>'
bannercontent[2]= 'At Mason, we practice <b>Gratitude</b>'
bannercontent[3]= 'At Mason, we practice <b>Respect</b>'
bannercontent[4]= 'At Mason, we practice <b>Forgiveness</b>'
bannercontent[5]= 'At Mason, we practice <b>Compassion</b>'
bannercontent[6]= 'At Mason, we practice <b>Honesty</b>'
bannercontent[7]= 'At Mason, we practice <b>Cooperation</b>'
bannercontent[8]= 'At Mason, we practice <b>Perservance</b>'
bannercontent[9]= 'At Mason, we practice <b>Good Character and Self Discipline</b>'
bannercontent[10]='<b>Mason Lions Have Pride</b>'

var tickdelay=5000 //delay between messages
var highlightspeed=2 // pixels at a time.

var currentmessage=0
var clipwidth=0

function changebannercontent(){
  crosstick.style.clip="rect(0px 0px auto 0px)"
  crosstick.innerHTML=bannercontent[currentmessage]
  highlightmsg()
}

function highlightmsg(){
  var msgwidth=crosstick.offsetWidth
  if (clipwidth<msgwidth){
    clipwidth+=highlightspeed
    crosstick.style.clip="rect(0px "+clipwidth+"px auto 0px)"
    beginclip=setTimeout("highlightmsg()",20)
  }else{
    clipwidth=0
    clearTimeout(beginclip)
    if (currentmessage==bannercontent.length-1) currentmessage=0
    else currentmessage++
    setTimeout("changebannercontent()",tickdelay)
  }
}

function start_banner(){
  crosstick=document.getElementById? document.getElementById("chactertrait") : document.all.chactertrait
  crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement
  if (parseInt(crosstick.offsetHeight)>0)
    crosstickParent.style.height=crosstick.offsetHeight+'px'
  else
    setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake
  changebannercontent()
}

if (document.all || document.getElementById)
window.onload=start_banner


