var tickercontents=new Array()
tickercontents[0]='08/01/09 - <a href="whats_new.php">Managing Green Buildings Expo in Sept.</a>'
tickercontents[1]='07/15/09 - <a href="whats_new.php">Modern now offers online safety training to all employees</a>'
tickercontents[2]='01/01/08 - <a href="whats_new001.php">MFS Partners with Bronx-Lebanon Hospital Center</a>'
tickercontents[3]='01/01/08 - <a href="whats_new.php">MFS Contract Awards</a>'
//news #2
tickercontents[4]='01/01/08 - <a href="whats_new.php">MFS offers new service</a>'
tickercontents[5]='07/15/09 - <a href="whats_new002.php">MFS Dedicated to the Community in Every Way</a>'

var tickdelay=4000 //delay btw messages
var highlightspeed=1000 //10 pixels at a time.

////Do not edit pass this line////////////////

var currentmessage=0
var clipwidth=0

function changetickercontent(){
crosstick.style.clip="rect(0px 0px auto 0px)"
crosstick.innerHTML=tickercontents[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()",1)
}
else{
clipwidth=0
clearTimeout(beginclip)
if (currentmessage==tickercontents.length-1) currentmessage=0
else currentmessage++
setTimeout("changetickercontent()",tickdelay)
}
}

function start_ticking(){
crosstick=document.getElementById? document.getElementById("highlighter") : document.all.highlighter
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
changetickercontent()
}

if (document.all || document.getElementById)
window.onload=start_ticking
