window.onload=function(){

 			addYouAreHere();

		}//end window onload



	//this gets the full url
var url = document.location.href;
	//this removes the anchor at the end, if there is one
url = url.substring(0, (url.indexOf("#") == -1) ? url.length : url.indexOf("#"));
	//this removes the query after the file name, if there is one
url = url.substring(0, (url.indexOf("?") == -1) ? url.length : url.indexOf("?"));
	//this removes everything before the last slash in the path
url = url.substring(url.lastIndexOf("/") + 1, url.length);

//alert(url);
if(url == "") {
	url = ('default.htm');
	}
//return
//alert(url);

	

function getIDFromHref(strHref) {
		//this removes the anchor at the end, if there is one
strHref = strHref.substring(0, (strHref.indexOf("#") == -1) ? strHref.length : strHref.indexOf("#"));
	//this removes the query after the file name, if there is one
strHref = strHref.substring(0, (strHref.indexOf("?") == -1) ? strHref.length : strHref.indexOf("?"));
	//this removes everything before the last slash in the path
strHref = strHref.substring(strHref.lastIndexOf("/") + 1, strHref.length);
return strHref;

  } // end getIDFromHref

		

// Function to add class="active" to the appropriate LI
function addYouAreHere() {

	var listElement = document.getElementById("global");
	var objAnchors = listElement.getElementsByTagName('a');

    // Iterate through all anchors in the top navigation

        	for (var iCounter=0; iCounter<objAnchors.length; iCounter++) {
      	  	// Locate the associated li container,
          	// and style it

         	var strID = getIDFromHref(objAnchors[iCounter].href);
			//alert("strID: " + strID + "  " + "url: " + url);

			if(strID == url) {

				//alert("Match " + objAnchors[iCounter].parentNode.nodeName);

				objAnchors[iCounter].parentNode.className = 'active';

				}//end if match

		  	 }//end for

		}//end ur here


