function elementByID(elementID) {
	if (document.getElementById) {
		return document.getElementById(elementID);
	} else if (document.all) {
		return document.all[elementID];
	} else {
		return eval("document." + elementID);
	}
}

function changeFooterColour(colour) {
	elementByID('body').style.backgroundColor = 'rgb('+colour+')';
	var numbers = colour.split(',');
	total = 0;
	for (i=0; i<=2; i++) {
		total += parseInt(numbers[i]);
	}
	if (total < 380 || total == 765) {
		elementByID('footer').className = 'light';
	} else {
		elementByID('footer').className = 'dark';
	}
}