// site wide javascript
function start_ie_nav() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("main");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					curCname = this.className;
					this.className="over";
				}
				node.onmouseout=function() {
					if(!curCname) {
							this.className=this.className.replace("over","out");
					}
					else {
						//alert(curCname);
						this.className=this.className.replace("over",curCname);
					}
				}
			}
		}
	}
}

function show_nav() {
	if(!document.getElementById){
		return false;
	}
	else{
		var a = document.getElementById('navigation').getElementsByTagName('A');
		if(window.location.href.substr(location.href.length - 1, 1) == '/'){
			var loc = window.location.href + 'index.php'; 
		}
		else{
			var loc = window.location.href.replace('#','');
		}
		for(var i=0; i < a.length; i++) {
			if(a[i].href == loc){
				a[i].parentNode.setAttribute("class", "on");
				a[i].parentNode.setAttribute("className", "on");
			}
		}
		if(!window.XMLHttpRequest){
			start_ie_nav();
		}
	}	
}

// function/array set for handling plos (page load objects)
function set_plos() {
	window.onload = plos_go;
}

function plos_go() {
	for(var i = 0;i < plos.length;i++)
		eval(plos[i]);
}

function plo_add(jso){
	plos[plos.length] = jso;
}

var plos = new Array();

// set each function to initialize on page load here
plo_add('show_nav()');
set_plos();