<!-- © 2003-2004 Perry D. Vogel
<!-- Begin hiding script from old browsers.

var hexChars = "0123456789ABCDEF";

function Dec2Hex(Dec) {
	var a = Dec % 16;
	var b = (Dec - a) / 16;
	hex = hexChars.charAt(b) + hexChars.charAt(a);
	return hex;
} // function Dec2Hex(Dec) {

function display_bgColor(begin, end, next1, next2, next3, next4, steps, step) {
	if (step == null) {
		step = steps; 
	} else {
		step = step - 1;
	} // else if (step == null) {

	if (step > 0) {

		redBegin = begin.charAt(0) + begin.charAt(1);
		red_valBegin = parseInt(redBegin,'16');
		redEnd = end.charAt(0) + end.charAt(1);
		red_valEnd = parseInt(redEnd,'16');
		red_int= ((red_valEnd - red_valBegin) / steps) * - 1;

		grnBegin = begin.charAt(2) + begin.charAt(3);
		grn_valBegin = parseInt(grnBegin,'16');
		grnEnd = end.charAt(2) + end.charAt(3);
		grn_valEnd = parseInt(grnEnd,'16');
		grn_int= ((grn_valEnd - grn_valBegin) / steps) * - 1;

		bluBegin = begin.charAt(4) + begin.charAt(5);
		blu_valBegin = parseInt(bluBegin,'16');
		bluEnd = end.charAt(4) + end.charAt(5);
		blu_valEnd = parseInt(bluEnd,'16');
		blu_int= ((blu_valEnd - blu_valBegin) / steps) * - 1;

		red_valColor = red_valBegin - (red_int * (steps - step));
		red_hexbg = Dec2Hex(red_valColor);

		grn_valColor = grn_valBegin - (grn_int * (steps - step));
		grn_hexbg = Dec2Hex(grn_valColor);

		blu_valColor = blu_valBegin - (blu_int * (steps - step));
		blu_hexbg = Dec2Hex(blu_valColor);

		document.bgColor = red_hexbg + grn_hexbg + blu_hexbg;

		display_sbColor(red_hexbg + grn_hexbg + blu_hexbg);

		cmd = 'display_bgColor("' + begin + '", "' + end + '", "' + next1 + '", "' + next2 + '", "' + next3 + '", "' + next4 + '", ' + steps + ', ' + step + ')';
		setTimeout(cmd, 100);

	} else {

		cmd = 'display_bgColor("' + end + '", "' + next1 + '", "' + next2 + '", "' + next3 + '", "' + next4 + '", "' + begin + '", ' + steps + ')';
		setTimeout(cmd);

	} // else if (step > 0) {
} // function display_bgColor(begin, end, next1, next2, next3, next4, steps, step) {

function display_sbColor(color) {

	redColor = color.charAt(0) + color.charAt(1);
	red_valColor = parseInt(redColor,'16');
	redhl = Math.round((255 - red_valColor) / 255 * 120 + red_valColor);
	red_hexhl = Dec2Hex(redhl);
	redt = Math.round((255 - red_valColor) / 255 * 80 + red_valColor);
	red_hext = Dec2Hex(redt);
	red3d = Math.round((255 - red_valColor) / 255 * 40 + red_valColor);
	red_hex3d = Dec2Hex(red3d);
	redac = Math.round(red_valColor / 255 * -120 + red_valColor);
	red_hexac = Dec2Hex(redac);
	redds = Math.round(red_valColor / 255 * -80 + red_valColor);
	red_hexds = Dec2Hex(redds);
	reds = Math.round(red_valColor / 255 * -40 + red_valColor);
	red_hexs = Dec2Hex(reds);

	grnColor = color.charAt(2) + color.charAt(3);
	grn_valColor = parseInt(grnColor,'16');
	grnhl = Math.round((255 - grn_valColor) / 255 * 120 + grn_valColor);
	grn_hexhl = Dec2Hex(grnhl);
	grnt = Math.round((255 - grn_valColor) / 255 * 80 + grn_valColor);
	grn_hext = Dec2Hex(grnt);
	grn3d = Math.round((255 - grn_valColor) / 255 * 40 + grn_valColor);
	grn_hex3d = Dec2Hex(grn3d);
	grnac = Math.round(grn_valColor / 255 * -120 + grn_valColor);
	grn_hexac = Dec2Hex(grnac);
	grnds = Math.round(grn_valColor / 255 * -80 + grn_valColor);
	grn_hexds = Dec2Hex(grnds);
	grns = Math.round(grn_valColor / 255 * -40 + grn_valColor);
	grn_hexs = Dec2Hex(grns);

	bluColor = color.charAt(4) + color.charAt(5);
	blu_valColor = parseInt(bluColor,'16');
	bluhl = Math.round((255 - blu_valColor) / 255 * 120 + blu_valColor);
	blu_hexhl = Dec2Hex(bluhl);
	blut = Math.round((255 - blu_valColor) / 255 * 80 + blu_valColor);
	blu_hext = Dec2Hex(blut);
	blu3d = Math.round((255 - blu_valColor) / 255 * 40 + blu_valColor);
	blu_hex3d = Dec2Hex(blu3d);
	bluac = Math.round(blu_valColor / 255 * -120 + blu_valColor);
	blu_hexac = Dec2Hex(bluac);
	bluds = Math.round(blu_valColor / 255 * -80 + blu_valColor);
	blu_hexds = Dec2Hex(bluds);
	blus = Math.round(blu_valColor / 255 * -40 + blu_valColor);
	blu_hexs = Dec2Hex(blus);

	with(document.body.style) {
		scrollbarBaseColor = redColor + grnColor + bluColor;
		scrollbarFaceColor = redColor + grnColor + bluColor;
		scrollbarHighlightColor = red_hexhl + grn_hexhl + blu_hexhl;
		scrollbarShadowColor = red_hexs + grn_hexs + blu_hexs;
		scrollbar3dLightColor = red_hex3d + grn_hex3d + blu_hex3d;
		scrollbarArrowColor = red_hexac + grn_hexac + blu_hexac;
		scrollbarDarkShadowColor = red_hexds + grn_hexds + blu_hexds;
		scrollbarTrackColor = red_hext + grn_hext + blu_hext;
	} // with(document.body.style) {

} // function display_sbColor(color) {

// Stop hiding script from old browsers. -->
