The next step in the process is to begin assembling the pieces and making sure that they work together properly. However, in the interest of space, I've compiled them all at once. The code is now ready to be tested.

The fade function converts from the current bgColor to a new colour. The applications for this function are varied, and the test script is only one. In fact, the current implementation is probably the worst possible one; a more suitable use would be to fade to new colours between Web pages. This would be especially effective in a frames-based interface (which we'll do in next month's examples), where the current bgColor could be stored in a variable that persists across Web pages.

See the example or view the source.