/*
Fading Scroller- By DynamicDrive.com
For full source code, and usage terms, visit http://www.dynamicdrive.com
This notice MUST stay intact for use
*/

var delay=3000 //set delay between message change (in miliseconds)
var fcontent=new Array()

// MESSAGES section
begintag='<font family="Verdana, Arial, Helvetica, sans-serif" size=1 color="#000000">' //set opening tag, such as font declarations

//======================================================================
// MESSAGES CONTENT
//   fcontent[0]="<b>What\'s new?</b><br>New scripts added to the Scroller category!<br><br>The MoreZone has been updated. <a href='../morezone/index.htm'>Click here to visit</a>"
   fcontent[0]="Welcome to the <b>Clonliffe Harriers Athletic Club</b> Website..."
   fcontent[1]="<b>Meet &amp; Train Times</b> <br>Tuesday &nbsp;19:00 - 20:30 <br>Thursday 19:00 - 20:30<br>Saturday 11:00 - 12:30<br>Sunday &nbsp;&nbsp;11:00 - 12:30"
   fcontent[2]="See <b>NEWS</b> (below) for information on recent events....<BR><BR><a href='/WebCalendar/month.php' target='ch_main'>... and the <b>FIXTURES LIST</b> for future ones....<b>&lt;CLICK HERE&gt;</b>.</a>"
   fcontent[3]="<b>Club Address:</b> <br>Clonliffe Harriers AC<br>Morton Stadium <br>Santry <br>Dublin 9 <br>Ireland <br><br> <b> Telephone</b><br> +353(1) 837 0278<br>"
//   fcontent[4]="<a href='http://www.clonliffeharriers.com/phpBB2/index.php' target='_new'>Have a look at our new Discussion Forum page - have you any news to add or points to discuss? <b>-CLICK HERE-</b>.</a>"

//   Good to see so many of our athletes performing so well in tullamore over the weekend in particular Nicola,John, who both did the double.  Keep up the good workfcontent[4]="Congratulations to <b> Colm Rooney</b> on selection also to Ireland U23 1500m team in Europeans, on 17-20th July in <a href='http://www.bydgoszcz.pl/ENGLISH/' target='_new'><b>Bydgoszcz, Poland -CLICK HERE-</b>.</a>"
//======================================================================
closetag='</font>'
//END MESSAGES


var fwidth='146px' //set scroller width
var fheight='120px' //set scroller height

var fadescheme=0 //set 0 to fade text color from (white to black), 1 for (black to white)
var fadelinks=0  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////

var hex=(fadescheme==0)? 255 : 0
var startcolor=(fadescheme==0)? "rgb(255,255,255)" : "rgb(0,0,0)"
var endcolor=(fadescheme==0)? "rgb(0,0,0)" : "rgb(255,255,255)"

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0

if (DOM2)
faderdelay=2000

//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color=startcolor
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
linksobj=document.getElementById("fscroller").getElementsByTagName("A")
if (fadelinks)
linkcolorchange(linksobj)
colorfade()
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
else if (ns4){
document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)
document.fscrollerns.document.fscrollerns_sub.document.close()
}

index++
setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

frame=20;

function linkcolorchange(obj){
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color="rgb("+hex+","+hex+","+hex+")"
}
}

function colorfade() {	         	
// 20 frames fading process
if(frame>0) {	
hex=(fadescheme==0)? hex-12 : hex+12 // increase or decrease color value depd on fadescheme
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
if (fadelinks)
linkcolorchange(linksobj)
frame--;
setTimeout("colorfade()",20);	
}

else{
document.getElementById("fscroller").style.color=endcolor;
frame=20;
hex=(fadescheme==0)? 255 : 0
}   
}

if (ie4||DOM2)
document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+';padding:0px"></div>')

//window.onload=changecontent
//Above commented out as not needed if using e.g. the below in the HTML file calling the script
// <body onload="javascript:{if(parent.frames[0]&&parent.frames['ch_menu'].Go)parent.frames['ch_menu'].Go();fillup();changecontent()}" body text=#000000 bgolor="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

