<script type="text/javascript">
<!--
/* Background fade */
function BgFade(red1, grn1, blu1, red2, grn2, blu2, steps)
{
sred = red1; sgrn = grn1; sblu = blu1;
ered = red2; egrn = grn2; eblu = blu2;
inc = steps;
step = 0;
RunFader();
}
function ToHex(d)
{
return (d-0).toString(16);
}
function RunFader()
var epct = step/inc;
var spct = 1 - epct;
var clrRed = Math.floor(sred * spct + ered * epct);
var clrGreen = Math.floor(sgrn * spct + egrn * epct);
var clrBlue = Math.floor(sblu * spct + eblu * epct);
document.body.style.background = "#"+ ToHex(clrRed) + ToHex(clrGreen) + ToHex(clrBlue);
if ( step < inc )
{
setTimeout('RunFader()',50);
}
step++;
}
BgFade(0x00,0x00,0x00, 0xFF,0xFF,0xFF,10);
//-->
</script>
with my best :: mohamed basha
0 comment:
إرسال تعليق