



/**  Sleight. Image can't be an anchor, but there is a hack/update at www.youngpup.net if desperate.  **/



if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
	window.attachEvent("onload", fnLoadPngs);
}

function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			var src = img.src;
			img.style.width = img.width + "px";
			img.style.height = img.height + "px";
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
			img.src = "transparent.gif";
		}
		img.style.visibility = "visible";
	}
}



/**  Sleight adapted for the backgrounds. PNG needs to be small--1px--otherwise it renders links inoperable. Possibly just works once on a page. **/



if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	window.attachEvent("onload", alphaBackgrounds);
}

function alphaBackgrounds(){
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	for (i=0; i<document.all.length; i++){
		var bg = document.all[i].currentStyle.backgroundImage;
		if (itsAllGood && bg){
			if (bg.match(/\.png/i) != null){
				var mypng = bg.substring(5,bg.length-2);
				document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
				document.all[i].style.backgroundImage = "url('transparent.gif')";
			}
		}
	}
}



/**  Menu show and hide functions. Also does the mouseover changes, as IE won't do li:hover...  **/



function showresi(obj)
{document.getElementById('resi').style.visibility="visible";
document.getElementById('first').style.color='#435A96';document.getElementById('first').style.background='#ffffff';}

function hideresi(obj)
{document.getElementById('resi').style.visibility="hidden";document.getElementById('first').style.color='#ffffff';document.getElementById('first').style.background='#435A96';}

function showcomm(obj)
{document.getElementById('comm').style.visibility="visible";document.getElementById('second').style.color='#435A96';document.getElementById('second').style.background='#ffffff';}
function hidecomm(obj)
{document.getElementById('comm').style.visibility="hidden";document.getElementById('second').style.color='#ffffff';document.getElementById('second').style.background='#435A96';}

function showwater(obj)
{document.getElementById('water').style.visibility="visible";document.getElementById('third').style.color='#435A96';document.getElementById('third').style.background='#ffffff';}
function hidewater(obj)
{document.getElementById('water').style.visibility="hidden";document.getElementById('third').style.color='#ffffff';document.getElementById('third').style.background='#435A96';}
function showacre(obj)

{document.getElementById('acre').style.visibility="visible";document.getElementById('fourth').style.color='#435A96';document.getElementById('fourth').style.background='#ffffff';}
function hideacre(obj)
{document.getElementById('acre').style.visibility="hidden";document.getElementById('fourth').style.color='#ffffff';document.getElementById('fourth').style.background='#435A96';}


/**  JavaScript for image changes  **/


function swap(id,img){
document.images[id].src=img;
} 


