// JavaScript Document
sfHover = function() {
	var sfEls = document.getElementById("nav").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);


/**
*
*   This is for opening links in a new window
*/
var newwindow;
function photopop(url)
{
	newwindow=window.open(url,'name','height=800,width=900,scrollbars=yes,resizable=yes');
	if (window.focus) {newwindow.focus()}
}


/**
*
*  This will allow for loading from a text file so it is the same on all pages
*/
// new prototype defintion
document.include = function (url) {
 //if ('undefined' == typeof(url)) return false;
 var p,rnd;
 // Prevent browsers from caching the included page
 // by appending a random  number
 rnd = Math.random().toString().substring(2);
 url = url.indexOf('?')>-1 ? url+'&rnd='+rnd : url+'?rnd='+rnd;
 if (document.all){
   // For IE, create an ActiveX Object instance 
   	p = new ActiveXObject("Microsoft.XMLHTTP");
	p.open("GET",url,false);
	p.send(null);
	// Open the url and write out the response
 	document.write( p.responseText );
 } 
 else {
   // For mozilla, create an instance of XMLHttpRequest.
    p = new XMLHttpRequest();
	p.open("GET",url,false);
	p.send(null);
	// Open the url and write out the response
 	document.write( p.responseText );
 }
}
