
svRules = 
{
	'.ms-rteCustom-LinkPopup' : function(el)
	{			
		el.onclick = function()
		{
			var windowOpts = 'menubar=no,resizable=no,scrollbars=yes,toolbar=no,titlebar=no,status=no,width=600,height=600';
			window.open(this.href,'_blank',windowOpts);
			return false;
		}
	},
	
	'.svSharesPopup' : function(el)
	{			
		el.onclick= function()
		{

			
			CallWebtrends(this);

			var windowOpts = 'menubar=no,resizable=no,scrollbars=yes,toolbar=no,titlebar=no,status=no,width=700';
			window.open(this.href,'SharesPopup',windowOpts);


			return false;
		}
	},
	
	'a.ms-rteCustom-LinkExternal' : function(el)
	{
		el.onclick = function()
		{


			CallWebtrends(this);

		}
	},
	
	'table.svTopNav1Item' :function(el)
	{
		el.onmouseover = Function("this.className += ' svTopNav1Hover'");
		
		el.onmouseout = function()
		{
			var className = this.className
        	this.className = className.replace(/ svTopNav1Hover/g,"");
		}
	}
}


function CallWebtrends(el)
{
	var href = el.href;
		
	//Strip protocol
	var split = href.indexOf('//');
	href = href.substring(split+2);
			
	//Split site and page
	split = href.indexOf('/');
			
	//Call webtrends
	dcsMultiTrack( 'DCS.dcssip', 
			href.substring(0,split), 
			'DCS.dcsuri',
			href.substring(split),
			'WT.ti',
			'External link');


}

Behaviour.register(svRules);