function rollNswap() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		var divs = document.getElementsByTagName("div");

		for(var i=0; i < images.length; i++) {
			
			if(images[i].getAttribute("src").match("_off."))	{
				images[i].onmouseover = function() {
					
					if("active" != this.getAttribute("class") && "active" != this.getAttribute("className") ){
					
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
					 
					switch( this.getAttribute("class") || this.getAttribute("className") ) {
						case "button_ll": divs[1].style.zIndex = 9999; break;
						case "button_lr": divs[2].style.zIndex = 9999; break;
						case "button_rl": divs[4].style.zIndex = 9999; break;
						case "button_rr": divs[3].style.zIndex = 9999; break;
					}
					}
				}
			}
				
			images[i].onmouseout = function() {
				if("active" != this.getAttribute("class") && "active" != this.getAttribute("className") ){
				this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
					 
				switch( this.getAttribute("class") || this.getAttribute("className") ) {
					case "button_ll": divs[1].style.zIndex = -9999; break;
					case "button_lr": divs[2].style.zIndex = -9999; break;
					case "button_rl": divs[4].style.zIndex = -9999; break;
					case "button_rr": divs[3].style.zIndex = -9999; break;
				}
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", rollNswap, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", rollNswap);
}