function onloadFunctions(lvl_1, lvl_2, lvl_3){ 

/*var columnMainHeight=document.getElementById('columnMain').offsetHeight;
	if (columnMainHeight<540) {
    	document.getElementById('columnMain').style.height=30 + 'em';
 	}*/		



// Top Menu - College of Music Style
	if(document.getElementById('navTop'))
	{
		
	var lvl_1 = lvl_1.toLowerCase();
	var lvl_2 = lvl_2.toLowerCase();
	var lvl_3 = lvl_3.toLowerCase();
	
		var navTop = document.getElementById('navTop');
		var eNode=navTop.getElementsByTagName('*');
		var topLevel = lvl_1.toLowerCase();
		for (i1=0; i1<eNode.length; i1++){
			// designate active link through match with DW parameter
			
			urlString=eNode[i1].getAttribute("href");
			
			if (urlString!=null && urlString.indexOf('?')!=-1) {
				var question=urlString.indexOf('?');
				var linkName=urlString.substring((question+1)).toLowerCase();

				//First Level
				if (linkName==lvl_1) { 
	
					eNode[i1].className = "open";
			
				}
			}
		}
	}
					

// Left Menu - NOW CONTAINING EDITS FOR THE COLLEGE OF MUSIC SITE
	if(document.getElementById('navGlobal'))
	{
		var navGlobal = 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=navGlobal.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();	 
	

		//alert("levels: "+lvl_1+" "+lvl_2+" "+lvl_3);
		for (i1=0; i1<eNode.length; i1++) { 
				//hide submenus by default
			if (eNode[i1].nodeName=="UL" && eNode[i1].className!='show') {
					eNode[i1].className='hide'
			}
			// designate active link through match with DW parameter
			urlString=eNode[i1].getAttribute("href");
		
			if (urlString!=null && urlString.indexOf('?')!=-1) {
				var question=urlString.indexOf('?');
				var linkName=urlString.substring((question+1)).toLowerCase();

					var parent=eNode[i1].parentNode
					var grandparent = eNode[i1].parentNode.parentNode;
					var greatgrandparent = eNode[i1].parentNode.parentNode.parentNode;
					var greatgreatgrandparent = eNode[i1].parentNode.parentNode.parentNode.parentNode;
				//First Level
				if (linkName==lvl_1 && lvl_2=='none' && lvl_3=='none') {
					/*eNode[i1].className="active"*/

					if (eNode[i1]!=eNode[eNode.length-1]) {	
						//Adam - the first statement IE should ignore
						//Old condition
						if (navigator.appName.indexOf('Microsoft Internet Explorer')==-1){
							if (parent.nextSibling.nextSibling!=null && parent.nextSibling.nextSibling.nodeName=='UL'){
								parent.nextSibling.nextSibling.className='show';
							}
						}
						
						//if it is IE it should do this
						//Old Condition
						else if (navigator.appName.indexOf('Microsoft Internet Explorer')!=-1){
						
							if (parent.nextSibling!=null && parent.nextSibling.nodeName=='UL') {
							parent.nextSibling.className='show';
							}
						}
					}

				}
				//Second Level
				if (linkName==lvl_1+'_'+lvl_2 && lvl_3=='none') {
					eNode[i1].className="active"
						grandparent.className='show';
					
					//look for child list						
					for (i5=0; i5<parent.childNodes.length; i5++) {	
						if(parent.childNodes[i5].nodeName=="UL"){
								parent.childNodes[i5].className='show'							
							}
					}
		
					if (grandparent.previousSibling.nodeName=='H2') {
						grandparent.previousSibling.firstChild.className='open';	
					}else if (grandparent.previousSibling.previousSibling.nodeName=='H2') {
						grandparent.previousSibling.previousSibling.firstChild.className='open';
					}	

				}				
				
				//Third Level
				if (linkName==lvl_1+'_'+lvl_2+'_'+lvl_3) {
					eNode[i1].className="active"
						grandparent.className='show';	
						greatgreatgrandparent.className='show';
						greatgrandparent.firstChild.className='open';
				
					if (greatgreatgrandparent.previousSibling.nodeName=='H2') {
						greatgreatgrandparent.previousSibling.firstChild.className='open';	
					}else if (greatgreatgrandparent.previousSibling.previousSibling.nodeName=='H2') {
						greatgreatgrandparent.previousSibling.previousSibling.firstChild.className='open';
					}	

				}					

				
			}
		}
		
	//JM: reset navigation height after function above runs
/*	alert(document.getElementById('navGlobal').offsetHeight + "navGlobal-1");	*/
	
	//var navGlobalHeight = document.getElementById('navGlobal').offsetHeight;
	//var navGlobalNewHeight = navGlobalHeight * .08;
	
	/*alert(navGlobalNewHeight + navGlobalNewHeight);*/
	
	//document.getElementById('navGlobal').style.height=navGlobalNewHeight+"em";
	/*alert(document.getElementById('navGlobal').offsetHeight + "navGlobal-2");	*/
	}
	

		
/* ****************************************
	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
**************************************** */		

/***************************************************************
//adjust widths for Opera & Safari & Firefox 2.0 Windows
*****************************************************************/
	if(navigator.userAgent.indexOf('Opera')!=-1) {
		document.getElementById('homeSidebar').style.marginTop= 0.74 + 'em';
		if(document.getElementById('home')){
			document.getElementById('content').style.marginLeft= 18.05 + 'em';
		}
	}
/*
	if(navigator.userAgent.indexOf('Safari')!=-1) {
		document.getElementById('content').style.width=47.4 + 'em';
	}
	if(navigator.platform.indexOf('Win32')!=-1 && navigator.userAgent.indexOf('Firefox/2.')!=-1){
		if (!document.getElementById('one_column')){
		document.getElementById('columnMain').style.width=51.67 + 'em';
		}
		else{
			document.getElementById('columnMain').style.width=67.2+ 'em';
		}
					
	}*/

/****************************************************
Rotation Script
*******************************************************/
/*
if(document.getElementById('home')){
	
if(document.getElementById('header')){

var rotatingImage = document.getElementById('header');

var num=Math.round(13*Math.random())



rotatingImage.style.backgroundImage="url('/_images/rotation/"+num+".jpg')";
}

}*/
/* END function */
}
/* Adddomloadevent.js is triggered in the template underneath the body tag. */

