 courseChangeWin = "";
 // opens a pop-up window
 function openWindow(type, width, height)
 {
	courseChangeWin = open(type, "", "top=100,left=100,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
	return false;
 }

// gets a form object within a particular layer, depending upon the browser
function formObject(layerName, formName)
 {
 	var IENAVform;
	
	if (!document.all && navigator.userAgent.indexOf("Mozilla/4") != -1)
		IENAVform = document[layerName].document[formName];
	else if( document.all && (navigator.userAgent.indexOf("Opera") == -1) )
		IENAVform = document.all[layerName].document[formName];
	else
		IENAVform = document[formName];
	
 	return IENAVform;
 }

// used for menu items
 var fullText = new Array();
 var ftStatus = new Array();

 var rightImg = new Image();
 var downImg = new Image();
 var eraseLayerContent = "";
 var therelativeURL = "";
 
 function setStatus(sectionID, pageID, relativeURL)
 {
	rightImg.src = relativeURL + "images/right_arrow.gif";
	downImg.src = relativeURL + "images/downArrow.gif";
	eraseLayerContent = "<img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''>";
	therelativeURL = relativeURL;

	var sectionText = new Array();
	var urlVal = new Array();
	// ***************************************************************************** initialize menu arrays *********************************************************************
	sectionText[0] = new Array("FDLRS Administration/<BR>HRD Project", "FDLRS HRD Network", "Find a Center");
	urlVal[0] = new Array("aboutCU.asp", "aboutHRDNetwork.asp", "findACenter.asp");
	
	sectionText[1] = new Array("Center", "Region");
	urlVal[1] = new Array("centerHighlights.asp", "regionHighlights.asp");
	
	sectionText[2] = new Array("View all topics", "View all centers", "View all regions", "Current month");
	urlVal[2] = new Array("listAct.asp?typeAct=0&displayType=L&Layer1On=0&showMe=1", "listAct.asp?typeAct=1&displayType=L&Layer2On=0&showMe=2", "listAct.asp?typeAct=2&displayType=L&Layer3On=0&showMe=3", "listAct.asp?typeAct=3");
	
	sectionText[3] = new Array("Online Programs", "Department of Education", "Other");
	urlVal[3] = new Array("relatedInfo_onlineProg.asp", "relatedInfo_doe.asp", "relatedInfo_other.asp");
	
	// loop through all menu items, setting up the menu for when the user opens or closes a section
	for( secC = 0; secC < sectionText.length; secC++)
	{
		if( sectionID == secC ) {
			ftStatus[secC] = 1;
			fullText[secC] = "<table border='0' cellpadding='0' cellspacing='0'><tr><td colspan='3'><img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''></td></tr><tr><td><img src='" + relativeURL + "images/shim.gif' width='27' height='1' alt=''></td><td valign='top'>";
			for(subSecC = 0; subSecC < sectionText[secC].length; subSecC++)
			{
				if( subSecC != 0 )
					fullText[secC] += "</td></tr><tr><td colspan='3'><img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''></td></tr><tr><td><img src='" + relativeURL + "images/shim.gif' width='1' height='1' alt=''></td><td valign='top'>";
				
				if( pageID == subSecC )
					fullText[secC] += "<img src='" + relativeURL + "images/shim.gif' width='8' height='8' alt=''>";
				else
					fullText[secC] += "<img src='" + relativeURL + "images/blueDot.gif' width='4' height='4' alt='' hspace='5' vspace='5'>";
					
				fullText[secC] += "</td><td>";
				
				if( pageID == subSecC)
					fullText[secC] += "<span class='blueBold'>" + sectionText[secC][subSecC] + "</span>";
				else 
					fullText[secC] += "<a href='" + relativeURL + urlVal[secC][subSecC] + "' class='menuLinks'>" + sectionText[secC][subSecC] + "</a>";
			}
			fullText[secC] += "</td></tr><tr><td colspan='3'><img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''></td></tr></table>";
		} // end of if in this section
		else {
		 	fullText[secC] = "<table border='0' cellpadding='0' cellspacing='0'><tr><td colspan='3'><img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''></td></tr><tr><td><img src='" + relativeURL + "images/shim.gif' width='27' height='1' alt=''></td><td valign='top'>";
			for(subSecC = 0; subSecC < sectionText[secC].length; subSecC++)
			{
				if( subSecC != 0 )
					fullText[secC] += "</td></tr><tr><td colspan='3'><img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''></td></tr><tr><td><img src='" + relativeURL + "images/shim.gif' width='1' height='1' alt=''></td><td valign='top'>";
					
				fullText[secC] += "<img src='" + relativeURL + "images/blueDot.gif' width='4' height='4' alt='' hspace='5' vspace='5'>";
				fullText[secC] += "</td><td>";
				fullText[secC] += "<a href='" + relativeURL + urlVal[secC][subSecC] + "' class='menuLinks'>" + sectionText[secC][subSecC] + "</a>";
			}
			
			fullText[secC] += "</td></tr><tr><td colspan='3'><img src='" + relativeURL + "images/shim.gif' width='1' height='14' alt=''></td></tr></table>";
		 	ftStatus[secC] = 0;

		} // end of else
	}
 }
// updates menus
 function showInfo(selectID)
 {
 	var layerID = "menu" + selectID;
	var undefined;
	if( document["OpCl" + selectID] !== undefined)
	{
		if(ftStatus[selectID] == 0) {
			newContent = fullText[selectID];
			ftStatus[selectID] = 1;
		}
		else {
			ftStatus[selectID] = 0;
			newContent = eraseLayerContent;
		}
		
		if (!document.all && navigator.userAgent.indexOf("Mozilla/4") != -1) {
			// take them to first page of that section
			var firstPages = new Array("aboutCU.asp", "centerHighlights.asp", "listAct.asp", "relatedInfo_onlineProg.asp");
			window.location.href=therelativeURL + firstPages[selectID];
		}
		else {
			// hide all other currently visible layers
			for( x = 0; x < 4; x++)
			{
				if( ftStatus[x] == 1 && selectID != x) {
					ftStatus[x] = 0;
					writeNewContent("menu" + x, eraseLayerContent, x);
				}
			}
			writeNewContent(layerID, newContent, selectID);
		}
		
	}
	return false;
  }
  
  // puts content in for menu, depending upon browser
  function writeNewContent(lID, nc, sID)
  {
		MM_showHideLayers(lID, '', 'hide');
		
		if( document.all && (navigator.userAgent.indexOf("Opera") == -1) )
			document.all[lID].innerHTML=nc;
		else {
			document.getElementById(lID).innerHTML=nc;
		}
		
		if( ftStatus[sID] == 0 )
			document["OpCl" + sID].src = rightImg.src;
		else
			document["OpCl" + sID].src = downImg.src;

		MM_showHideLayers(lID, '', 'show');
  }
  // shows or hides a layer
  function MM_showHideLayers() { //v3.0
   var i,p,v,obj,args=MM_showHideLayers.arguments;
   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
  }
  

