/*********************************************** * 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 = 5000; //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(255,255,255); // start color (red, green, blue) var endcolor=new Array(0,0,0); // end color (red, green, blue) var endcolorlink=new Array(35,98,191); // end color (red, green, blue) var fcontent=new Array(); begintag='
'; //set opening tag, such as font declarations fcontent[0]="CD & MP3 Stereos! NEW 2006/07 models NOW available for Immediate Despatch with FREE Next Day Delivery! Read More"; fcontent[1]="Take the 'RISK' out of Parking with the 'Easy-Fit' Taraus T123 Parking Sensor! No UGLY Ultra Sonic Sensors & Drilling Required! Learn More"; fcontent[2]="PROTECT Your License with the NEW Inforad GPS Speed Safety Detector, and for under £90! V3 now available with customisable click-on skins in 6 cool colours. Read More"; fcontent[3]="Radio Removal Tools! Safely Release your Car Radio in seconds, all makes & models available. Learn More"; fcontent[4]="INSTALL your Car Stereo with Ease! 100% Plug 'n' Play Installation Accessories from Autoleads & Connects2. Picture Lego blocks snapping together, Its that Easy! Read More"; fcontent[5]="Mount your iPod, Mobile Phone Car Kit or PDA in seconds with a Dashmount Bracket! Robust, Stylish & Discreet. Learn More"; fcontent[6]="iPod In-Car Devices! Connect, Control and Charge your iPod from your car radio. All makes & models available - Alfa to VW & Alpine to Sony. Read More"; fcontent[7]="Ford CD Changer Pack Special Deal! Fits 4050, 5000, 6000, 7000, VNR 9000 Ford radios Learn More"; fcontent[8]="Play your Sony NW-HD1 & HD5 In-Car! Connect & Control from your Sony or Factory Fitted car radio. Sony & Alfa to VW. Read More"; fcontent[9]="ADD A CD or MP3 Changer to your Factory installed car radio. All models from Alfa to VW. SAVE up to 57% off Dealer Prices! Learn More"; closetag='
'; var fwidth='460px'; //set scroller width var fheight='60px'; //set scroller height var fadelinks=1; //should links inside scroller content also fade like text? 0 for no, 1 for yes. ///http://no need to edit below this line///////////////// var ie4=document.all&&!document.getElementById; var DOM2=document.getElementById; var faderdelay=0; var index=0; /*Rafael Raposo edited function*/ //function to change content 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++ } // colorfade() partially by Marcio Galli for Netscape Communications. //////////// // Modified by Dynamicdrive.com function linkcolorchange(step){ var obj=document.getElementById("fscroller").getElementsByTagName("A"); if (obj.length>0){ for (i=0;i 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] + ")"); } /*Rafael Raposo's new function*/ function getstepcolorlink(step) { var diff var newcolor=new Array(3); for(var i=0;i<3;i++) { diff = (startcolor[i]-endcolorlink[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('
'); if (window.addEventListener) window.addEventListener("load", changecontent, false) else if (window.attachEvent) window.attachEvent("onload", changecontent) else if (document.getElementById) window.onload=changecontent