// Google Analytics
var pageTracker = _gat._getTracker("UA-15581711-1");

/* thanks to PPK www.quirksmode.org */
function addEvent( obj, type, fn ) 
{
	if (obj.addEventListener)
	{
		obj.addEventListener( type, fn, false );
	}
	else if ( obj.attachEvent ) 
	{
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() 
		{ 
			obj["e"+type+fn]( window.event ); 
		}
		obj.attachEvent( "on"+type, obj[type+fn] );
	} 
}

function removeEvent( obj, type, fn ) 
{
	if ( obj.detachEvent ) 
	{
		obj.detachEvent( "on"+type, obj[type+fn] );
		obj[type+fn] = null;
	} 
	else if (obj.removeEventListener)
	{
		obj.removeEventListener( type, fn, false );
	}
}

//Function to insert into page
function doUrchin( Link, Prefix )
{
	Link = Link.replace( /^(http(s)?:\/\/)/i, '' );
	Link = Link.replace( /\./i, '_' );
	
	if( Prefix != null )
	{
		Link = '/' + Prefix + '/' + Link;
	}
    pageTracker._trackPageview( Link );	
}
