	function lightsOn() {
		document.getElementById('house').style.background='transparent url(images/house_h_hover.jpg) no-repeat';
		document.getElementById('wires').style.background='transparent url(images/wires_hover.jpg) repeat-x';
	}

	function replaceAll() {
		var aimages=document.getElementsByTagName("img");
		var z=0;
		for (z=0; z<=(aimages.length-1); z++) {
			if(aimages[z].id == 'popup') {


if (aimages[z].addEventListener){
				aimages[z].addEventListener('click', function() { openImage(this.src); }, false);
} else {
				aimages[z].onclick = function() {
					openImage(this.src);
				};
}



			}
		}
	}

	function openImage(back) {
                var nimg = new Image();
		nimg.src = back;
		document.getElementById('bigimage').style.display='block';
		document.getElementById('bigimage').style.background='white url('+back+') no-repeat';
		document.getElementById('bigimage').style.backgroundPosition='50% 50%';
		document.getElementById('bigimage').style.width=nimg.width+30;
		document.getElementById('bigimage').style.height=nimg.height+30;
		document.getElementById('bigimage').style.border='5px solid #7BD6FF';

	}

	function closeImage() {
		document.getElementById('bigimage').style.display='none';

	}

	
	function lightsOff() {
		document.getElementById('house').style.background='transparent url(images/house_h_nohover.jpg) no-repeat';
		document.getElementById('wires').style.background='transparent url(images/wires_nohover.jpg) repeat-x';
	}
	
	
	function heatOn() {
		document.getElementById('pipes').style.background='transparent url(images/heating_hover.jpg) no-repeat';
	}
	
	function heatOff() {
		document.getElementById('pipes').style.background='transparent url(images/heating_nohover.jpg) no-repeat';
	}
	
	
	function waterOn() {
		document.getElementById('pipes').style.background='transparent url(images/water_hover.jpg) no-repeat';
		document.getElementById('pipes-bg').style.background='transparent url(images/waterPipes_hover.jpg) repeat-x';
	}
	
	function waterOff() {
		document.getElementById('pipes').style.background='transparent url(images/water_nohover.jpg) no-repeat';
		document.getElementById('pipes-bg').style.background='transparent url(images/waterPipes_nohover.jpg) repeat-x';
	}
