function bgcolor(id,color){
if(color != ""){
$(id).style.backgroundColor=color;
}
}
function bgchanger(id,r,g,b){
var hex=$(id).style.backgroundColor.replace('rgb(','').replace(')','').split(',');
var startr=hex[0];
var startg=hex[1];
var startb=hex[2];
var i=1;
while(i<=255){
if(startr != r){ if(startr < r){ startr++; }else{ startr=startr-1; } }
if(startg != g){ if(startg < g){ startg++; }else{ startg=startg-1; } }
if(startb != b){ if(startb < b){ startb++; }else{ startb=startb-1; } }
setTimeout("bgcolor('"+id+"','rgb("+startr+","+startg+","+startb+")')",i*50);
// $('debugger').innerHTML=$('debugger').innerHTML;
// $('debugger').innerHTML+=''+i+'. ['+startr+'] ['+startg+'] ['+startb+']';
// $('debugger').innerHTML+="<br />";
i=i+1;
}
}DONE, just need to shrink it a little a lot of the code is pointless now.
the $ is just a short function for document.getelementbyid

I'm lazy.
I saw it on someone elses script and though its a good idea.
Loving Javascript
