function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
	  	alert("Please Excuse our \"Dust\": in addLoadEvent");

    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(showOnPageLoaded);

//addLoadEvent(function() {
  /* more code to run on page load */ 
//});


function showOnPageLoaded() {
	if(document.getElementById("hideOnPageLoaded")) {
		document.getElementById("hideOnPageLoaded").style.display = "none";
	}
	if(document.getElementById("showOnPageLoaded")) {
		document.getElementById("showOnPageLoaded").style.display = "inline";
	}
	if(document.getElementById("primary")) {
		document.getElementById("primary").style.display = "block";
	}
}

/*disable right-click*/

var message="don't do that"; 
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") 
document.oncontextmenu=new Function("return false") 

/*** Added 10.28.2010 for new Nav Menu ***/
/*** Updated 7.16.2011 to check for get element by ID value is null in sfHover ***/
<!--//--><![CDATA[//><!--

sfHover = function() {
	if(document.getElementById("nav2") != null) {
		var sfEls = document.getElementById("nav2").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

