 function hoverstates() {
	var yadda = document.getElementsByTagName('div'); 
	for (var i=0;i<yadda.length;i++) { 
		
		yadda[i].setAttribute("oldclass", yadda[i].className); 
		
		if (yadda[i].getAttribute("oldclass") == '') {
		
		yadda[i].onmouseover = function() { this.className = "on " + this.getAttribute("oldclass"); }; 
		yadda[i].onmouseout = function() { this.className = this.getAttribute("oldclass"); }; 
		
		}
	} 
}

function changewidth(){

	x=window.innerWidth;
	
	e=document.getElementById("footer");
	
	if (x>1120) {
		e.style.width = '1120px';
	} else if (x<900) {
		e.style.width = '900px';
	} else {
		e.style.width = '900px';
	}
	t=setTimeout("changewidth();",0);

}

function showElement(id) {
	document.getElementById(id).style.display='block';
}
function hideElement(id) {
	document.getElementById(id).style.display='none';
}

function boxOn(box) {
	document.getElementById(box).style.display='block';
	document.getElementById('fade').style.display='block';
}
function boxOff(box) {
	document.getElementById(box).style.display='none';
	document.getElementById('fade').style.display='none';
}