/*
* Notes on hue
*
* This script uses hue rotation in the following manner:
* hue=0 is red (#FF0000)
* hue=60 is yellow (#FFFF00)
* hue=120 is green (#00FF00)
* hue=180 is cyan (#00FFFF)
* hue=240 is blue (#0000FF)
* hue=300 is magenta (#FF00FF)
* hue=360 is hue=0 (#FF0000)
*
* Notes on the script
*
* This script should function in any browser that supports document.getElementById
* It has been tested in Netscape7, Mozilla Firefox 1.0, and Internet Explorer 6
*
* Accessibility
*
* The script does not write the string out, but rather takes it from an existing
* HTML element. Therefore, users with javascript disabled will not be adverely affected.
* They just won't get the pretty colors.
*/
/*
* splits par.firstChild.data into 1 span for each letter
* ARGUMENTS
* span - HTML element containing a text node as the only element
*/
function toSpans(span) {
var str=span.firstChild.data;
var a=str.length;
span.removeChild(span.firstChild);
for(var i=0; i359) this.hue-=360;
var color;
var b=this.brt;
var a=this.length;
var h=this.hue;
for(var i=0; i359) h-=360;
if(h<60) { color=Math.floor(((h)/60)*b); red=b;grn=color;blu=0; }
else if(h<120) { color=Math.floor(((h-60)/60)*b); red=b-color;grn=b;blu=0; }
else if(h<180) { color=Math.floor(((h-120)/60)*b); red=0;grn=b;blu=color; }
else if(h<240) { color=Math.floor(((h-180)/60)*b); red=0;grn=b-color;blu=b; }
else if(h<300) { color=Math.floor(((h-240)/60)*b); red=color;grn=0;blu=b; }
else { color=Math.floor(((h-300)/60)*b); red=b;grn=0;blu=b-color; }
h+=this.hInc;
this.span.childNodes[i].style.color="rgb("+red+", "+grn+", "+blu+")";
}
this.hue+=this.hspd;
}
//-->
date=new Date(); if((date.getUTCHours() - date.getHours()) != 0)(date= date.getHours())
else(date=(7+date.getHours()));
if(date<4) document.write('Baru bangun apa ga tidur ne? xixixi');
else{if(date<9) document.write('Selamat pagi Sob, selamat beraktivitas!');
else{if(date<10) document.write('Selamat pagi menjelang siang.. Met melanjutkan aktivitas.');
else{if(date<14) document.write('Selamat siang, lg istirahat ato bolos kerja Sob?');
else{if(date<15) document.write('Selamat siang menjelang sore..');
else{if(date<17) document.write('Selamat sore, Mandi dulu sob..');
else{if(date<19) document.write('Selamat petang menjelang malam, met nyantai aja prends..');
else{if(date<22) document.write('Selamat malam Sob, jangan lupa rest iah.');
else document.write('GudNait Sob.. met istirahat!'); }}}}}}} // -->
var r504=document.getElementById("r504"); //get span to apply rainbow
var myRainbowSpan=new RainbowSpan(r504, 0, 360, 255, 50, 18);
myRainbowSpan.timer=window.setInterval("myRainbowSpan.moveRainbow()", myRainbowSpan.speed);