You can sets the body's background colour using document.body.style.backgroundColor = "red";
so this can be put into a function that's called when the user clicks.
The next part can be done by using document.getElementByID("divID").style.backgroundColor = "red";
window.setTimeout("yourFunction()",10000);
which calls yourFunction in 10 seconds to change the colour back.