// JavaScript Document


/*
Highligher Scroller script- By JavaScript Kit
For this and over 400+ free scripts, visit http://www.javascriptkit.com/
This notice must stay intact
*/

var tickercontents=new Array()
tickercontents[0]='*Message to all New Year 7 parents........Message to all New Year 7 parents........Message to all New Year 7 parents........Message to all New Year 7 parents*</b>'
tickercontents[1]='Please send in cheques made payable to "Catering Academy" to load your daughters lunch card on Friday 3rd or Monday 6th September 2010.</b>'
tickercontents[2]='More information on the internet payment system plus menus to follow...</b>'

/*
tickercontents[0]='<a href="loreto_payments.php"><b>Loreto online payment scheme has now gone live -- </b>Click here for more information. -- <b>Loreto online payment scheme has now gone live -- </b></a>'
*/
/*
tickercontents[1]='<a href="loreto_admissions.php"><b>-- Click here to view --</b><b>The Admissions Policy for September 2010 Entry, is now available to view online -- <b>Click here to view --</b></a>'
/*

/*
tickercontents[1]='<a href="loreto_reach.php"><b>-- Click here for more information --</b><b>Reach for the skies event, Mon 26th October 2009 from 9.30am -- <b>Click here for more information --</b></a>'
*/
var tickdelay=7000 //delay btw messages
var highlightspeed=20 //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()",20)
}
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
