function popup(image){
	var url = "../images/"+image+"";
	var features = "scrolling=yes,fullscreen=yes,toolbar=no,menubar=no,status=no,location=notoolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+screen.width+",height="+screen.height+" ";
	window.open(url,"Large",features);
}
function listCategoriesOn(){
	document.getElementById('gallery_list').style.display= "block";
}
function listCategoriesOff(){
	document.getElementById('gallery_list').style.display= "none";
}
	var previousm = 'mission_welcome';
	var previousn = 'mission_welcome_nav';
	function missionChange(mission){
		previousm;
		var nav = (mission+"_nav");
		
		document.getElementById(previousm).style.display = "none";
		document.getElementById(previousn).style.color = "#000000";
		document.getElementById(previousn).style.background = "#FFCC33";
		document.getElementById(mission).style.display = "block";	
		document.getElementById(nav).style.color = "#FFCC33";
		document.getElementById(nav).style.background = "#000000";
		
		previousm = mission;
		previousn = nav;
	}

function showIt(evt) {
  var child = null, parent;
  if (document.all) {
    var src = event.srcElement;
    var parent = src.parentElement;
  } else {
    var src = evt.target;
    if (src.nodeType == 3)  src = src.parentNode;
    var parent = src.parentNode;
  }
  if (("A" == src.tagName && parent.className != '') || "LI" == src.tagName) {
    if ("LI" == src.tagName) {
	  src = (document.all) ? document.all[src.sourceIndex+1] : src.firstChild;
	  parent = (document.all) ? src.parentElement : src.parentNode;
    }
/*  IE 5 will also execute the getChildElement function but not IE 4.0 
 *  That is the reason why the document.all reference is used here for IE */
     child = (document.all ? document.all[src.sourceIndex+1] : getChildElement(parent, 1));
     if (null != child && "LI" == parent.tagName && "UL" == child.tagName) {
       parent.className = ("close" == parent.className ? "open" : "close");
       child.className = ('expanded' == child.className ? 'none' : 'expanded');
     }
  }
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;