// JavaScript Document
/*
Highlighter 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]='WANTED and probably dangerous! New police alert - see <a href="security.shtm">our crime and security page</a>'
tickercontents[1]='!SHOCK NEWS! Most village residents are happy with no or slow broadband!'
tickercontents[2]='PLEASE spread the word and visit <font size="5"><a href="bb.shtm">High speed broadband?</font></a>'
tickercontents[3]='Help for small business in the area - <a href="adverts.shtm">\'Classifieds\' page</a> and more information <a href="index.shtm#hbb">here</a>'
tickercontents[4]='Two people looking for property in the village to buy and to rent - see <a href="http://www.westchiltington.com/phpBB3/viewforum.php?f=6">the forum</a>'
tickercontents[5]='Village Hall Roof Repairs delayed <a href="village_hall.shtm">more here</a>'
tickercontents[6]='WSCC have announced a review of waste management - more details <a href="planning.shtm#lay">here</a> as we get it'
tickercontents[7]='Horsham Food and Drink Festival starts 4th September <a href="http://www.horsham.gov.uk/business/1315.aspx">Food and Drink festival</a>'
tickercontents[8]='Next Farmers Market, Saturday 11th September - don\'t miss it! Visit the <a href="fm.shtm">Farmers Market Page</a> for details'
tickercontents[9]='Superb membership deal at the Leisure Centre - see <a href="cslc.shtm">Chanctonbury Sports and Leisure</a> for more details'
tickercontents[10]='\'Take Steps\' and \'Spruce up\' your village - see <a href="news.shtm#pc"> News Page</a> for more information'
tickercontents[11]='Countryman Inn, Shipley - latest offer - \'Privilege Club\' for discounted eating and drinking. See <a href="countryManInn.shtm#club"> the website</a> for more'
tickercontents[12]='The Old Tollgate Hotel has great offers for dining in their carvery - see <a href="ot.shtm">their page</a>'
tickercontents[13]='Hennings Wine Merchants - free Chablis offer - see the <a href="hennings.shtm">Hennings Page</a>'
tickercontents[14]='Coming Soon -'
tickercontents[15]='Mary How Film night - Tuesday 28th September - see <a href="news.shtm#maryhow">News Page</a> for details'
/*tickercontents[3]='Next Farmers Market, Saturday 14th August - don\'t miss it - new meat supplier! Visit the <a href="fm.shtm">Farmers Market Page</a> for details'
tickercontents[12]='Please come to the Chestnut Tree Appeal BBQ evening, 17th July - more information <a href="news.shtm#chest">here</a>'
tickercontents[9]='Return of Footlights - Saturday 20th March - see the <a href="news.shtm#foot">News Page</a> for more information'
tickercontents[2]='Murdery Mystery Evening - Saturday 8th May - see the <a href="news.shtm#mme">News Page</a> for more information'
tickercontents[14]='HDC \'Walks\' programme - annual BBQ with live music - see <a href="health_and_welfare.shtm#walks">the health page</a>' 
tickercontents[3]='Book Now! Dramatic Society next production 20/21/22 May - check the <a href="dramatic_society.shtm">society page</a> for details'
tickercontents[8]='Village Hall bookings for August now available - details on <a href="village_hall.shtm">the Hall page</a>'
*/

var tickdelay=3000 //delay btw messages
var highlightspeed=10 //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
