
	/* The following function is used to automatically detect the correct Omniture report suite */
	function omnitureReportSuite() {
		var myDomain;
		myDomain= document.domain.toLowerCase();

		if (myDomain.match(/(www2|www|ssl|em|obc|cal|est-oee)./)) {
			myDomain= myDomain.replace(/(www2|www|ssl|em|obc|cal|est-oee)./, "");
		}


		switch (myDomain)
		{
			case "canadapost.ca": { var s_account= "canadapostca"; break }
			case "postescanada.ca": { var s_account= "canadapostca"; break }
			case "canadapost.com": { var s_account= "canadapostca"; break }
			case "postescanada.com": { var s_account= "canadapostca"; break }
			case "canadapost.net": { var s_account= "canadapostca"; break }
			case "postescanada.net": { var s_account= "canadapostca"; break }
			case "canadapost.org": { var s_account= "canadapostca"; break }
			case "postescanada.org": { var s_account= "canadapostca"; break }
			case "mailposte.ca": { var s_account= "canadapostca"; break }
			case "postescanada-canadapost.ca": { var s_account= "canadapostca"; break }
			case "canadapost-postescanada.ca": { var s_account= "canadapostca"; break }
			case "smartmoves.ca": { var s_account= "canadapostca"; break }
			case "picturepostage.ca": { var s_account= "canadapostca"; break }
			case "timbresphotos.ca": { var s_account= "canadapostca"; break }
			case "stampquest.ca": { var s_account= "canadapostca"; break }
			case "stampquest.com": { var s_account= "canadapostca"; break }
			case "timbromanie.ca": { var s_account= "canadapostca"; break }
			case "timbromanie.com": { var s_account= "canadapostca"; break }
			case "postalplanet.ca": { var s_account= "canadapostca"; break }
			case "planetepostes.ca": { var s_account= "canadapostca"; break }
			case "planetepostes.com": { var s_account= "canadapostca"; break }
    		default: { var s_account= "canadapostca-dev"; break }
		}
		
		return s_account;
	}
	
/***************************************************************************************** 
omnitureCustomLink(obj,linkType,linkValue,languageValue) is called within the javascript onClick event
to track custom links in omniture.
	
obj =		The object you wish to track (typically "this")
	
linkType=	'e' - exit link
		'o' - custom link
		'd' - download link
	
value=	The value you wish to assign to the link and associated variables (ex. 'myCustomLink')
	
Example: <a href="#" onClick="javascript:omnitureCustomLink(this,'o','survey070005i','English');">Close Box</a></p>*****************************************************************************************/
function omnitureCustomLink(obj,linkType,linkValue,languageValue){
		
	/* detect the correct report suite */
	s=s_gi(omnitureReportSuite())
		
	/* Choose which custom omniture variables/events you wish to track */
	s.linkTrackVars="eVar1,eVar3"; s.linkTrackEvents="none";
		
	/* Set the values of each custom variable and/or event */
	s.eVar1=linkValue;
	s.eVar3=languageValue
		
	/* Make the call to Omniture */
	s.tl(obj,linkType,linkValue);
}

	
	/***************************************************************************************** 
	omnitureCustomPage(pageName,campaignID) is called to track a custom new page in Omniture. 
	
	pageName= the value that will be associated with s.pageName
	intCampaignID= the value that will be associated with s.eVar1 for Internal campaigns
	
	Example: <a href="#" onClick="javascript:omnitureCustomPage('myTestPage','testpage070001i');">Open New Page</a></p>
	*****************************************************************************************/
	
	function omnitureCustomPage(pageName,intCampaignID){
		
		/* Set the values of the custom variables */
		s.pageName=pageName
		s.eVar1=intCampaignID
		
		/* Make the call to Omniture */
		void(s.t());
	}
	
