Codice:
<script type="text/javascript">
/***********************************************
* 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 = 2000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=290; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(201,119,33); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)
var fcontent=new Array();
begintag='<div style="font: normal 11px Verdana; padding: 5px;">'; //set opening tag, such as font declarations
fcontent[0]="You called me strong, you called me weak, but still your secrets I will keep - Kryptonite";
fcontent[1]="I watched the world float to the dark side of the moon - Kryptonite";
fcontent[2]="Addiction needs a pacifier, the buzz of this poison is taking me higher - Loser";
fcontent[3]="Someday I will find, a love that flows through me like this - Loser";
fcontent[4]="So you call this your free country, tell me why it costs so much to live - Duck And Run";
fcontent[5]="Walk a mile just to move an inch now even though I'm trying so damn hard - Duck And Run";
fcontent[6]="Shackled down, kicked around, now slave to the grind - Not Enough";
fcontent[7]="Same old song world moves on while I'm still in bed - Not Enough";
fcontent[8]="He spends his nights in California, watching the stars on the big screen - Be Like That";
fcontent[9]="All she wants is just that something to hold onto, that's all she needs - Be Like That";
fcontent[10]="Looking forward, not behind, everybody's got to cross that line - Life Of My Own";
fcontent[11]="Living risky, never scared, wander closer to the edge - Life Of My Own";
fcontent[12]="I'm about to see just how far I can fly, surely your gonna break my fall - Better Life";
fcontent[13]="I'm about to be on the floor again, surely you're gonna find me here - Better Life";
fcontent[14]="Welcome to my world she said, do you feel alive she said - Down Poison";
fcontent[15]="You weren't there for me, I was there for you - Down Poison";
fcontent[16]="A petty maze of emptiness, I've said the hell with all the rest - By My Side";
fcontent[17]="Sober mind time now is gone, they carved my body not of stone - By My Side";
fcontent[18]="Throw my life away, and I'll be worthless just like you - Smack";
fcontent[19]="Perfect little life you wasted, overdosed and that death you tasted - Smack";
fcontent[20]="If you step into my head, tell me would you still know me - So I Need You";
fcontent[21]="If you woke up in my bed, tell me then would you hold me - So I Need You";
fcontent[22]="Now roaming through this darkness I'm alive but I'm alone - When I'm Gone";
fcontent[23]="There's another world inside of me that you may never see - When I'm Gone";
fcontent[24]="And now again I've found myself so far down - Away From The Sun";
fcontent[25]="I miss the life, I miss the colors of the world - Away From The Sun";
fcontent[26]="I know you feel helpless now and I know you feel alone - The Road I'm On";
fcontent[27]="What you thought was real life somehow steered you wrong - The Road I'm On";
fcontent[28]="When everything is said and done I won't have one thing left - Ticket To Heaven";
fcontent[29]="To want is to buy but to live is to die and you can't take it all - Ticket to Heaven";
fcontent[30]="All these little things in life, they all create this haze - Running Out Of Days";
fcontent[31]="I feel this current it's so strong, it gets me futher down the line - Running Out Of Days";
fcontent[32]="I think about you baby and I dream about you all the time - Here Without You";
fcontent[33]="I've heard this life is overrated, but I hope it this gets better as we go - Here Without You";
fcontent[34]="Another endless day another seven hundred miles - I Feel You";
fcontent[35]="They gave me a life that's not so easy to live - I Feel You";
fcontent[36]="The sound of bullets flyin' through the air, is followed by a cry - Dangerous Game";
fcontent[37]="We've thrown all our hopes away and set our dreams aside - Dangerous Game";
fcontent[38]="There's no one here to talk to and the pain is making me numb - Changes";
fcontent[39]="I'm not suppose to be scared of anything, but I don't know where I am - Changes";
fcontent[40]="Don't tell me how life is, 'cause I don't really wanna know - Going Down In Flames";
fcontent[41]="Don't tell me what to believe, 'cause you won't be there - Going Down In Flames";
fcontent[42]="She stood at the foot of the guilty bed last night - Sarah Yellin'";
fcontent[43]="Now it's over, the old man is dead, lyin' on the ground - Sarah Yellin'";
fcontent[44]="I know I get a little bit crazy but I've never done you no wrong - Right Where I Belong";
fcontent[45]="It feels like I'm lying next to a ghost at night I don't know why - Right Where I Belong";
fcontent[46]="Nevermind the face that you put on it front of me - It's Not Me";
fcontent[47]="This life you gave away was meant for me - I'ts Not Me";
fcontent[48]="One more kiss could be the best thing, one more lie could be the worst - Let Me Go";
fcontent[49]="In this world there's real and make believe and this seems real to me - Let Me Go";
fcontent[50]="The shades go up mother's staring down - Be Somebody";
fcontent[51]="Mom, I'm trying and I'm living my life the best way I can - Be Somebody";
fcontent[52]="All these days I spend away I'll make up for this a swear - Landing In London";
fcontent[53]="I need your love to hold me up when it's all to much to bear - Landing In London";
fcontent[54]="I won't stop now until I find a better part of me - The Real Life";
fcontent[55]="I wanted somwhere to hide when I opened up and let those fears inside - The Real Life";
fcontent[56]="I've seen this face once before and I don't think I can do this again - Behind Those Eyes";
fcontent[57]="You said I got something to say, then you got that look in you eye - Behind Those Eyes";
fcontent[58]="The road I walk is paved with broken promises I made - Never Will I Break";
fcontent[59]="If you hear me screaming please don't let me fall again - Never Will I Break";
fcontent[60]="In the glare of a neon sign she laid here body down - Father's Son";
fcontent[61]="Maybe I'm just crazy or the devil got inside";
fcontent[62]="I've bundled up all of these fears inside and I've bottled up all of this pain - Father's Son";
fcontent[63]="God only knows all the places I've been but I love this lfe that I live'n in - Live For Today";
fcontent[64]="We'll never know it when run out of time until it's all over - Live For Today";
fcontent[65]="You're trapped inside this worl you made yourself - My World";
fcontent[66]="You're stuck on a chain and you're towing down the line - My World";
fcontent[67]="I'm sorry I can't always find the words to say - Here By Me";
fcontent[68]="As the days roll on I see time is standing still for me when you're not here - Here By Me";
closetag='</div>';
var fwidth='150px'; //set scroller width
var fheight='150px'; //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;
/*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<obj.length;i++)
obj[i].style.color=getstepcolor(step);
}
}
/*Rafael Raposo edited function*/
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);
}
}
/*Rafael Raposo's new function*/
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" style="border:0px solid black;position:absolute;width:550;height:477;left:210;top:403;"></div>');
if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
</script>