function CTracking()
{
	// Make these functions public
	this.trackReferrals = trackReferrals;						///< This function determines if the current page is the entry page and sets a cookie identifying the source
	
	/**
	* trackReferrals;	This function determines if the current page is the entry page and sets a cookie identifying the source
	*
	* @access public
	* @return void
	*/
	function trackReferrals()
	{
		// Determine if the previous page was internal or external
		if ((document.referrer.length > 0) && (document.referrer.indexOf("ilisys.com.au") == -1)) {
			// Coming from an external site - create cookie to log
			var objExpiry = new Date();
			// Set expiry time to 30 days from now
			objExpiry.setTime(objExpiry.getTime() + (30*24*60*60*1000));
			// Create the referral date
			var objCreateDate = new Date();
			// Create the cookie
			document.cookie = "ilisys_referrer=" + escape(document.referrer + "&&&referral_date=" + objCreateDate.toGMTString() + "&&&referral_destination=" + document.location) + "; expires=" + objExpiry.toGMTString() + "; path=/" + "; domain=ilisys.com.au";
		}
	}
}

