/*
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]='Latest News: New bike school opened in Shrewsbury - click the about link above for more info!'
tickercontents[1]='Call BikeWise FREE on 0800 996 1200 with any queries.'
tickercontents[2]='Or email us at <a href="mailto:enquiries@bikewise.net" class="scrollerlinks">enquiries@bikewise.net</a>'
tickercontents[3]='Bike Wise - professional motorcyle training company based in the Central Region of the UK.'
tickercontents[4]='Contact Us now - click the contact link above to email us your requirements.!'
tickercontents[5]='Professional, yet friendly, comfortable environment!'
tickercontents[6]='True value for money, all tuition can be booked and secured well in advance with just a small deposit.'
tickercontents[7]='Get Trained, Be Safe, Have Fun. Looking forward to seeing you!'
tickercontents[8]='<a href="gallery.php" class="scrollerlinks">Click here</a> to see the Bike Wise Photo Gallery!'


var tickdelay=3500 //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