<!-- This script is featured at JavaScript Planet at
http://www.js-planet.com Check out JavaScript Planet for more scripts, links, etc. Please leave this comment intact. --> <script> //* Script writen by Patrick Clinger and is © Patrick Clinger. If you wish to use this script you just need to e-mail me at javascripts@usa.net. A link to my homepage of JavaScripts is apriciated. http://www.oocities.org/SiliconValley/Bay/5302/ *\\ function initArray() { this.length = initArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = initArray.arguments[i] } var hexChars = "0123456789ABCDEF"; function Dec2Hex (Dec)
function changethebg1 (begin, end, steps)
redA = begin.charAt(0) + begin.charAt(1);
redB = end.charAt(0) + end.charAt(1);
red_int = ((red_valB - red_valA) / steps) * -1;
grnB = end.charAt(2) + end.charAt(3);
grn_int = ((grn_valB - grn_valA) / steps) * -1;
bluB = end.charAt(4) + end.charAt(5);
blu_int = ((blu_valB - blu_valA) / steps) * -1; step = 2;
red = red_valA;
grn = grn_valA;
blu = blu_valA;
document.bgColor = begin;
while ( steps >= step )
grn -= grn_int;
blu -= blu_int;
document.bgColor = red_hex + grn_hex + blu_hex; step++;
</script>
|