// toHex converts from decimal to Hex
// Analysis

function toHex(number) 
{

var temp=0;
var hexNumber = "";

var hexString = "0123456789ABCDEF";

hexNumber += hexString.charAt(Math.floor(number/16));
hexNumber += hexString.charAt(Math.floor(number%16));

return hexNumber;
}

This is the toHex function that was discussed earlier, so it doesn't need any further explanation. It is called by the bgFade function, so it has to be included here for this example to work.

Close Window