// JavaScript for opening external links in XHTML document

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

// JavaScript for suckerfish drop-downs <http://www.htmldog.com/articles/suckerfish/>
//sfHover = function() {
//	var sfEls = document.getElementById("navMain").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"), "");
//		}
//	}
//}

// JavaScript for loading above functions into the page
var PageInitializer = {
    start : function(){
        PageInitializer.addLoadEvent(function(){
            //Add Functions Here
			externalLinks();
			//sfHover();
        });
    },
    addLoadEvent:function(f){var w=window;var o=w.onload;if(typeof w.onload!='function'){w.onload=f;}else{w.onload=function(){o();f();}}}
}
PageInitializer.start();