/* DHTML menu */
function initPage()
{
	var nav = document.getElementById("navigation");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{		
				nodes[i].onmouseover = function () 
				{
					this.className += " hover";
				}
				nodes[i].onmouseout = function ()
				{
					this.className = this.className.replace(" hover", "");
				}
		}
	}
}
if (window.attachEvent)
	window.attachEvent("onload", initPage);
	
function detectSafari() { 
if (navigator.appVersion.indexOf("Mac") != -1) 
   document.body.className += " safari"; 
}

if (window.addEventListener)
	window.addEventListener("load", detectSafari, false);


/* BLOCKS RIGHT CLICKING TO SAVE PHOTOS */
var message="Copyright Willis Construction. Please contact us at (831) 623-2900 if you need to obtain photography of our work.";

function clickIE4() {
	if (event.button == 2) {
		alert(message);
	return false;
	}
}

function clickNS4(e) {
	if (document.layers || document.getElementById && !document.all) {
		if (e.which==2 || e.which==3) {
			alert(message);
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
} else if (document.all && !document.getElementById) {
	document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false");
