//--used to insert the current date at the top of the page --//
arrayDayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
arrayMonthName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
dateToday = new Date
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
//This first chunk of javascript is used for the 
//drop-down which occurs when a menu header is 
//clicked on the left navagation menu it does not 
//need to be modified in anyway even when adding 
//to the navagaion system							

//---------------------------------------------------------------------------------------------------------------
//to add to the menu you will need to add the appropriate image files
//(the header, and the subtopics)
//The header will be in a table row by itself and all the subtopics will
//be in a table row by theirself.
//The image used as the header needs an onClick function call that looks like this
//onClick="expandit('NameOfPanel')"
//The subtopics need to be wrapped in a div tag that looks like this
//<div id="NameOfPanel" style="display: none">
//The NameOfPanel can be anything but they must match for each section
//Please see the sample below which belongs in the html file 
//(it can be copied and pasted and the images just need to be switched:

//	 <tr>
//      <td>
//			<img src="Images/Home/CorpInfo1.gif" onclick="expandit('MenuPanel1')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image31','','Images/Home/CorpInfo2.gif',1)" width="140" height="23" align="top" name="Image31" border="0">
//      </td>
//   </tr>
//   <tr>
//      <td align="right">
//			<div id="MenuPanel1" style="display: none">
//				<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image32','','Images/CorpWho2.gif',1)"><img name="Image32" border="0" src="Images/CorpWho.gif" width="140" height="23" align="top"></a>
//              <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image33','','Images/Home/CorpHow2.gif',1)"><img name="Image33" border="0" src="Images/Home/CorpHow1.gif" width="140" height="23" align="top"></a>
//              <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image34','','Images/CorpNeed2.gif',1)"><img name="Image34" border="0" src="Images/CorpNeed.gif" width="140" height="23" align="top"></a>
//			</div>
//      </td>
//   </tr>
//---------------------------------------------------------------------------------------------------------------

var openDisplay = "inline";		//used to open the div
var closedDisplay = "none";		//used to close the div
var itemToClose;				//This is the last item that was opened
var itemTextToClose;
var openB;
var oldItem;
var oldItemB;
var blnOldItemB;

//expandit is meant to close all open menu's and open the one that was clicked.
function expandit(itemId) {
	
	//This is used to allow it to work in NS6 or IE
	if (!document.all && document.getElementById) {
		var item = document.getElementById(itemId);
	}else{
		var	item = document.all[itemId];
	}	
	
	//This is used when you need to close the last opened panel but are not opening a 
	//new one for example a main menu item with no subtopics such as projects 
	if (itemId == "none")
	{
		//This the main one that is opened and this closes the sub one that is opened
		if (itemToClose!=null) {
			itemToClose.style.display = closedDisplay
		}
		itemToClose=null
	
	}else{
				
		//This allows us to open and close and open and close and ... the same menu option
		if (itemToClose == item){
			itemToClose = null
		}	
		
		//This opens/closes the last one clicked on
		if (item.style.display == closedDisplay) {
			item.style.display = openDisplay;
		}else{
			item.style.display = closedDisplay
		}
	
		//This closes the one that is already opened
		if (itemToClose!=null) {
			itemToClose.style.display = closedDisplay
		}
		itemToClose=item
	}
	
	if (oldItemB != null){
		oldItemB.style.display = closedDisplay
		oldItemB=null;
	}
}

//This is used for 2 level menu sections igonore for right now
function expandit2(itemId, itemIdB){

	//This is used to allow it to work in NS6 or IE
	if (!document.all && document.getElementById) {
		var item = document.getElementById(itemId);
		var itemB = document.getElementById(itemIdB);
	}else{
		var item = document.all[itemId];
		var itemB = document.all[itemIdB];
	}
	
	if(item.style.display == closedDisplay){
		item.style.display = openDisplay
	}

	if(itemB.style.display == closedDisplay){
		itemB.style.display = openDisplay;
	}else{
		itemB.style.display = closedDisplay
	}
	
	if ((oldItemB != null)&&(oldItemB != itemB)){
		oldItemB.style.display=closedDisplay
		oldItemB=null
	}	
	itemToClose = item
	oldItem = item
	oldItemB = itemB
}
//Used for text menu's (for example: manuals)
function expandText(textId)
{
	//This is used to allow it to work in NS6 or IE
	if (!document.all && document.getElementById) {
		var item = document.getElementById(textId);
	}else{
		var	item = document.all[textId];
	}	
	
	//This opens/closes the last one clicked on
	if (item.style.display == closedDisplay) {
		item.style.display = openDisplay;
	}else{
		item.style.display = closedDisplay
	}
	
			if (itemTextToClose!=item) {
				if (itemTextToClose!=null) {
					itemTextToClose.style.display = closedDisplay
				}
				itemTextToClose=item
			}

}

