mTracker = {
	_modules : new Array(),
	_tracked : false,
	
	addModule : function(id)
				{
					this._modules.push(id);
				},
	removeModule : function(id)
				{
					this._modules.splice(this._modules.indexOf(id), 1);
				},
	track : function()
				{
					if(this._tracked)
						return;
						
					this._tracked = true;
					
					if(this._modules.length > 0)
					{
						for(var ctr=0; ctr < this._modules.length; ctr++)
							this.applyTracking(this._modules[ctr]);
					}
				},
	applyTracking : function(elementValue)
				{
					var module = document.getElementById(elementValue);
					if (module == null) return;
					var links = module.getElementsByTagName("a");
					var intref = elementValue.replace(/-/g, '_');

					for(var ctr=0; ctr < links.length; ctr++)
					{ 
						var title=links[ctr].innerHTML; 
						var address=links[ctr].href;

						if(address.indexOf('mailto:') == -1)
						{
							if(address.indexOf(window.location.hostname) != -1)
							{
								if(links[ctr].href.indexOf('?') != -1)
									links[ctr].href = links[ctr].href + "&intref=" + intref;
								else
									links[ctr].href = links[ctr].href + "?intref=" + intref;
							}
							else
							{
								links[ctr].href = window.location.protocol + "//" + window.location.hostname + "/common/jumplink.php?target=" + escape(links[ctr].href).replace(/\+/g,'%2B') + "&loc=" + intref;
							}
						}

						links[ctr].innerHTML = title;

						// Not used current, keeping around in the event page tags are put into use again
						//mTracker.addListener(links[ctr], 'click', function() { mTracker.triggerEvent(address, title, elementValue); }, true);
					}
				},
	// Not used current, keeping around in the event page tags are put into use again				
	addListener : function(element, type, expression, bubble)
				{
					bubble = bubble || false;
					
					if(window.addEventListener)
					{
						element.addEventListener(type, expression, bubble);
						return true;
					}
					else if(window.attachEvent)
					{
						element.attachEvent('on'+type, expression);
						return true;
					}
					else
						return false;
				},
	// Not used current, keeping around in the event page tags are put into use again				
	triggerEvent : function(address, title, module)
				{
					ntptAddPair('onpage', window.location);
					ntptAddPair('module', module);
					ntptAddPair('target', address);
					ntptAddPair('targettitle', title);
					ntptEventTag('ev=clicklink');
				}
};
