Kod php:
<script type="text/javascript">
// <![CDATA[
var speed=100; // speed colours change, 1 second = 1000
var raincol=new Array("#ff0000", "#ff9900", "#ffff00", "#99ff00", "#00ff00", "#00ff99", "#00ffff", "#0099ff", "#0000ff", "#9900ff", "#ff00ff", "#ff0099"); var alink="";
var rainbow, raintxt, raincnt=0;
window.onload=function() { if (document.getElementById) {
var i, raini;
rainbow=document.getElementById("rainbow");
raintxt=rainbow.firstChild.nodeValue;
while (rainbow.childNodes.length) rainbow.removeChild(rainbow.childNodes[0]);
for (i=0; i<raintxt.length; i++) {
raini=document.createElement("span");
raini.setAttribute("id", "rain"+i);
raini.appendChild(document.createTextNode(raintxt.charAt(i)));
if (alink) {
raini.style.cursor="pointer";
raini.onclick=function() { top.location.href=alink; }
}
rainbow.appendChild(raini);
}
rainbow=setInterval ("raining()", speed);
}}
function raining() {
for (var i=0; i<raintxt.length; i++) document.getElementById("rain"+i).style.color=raincol[(i+raincnt)%raincol.length];
raincnt++;
}
// ]]>
</script>