
	
	/***********************************************
	* Fading Scroller- Â© Dynamic Drive DHTML code library (www.dynamicdrive.com)
	* This notice MUST stay intact for legal use
	* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
	***********************************************/
	
	var delay = 4000; //set delay between message change (in miliseconds)
	var maxsteps=30; // number of steps to take to change from start color to endcolor
	var stepdelay=40; // time in miliseconds of a single step
	
	//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
	
	var startcolor= new Array(197,27,27); // start color (red, green, blue)
	var endcolor=new Array(255,255,255); // end color (red, green, blue)
	
	var fcontent=new Array();
	
	begintag="";
	fcontent[0]="<a href='/newsitem.php?id=155'>&raquo;&nbsp;Mums-to-be evacuated after fire alarm sounds warning</a>";
fcontent[1]="<a href='/newsitem.php?id=128'>&raquo;&nbsp;The Co-operative Group fined &pound;210,000 for fire safety breaches</a>";
fcontent[2]="<a href='/newsitem.php?id=153'>&raquo;&nbsp;Man faces jail over fire safety regulation compliance</a>";
fcontent[3]="<a href='/newsitem.php?id=154'>&raquo;&nbsp;Worker dies during demolition at boarding school</a>";
fcontent[4]="<a href='/newsitem.php?id=152'>&raquo;&nbsp;Company heads prosecuted over hydraulic press injury</a>";
fcontent[5]="<a href='/newsitem.php?id=137'>&raquo;&nbsp;Worker suffers life-changing injuries after roof fall</a>";
fcontent[6]="<a href='/newsitem.php?id=129'>&raquo;&nbsp;Malfax Investments Ltd admit six offences under the Fire Safety Order.</a>";
fcontent[7]="<a href='/newsitem.php?id=139'>&raquo;&nbsp;Worker Loses Fingers In Between Metal Rollers</a>";
fcontent[8]="<a href='/newsitem.php?id=131'>&raquo;&nbsp;Two landlords fined of &pound;4,000 each for fire safety offences.</a>";
fcontent[9]="<a href='/newsitem.php?id=135'>&raquo;&nbsp;Maintenance job leaves man with a broken back.</a>";
fcontent[10]="<a href='/newsitem.php?id=123'>&raquo;&nbsp;Construction company's health and safety fine increased eight-fold</a>";
fcontent[11]="<a href='/newsitem.php?id=157'>&raquo;&nbsp;Disaster prevented by fire safety equipment</a>";
fcontent[12]="<a href='/newsitem.php?id=132'>&raquo;&nbsp;Two Companies and a Director prosecuted for fire safety breaches in HMO.</a>";
fcontent[13]="<a href='/newsitem.php?id=121'>&raquo;&nbsp;East Ayrshire council fined &pound;56,000 following death of worker</a>";
fcontent[14]="<a href='/newsitem.php?id=124'>&raquo;&nbsp;Businesses urged to revisit fire safety obligations following New Look case</a>";
fcontent[15]="<a href='/newsitem.php?id=127'>&raquo;&nbsp;Cleaner's crush death prompts &pound;140,000 fine</a>";
fcontent[16]="<a href='/newsitem.php?id=122'>&raquo;&nbsp;Company and directors fined after member of public's death</a>";
fcontent[17]="<a href='/newsitem.php?id=138'>&raquo;&nbsp;Onion firm fined after serious ladder injury</a>";
fcontent[18]="<a href='/newsitem.php?id=156'>&raquo;&nbsp;Man faces jail over fire safety regulation compliance</a>";
fcontent[19]="<a href='/newsitem.php?id=125'>&raquo;&nbsp;Comet group prosecuted following death of worker in Wrexham</a>";
fcontent[20]="<a href='/newsitem.php?id=133'>&raquo;&nbsp;Architects and construction firm fined after worker falls nine metres to his dea</a>";
fcontent[21]="<a href='/newsitem.php?id=126'>&raquo;&nbsp;Company fined after worker hit by fork-lift truck</a>";
fcontent[22]="<a href='/newsitem.php?id=136'>&raquo;&nbsp;Restaurant owner fined for ten breaches of Fire Safety Order  09 August 2010 </a>";
fcontent[23]="<a href='/newsitem.php?id=119'>&raquo;&nbsp;Bakery directors fined after staff exposed to risk of electrocution and irritant</a>";
fcontent[24]="<a href='/newsitem.php?id=130'>&raquo;&nbsp;Southampton Landlord fined &pound;25,000 for Fire Safety breaches.</a>";
fcontent[25]="<a href='/newsitem.php?id=134'>&raquo;&nbsp;Distribution company's failures led to Cornish vineyard owner's death</a>";

	closetag="";
	
	var fwidth='700px'; //set scroller width
	var fheight='20px'; //set scroller height
	
	var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
	
	///No need to edit below this line/////////////////
	
	
	var ie4=document.all&&!document.getElementById;
	var DOM2=document.getElementById;
	var faderdelay=0;
	var index=0;
	
	function changecontent(){
			if (index>=fcontent.length)
					index=0
			if (DOM2){
					document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
					document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
					if (fadelinks)
							linkcolorchange(1);
					colorfade(1, 15);
			}
			else if (ie4)
					document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
			index++
	}
	
	function linkcolorchange(step){
			var obj=document.getElementById("fscroller").getElementsByTagName("A");
			if (obj.length>0){
					for (i=0;i<obj.length;i++)
							obj[i].style.color=getstepcolor(step);
			}
	}
	
	var fadecounter;
	function colorfade(step) {
			if(step<=maxsteps) {	
					document.getElementById("fscroller").style.color=getstepcolor(step);
					if (fadelinks)
							linkcolorchange(step);
					step++;
					fadecounter=setTimeout("colorfade("+step+")",stepdelay);
			}else{
					clearTimeout(fadecounter);
					document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
					setTimeout("changecontent()", delay);
		
			}   
	}
	
	function getstepcolor(step) {
			var diff
			var newcolor=new Array(3);
			for(var i=0;i<3;i++) {
					diff = (startcolor[i]-endcolor[i]);
					if(diff > 0) {
							newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
					} else {
							newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
					}
			}
			return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
	}
	
	if (ie4||DOM2)
			document.write('<div id="fscroller" class="fltlft" style="width:'+fwidth+';height:'+fheight+'"></div>');
	
	if (window.addEventListener)
	window.addEventListener("load", changecontent, false)
	else if (window.attachEvent)
	window.attachEvent("onload", changecontent)
	else if (document.getElementById)
	window.onload=changecontent
	