// Make calls to other operations from this file. 


// fired at the end of the page once all html has loaded
function onDOMload () {
	if(typeof sIFR == "function"){
		switchFonts();
	};
	if(typeof buildTransitions == "function") {
		buildTransitions();
	};
};

// fired once all content has loaded
function onPageLoad () {
};

document.onload = onPageLoad();


//menu by Phil
window.onload = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("main_menu");
		navRoot = navRoot.firstChild;
		for (i=0; i<navRoot.childNodes.length; i++) {

			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" hover";
					//this.childNodes[1].className+=" hover";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" hover", "");
					//this.childNodes[1].className=this.childNodes[1].className.replace(" hover", "");
				}
			}
			for (c=0; c<node.childNodes.length; c++) {
				var ul = node.childNodes[c];
				for (c2=0; c2<ul.childNodes.length; c2++) {
					var li = ul.childNodes[c2];
					if (c2 !=ul.childNodes.length-1) {
						if(	li.nodeName == 'LI') {
							li.onmouseover=function() {
								this.className+=" hover";
							}
							li.onmouseout=function() {
								this.className=this.className.replace(" hover", "");
							}	
						}
					} else {
						if(	li.nodeName == 'LI') {
							li.onmouseover=function() {
								this.className+=" last_hover";
							}
							li.onmouseout=function() {
								this.className=this.className.replace(" last_hover", "");
							}	
						}	
					}
				}			
			}		
		}
	}
}