
function onloadFunctions(lvl_1){ 


// Left Menu

    if(document.getElementById('site-nav-primary')) {

		var navGlobal = document.getElementById('site-nav-primary'); 
		var eNode=navGlobal.getElementsByTagName('*');
		var lvl_1 = 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="active";
					}
			}
		}
	}

/* ****************************************

	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')) {
		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=='externalDocumentNoOpenNote') {
				docLink.target = "_blank";
				document.getElementById('pdfNote').className="show";
			}				

		}	

	}

/* ****************************************

 Above: Adapted from http://www.brucelawson.co.uk/index.php/2005/opening-links-in-new-windows-in-xhtml-strict/#comment-376

**************************************** */	





//End onload function
	}

