var lastDiv;

function ChangeBG(id)
{
	
	//if the last div has been assigned, revert its colours back to normal
	if(lastDiv) { 
		lastDiv.style.backgroundColor = "";
		lastDiv.style.color = "";
	
	}
	
	//sorts out the most recently clicked div...
	var newDiv;
	
	//find the div on the page from the id value sent via the users click
	if (document.getElementById) {
	newDiv = document.getElementById(id);
	} else if (document.all) {
	newDiv = document.all(id);
	}
	//restyle the div that it has found...
	newDiv.style.backgroundColor = "#b4aaa4";
	newDiv.style.color = "#ffffff";

	
	
	
	//turn this into the old dive for when the next one gets clicked..
	lastDiv = newDiv;
}
