﻿// Unhides a remote element when you rollover a link
function showText(textNum, headerNum) {
	var textToShow;
	
	textToShow = document.getElementById(textNum);
	textToShow.className = 'contentVisible';
	
	if(previousText != textNum) {
	    hideText(previousText);
	 }
	 else{
	   if(firstTime){
	   document.getElementById('header1').className = 'active';
	   firstTime = false;
	    }
	 }
	 
	previousText = textNum;
	//activateHeader(headerNum);
}

function activateHeader(headerNum) {
	var activeHeader;
	
	activeHeader = document.getElementById(headerNum);
	activeHeader.className = 'active';
	
	//alert(headerNum);
}

// Hides that remote element when you roll out
function hideText(textNum, headerNum) {
	var textToHide;
	var defaultHeaderClass;
	
	textToHide = document.getElementById(textNum);
	textToHide.className = 'contentHidden';
	
	defaultHeaderClass = document.getElementById('header1');
	defaultHeaderClass.className = 'swapContentHeader';
}

function deactivateHeader(headerNum) {
	var activeHeader;
	
	activeHeader = document.getElementById(headerNum);
	activeHeader.className = 'swapContentHeader';
	
	//alert(headerNum);
}




// Popup for help windows in admin section

function popup(filename) {
		
var pWindow=window.open(filename,'filename','width=350,height=450,scrollbars=yes,location=no,menubar=no,toolbar=no,resizable=no,status=no,locationbar=no');
pWindow.focus();
		
}

//Global Network page - shows locations contact info on mouseover  
 
  function showContacts(pos) {
    var contactInfoHolder = document.getElementById("contactInformation").getElementsByTagName("DIV");     
		for (var i=0; i<contactInfoHolder.length; i++) {
		// Use this if statement if you don't want the divs to be hidden until you rollover another link
		if (i !=pos){
				contactInfoHolder[i].className="contentHidden";
	      }
	    }
		// Us this if statement if you want the divs to become hidden when you roll out.
		//If that is the case, add onmouseout="javascript:showContacts(null);" to the link
		//if (pos !=null) {
	   contactInfoHolder[pos].className="contentVisible";	
		// }
} 



