Two Hoots Banner



Javascript to Change Background Colour
The script to change the page background colour is shown below. (This script does not work in Opera)

// Function - changebackground()
// Description - Changes the Background Colour of the current document

function changebackground(){
// initialise the colours() Array
colours=new Array();
// Set values to a range of colours
colours[0]="aqua";
colours[1]="gray";
colours[2]="navy";
colours[3]="silver";
colours[4]="black";
colours[5]="green";
colours[6]="olive";
colours[7]="teal";
colours[8]="blue";
colours[9]="lime";
colours[10]="purple";
colours[11]="fuchsia";
colours[12]="maroon";
colours[13]="red";
colours[14]"yellow";
// Set last colour to white
colours[15]="white";

// Loop round all the items in the Colours Array
for (count=0;count<colours.length;count++){
// Set the background colour of the document
	document.bgColor=colours[count];
	// cause a delay before setting the next colour
	delay();
	}
}

// Function - Delay()
// Description - Cause a brief delay, called from the FadeIn function 

function delay(){
// initialise counter, count to 500 and return
for (count2=0;count2<=5000;count2++)
// do nothing in loop
{}
return;
}
change background colour