/*
function Virtual() {
	//reveal the the list 
	VirtualDiv.style.visibility='visible';
	}
	function yes() {
	VirtualDiv.style.visibility='hidden';
}
function Reaching() {
	//reveal the the list 
	ReachingDiv.style.visibility='visible';
	}
	function yes() {
	ReachingDiv.style.visibility='hidden';
	}
function AFF() {
	//AFF = Alumni, Friends, Foundation
	//reveal the the list 
	AFFDiv.style.visibility='visible';
	}
	function yes() {
	AFFDiv.style.visibility='hidden';
	}
function CWPD() {
	//CWPD = Center for Workforce and Professional Development
	//reveal the the list 
	CWPDDiv.style.visibility='visible';
	}
	function yes() {
	CWPDDiv.style.visibility='hidden';
	}
*/

		
/*		TREE VIEW - Collapse and Expand - Right Menu (Default Page0
		pureDOM explorer
		written by Christian Heilmann http://www.onlinetools.org/
		//http://www.onlinetools.org/tools/puredom/
	*/
	
	// Presets, should they not be defined
	/*var parentID=false;
	var extradiv=false;
	var image=false;
	var collapsed='+ ';
	var expanded='- ';
	var children='';
	*/
			
	var parentID='expnav';
	var extradiv=false;
	var image=false;
	var children=' [#]'; 
	var collapsed='';
	var expanded='';
	
	// Checking for DOM compatibility	
	if (document.getElementById && document.createTextNode && document.createElement){canDOM=true}

	function expinit(){
		if (canDOM){
			if(parentID && document.getElementById(parentID)){
				allas=document.getElementById(parentID).getElementsByTagName('A');
				alluls=document.getElementById(parentID).getElementsByTagName('UL');
				alllis=document.getElementById(parentID).getElementsByTagName('LI');
			}else{
				alluls=document.getElementsByTagName('UL');
				alllis=document.getElementsByTagName('LI');
			}
			// not working in IE, bummer.
			/*for(i=0;i<allas.length;i++){
				allas[i].setAttribute('onclick','ex(this)');
			}*/
			if(extradiv){
				for(i=0;i<alllis.length;i++){
					outsideDiv = document.createElement('SPAN');
					outsideContent = document.createTextNode('');
					outsideDiv.appendChild(outsideContent);
					islink=alllis[i].getElementsByTagName('A')[0];
					if(islink){
						islink.style.paddingLeft="1em";
						islink.style.position="relative";
						islink.insertBefore(outsideDiv,islink.firstChild);
						islink.firstChild.style.width="1em";
						islink.firstChild.style.height="1em";
						islink.firstChild.style.position="absolute";
						islink.firstChild.style.top="0";
						islink.firstChild.style.left="0";
					}
				}
			}
			if(image){
				for(i=0;i<alllis.length;i++){
					islink=alllis[i].getElementsByTagName('A')[0];
					if(islink){
						addimg = document.createElement('img');
						addimg.src=blankpic;
						addimg.style.border='none';
						addimg.alt=picalt;
						addimg.title=pictitle;
						addimg.style.width=picx+'px';
						addimg.style.height=picy+'px';
						addimg.style.marginRight=picmargin+'px';
						islink.insertBefore(addimg,islink.firstChild);
					}
				}
			}
			for(i=0;i<alluls.length;i++){
				subul=alluls[i];
				if(subul.parentNode.tagName=='LI'){
					childs=subul.getElementsByTagName('LI').length
					mom=subul.parentNode.getElementsByTagName('A')[0]
					if(mom){
						if(extradiv){
							momlink=mom.childNodes[1];
							momspan=mom.childNodes[0];
							momspan.firstChild.nodeValue=collapsed;
						}else if(image){
							momlink=mom.childNodes[1];
							momimg=mom.childNodes[0];
							momimg.src=onpic;
						}else{
							momlink=mom.childNodes[0];
							momlink.nodeValue=collapsed+momlink.nodeValue;
						}
						momlink.nodeValue=momlink.nodeValue+children.replace('#',childs); 
						subul.style.display='none';
					}
				}
			}
		}
	}
	
	// Collapse and Expand node.
    function ex(n){
		if(canDOM){
			u=n.parentNode.getElementsByTagName("ul")[0];
			if(u){
				u.style.display=u.style.display=='none'||u.style.display==''?'block':'none';
				if (extradiv){
					str=n.getElementsByTagName('span')[0].firstChild;
					sign = str.nodeValue.substr(0,collapsed.length) == collapsed ? expanded : collapsed;					
					str.nodeValue=sign+str.nodeValue.substr(collapsed.length,str.length);
				}else if(image){
					img=n.getElementsByTagName('img')[0];
					img.src=img.src.indexOf(offpic)!=-1?onpic:offpic;					
				}else if (collapsed && expanded){
					str=n.firstChild.nodeValue;
					sign = str.substr(0,collapsed.length) == collapsed ? expanded : collapsed;					
					n.firstChild.nodeValue= sign + str.substr(collapsed.length,str.length);
				}
			}
		}			
	}
	window.onload=expinit;

/* END of TREEVIEW*/
/* Sub Side Nav (Such as Admissions)--- expand and collapse  */
	function toggle(div_id) 
	{ 
		var divs = document.getElementsByTagName("DIV"); 
		var lastDiv = divs.length; 
		var thisId; 
		for (var n=0; n< lastDiv; n++) 
		{ 
			thisId = divs.item(n).getAttribute("id"); 
			if (thisId == div_id) 
			{ 
				thisClass = divs.item(n).getAttribute("class"); 
				if (thisClass == null) //IE 
				{ 
					thisClass = divs.item(n).getAttribute("className"); 
					if (thisClass == "collapse") 
					{ 
						divs.item(n).setAttribute("className", "expand"); 
						divs.item(n).getElementsByTagName("IMG").item(0).setAttribute("src", "images/minus.gif"); 
					}
					else 
					{ 
						divs.item(n).setAttribute("className", "collapse"); 
						divs.item(n).getElementsByTagName("IMG").item(0).setAttribute("src", "images/plus.gif"); 
					} 
				} 
				else if (thisClass == "collapse") 
				{ 
					divs.item(n).setAttribute("class", "expand"); 
					divs.item(n).getElementsByTagName("IMG").item(0).setAttribute("src", "images/minus.gif"); 
				}
				else 
				{ 
					divs.item(n).setAttribute("class", "collapse"); 
					divs.item(n).getElementsByTagName("IMG").item(0).setAttribute("src", "images/plus.gif"); 
				} 
			} 
		} 
	}
/* End expand and collapse Sub Side Nav*/