	///////////////
	// Function package to add Omniture tracking to the Dashboard.
	//

	function initOSTLinkTrackforID() {
	  if (!document.getElementById || !document.getElementsByTagName) return;
	  if(document.getElementById('dashboardContent')!= null && document.getElementById('dashboardContent')){
	    var OST_links = document.getElementById('dashboardContent').getElementsByTagName('a');
	    for (var i = 0; i < OST_links.length; i++){
	        addEvent(OST_links[i],'click', getTarget, false);
	    }
	  }
	}
	
	function getTarget(e) {
	  //Checks for IE's window.event object to find the target link.
	  var el = window.event ? window.event.srcElement : e ? e.target : null;
	  if (!el) return;
	  //If the element that registered the event is not an anchor, get to the anchor.
	  while(el.nodeName.toUpperCase()!='A'){
	  	el=el.parentNode;
	  }
	  OSTlinkCode(el);
	}

	function OSTgetDynLinkName(t){
	  n='MiniDashBoard:';
	  if (t.firstChild.nodeType == 3) {n+=camelStrip(t.firstChild.nodeValue);}
 	  else if (t.firstChild.nodeName == 'IMG' ) {
	      n+=camelStrip(t.firstChild.alt);
	  }	         
	  return n+OSTGetLangRegFromPageName();
	}

	function OSTGetLangRegFromPageName(){
	var rl = '';
	if(typeof(s)=='object'){
	    rl=s.pageName.split('(');
	    rl='('+rl[rl.length-1];   
	  }
	return rl;
	}

	//Capitalize every word and strip spaces.
        function camelStrip(str) {
        var n = str.toLowerCase().replace(/\b[a-z]/g, fcap);
		function fcap(){return arguments[0].toUpperCase();}
	n=n.replace(/\s/g,'');
	return n;
        }
	
	//Omniture's link tracking function.
	function OSTlinkCode(obj) {
	  var s=s_gi(s_account);
	  s.linkTrackVars='None';
	  s.linkTrackEvents='None';
	  var lt=obj.href!=null?s.lt(obj.href):"";
	  if (lt=="") { s.tl(obj,'o',OSTgetDynLinkName(obj)) }
	}
	
	// cross-browser event handling for IE5+, NS6+ and Mozilla By Scott Andrew.
	function addEvent(elm, evType, fn, useCapture){
	  if (elm.addEventListener) {
	    elm.addEventListener(evType, fn, useCapture);
	    return true;
	  } else if (elm.attachEvent) {
	    var r = elm.attachEvent('on' + evType, fn);
	    return r;
	  } else {
	    elm['on' + evType] = fn;
	  }
	}

addEvent(window, 'load', initOSTLinkTrackforID, false);
