function onloadFunctions(lvl_1, lvl_2, lvl_3){ 


// Left Menu
	if( document.getElementById('navGlobal')) {
    var navigation = document.getElementById('navGlobal'); 
	
	// asterisk pulls in all elements in this div - older versions of Safari do not support this so menu will stay expanded in those versions
	var eNode=navigation.getElementsByTagName('*');
	
	
	// ids in this function are converted to lowercase so there are not case-sensitive issues if some creates an id with Caps in the wrong spot
	var lvl_1 = lvl_1.toLowerCase();
	var lvl_2 = lvl_2.toLowerCase();
	var lvl_3 = lvl_3.toLowerCase();	
	


		for (i1=0; i1<eNode.length; i1++) { 
		
			//hide submenus by default
			if (eNode[i1].nodeName=="UL" && eNode[i1].className!='show') {
					eNode[i1].className='hide'
			}
	
			var eNodeID = eNode[i1].id.toLowerCase();
		  	//permanently show section menu if in that section		
				  if (eNode[i1].nodeName=="H2" && eNodeID.indexOf(lvl_1)!=-1) {
				      eNode[i1].firstChild.className='active'; 
				  }
				  //show sub-menu if exists
				  if (eNodeID=="sub_" + lvl_1) {
					  eNode[i1].className='show';	
				  }
					
				  //highlight appropriate lvl_2
				  if (lvl_2!="none") { 
						if (eNodeID==lvl_1+'_'+lvl_2) {
						 eNode[i1].firstChild.className='active'; 
						}
				  //show sub-menu if exists
						if (eNodeID=="sub_" + lvl_1 +"_"+ lvl_2) {
					  	 eNode[i1].className='show';
						}
				  }
		
				  //highlight appropriate lvl_3
				  if (lvl_3!="none") {
						if (eNodeID.indexOf(lvl_1+'_'+lvl_2+'_'+lvl_3)!=-1) {
						 eNode[i1].firstChild.className='active'; 
						}
				       if (eNodeID==lvl_1+'_'+lvl_2) {
						 eNode[i1].firstChild.className='open'; 
						}
				  }					

				
			
		}
				
	}
	

		
/* ****************************************
	Below: Adapted from http://www.brucelawson.co.uk/index.php/2005/opening-links-in-new-windows-in-xhtml-strict/#comment-376
**************************************** */
if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("A");
	/* hide PDF note by default */
	
	if (document.getElementById('pdfNote')) {
	document.getElementById('pdfNote').className="hide"; 
		for (var i=0; i<anchors.length; i++) {
			var docLink = anchors[i];
			if (docLink.className=='externalDocument') {
				docLink.target = "_blank";
				docLink.innerHTML = docLink.innerHTML + "&nbsp;(opens in new window)";
				document.getElementById('pdfNote').className="show"; 
				}
			if (docLink.className=='externalDocumentNoNote') {
				docLink.target = "_blank";
			}				
		}	
	}
		
/* ****************************************
 Above: Adapted from http://www.brucelawson.co.uk/index.php/2005/opening-links-in-new-windows-in-xhtml-strict/#comment-376
**************************************** */		

/****************************************************
Rotation Script
*******************************************************/
if(document.getElementById('banner')){

var rotatingImage = document.getElementById('banner');

var num=Math.round(10*Math.random()) /* Use actual number of files in the directory */

rotatingImage.style.backgroundImage="url('/_images/rotation/"+num+".jpg')";


/* END function */
}
}
/* Adddomloadevent.js is triggered in the template underneath the body tag. */



/*****************************************
Banner Rotation Script, taken from http://wsabstract.com/script/cut176.shtml
*******************************************/
