/********************************************************************************/
/* Rogers Media Global Analytics Include					*/
/********************************************************************************/

/********************************************************************************/
/* Variable Declarations  							*/
/********************************************************************************/
var __hn = document.location.hostname.toLowerCase();

if (typeof(window.isDevelopment) == "undefined") {
	var isDevelopment = false;
}

if (!s_account||s_account=="") {
	var s_account="rogmeddefault";
	// TODO: Build an some kind of a request for an image or something to a PHP/JSP script
	// this page will automatically send a report to a designated mailbox or create an entry
	// in an XML file or soemthing saying that a page has been tagged improperly
}

if (__hn.indexOf("dev.") != -1 || __hn.indexOf("qa.") != -1 
	|| __hn.indexOf("stage.")!=-1 ||__hn.indexOf("design.")!=-1) {
	isDevelopment = true;
}

// Rule for Sending Data to Development Suites (per iteration of sites tagged)
s_account = s_account.toLowerCase();
if (s_account == "") {
	s_account = "rogmeddefault";
}

// Global Rule for Development
if (isDevelopment && s_account != "rogmeddevelopment" && 
	s_account != "rogmeddevelopmentdev" && 
	(s_account != "chumtvcityline") && 
	(s_account != "chumtvcitytvtoronto") && 
	(s_account != "chumtvcitytvedmonton") && 
	(s_account != "chumtvcitytvvancouver") && 
	(s_account != "chumtvcitytvwinnipeg") && 
	(s_account != "chumtvpulse24") && 
	(s_account != "chumtvcitytvcalgary") &&
	(s_account != "chumtvcitytv") &&
	(s_account != "chumtvcityvideoplayer")) {
	if (s_account) { s_account += "dev"; }
}

// Global Rule for Sending data to Global Report Suite
if (s_account != "" && 
	s_account != "rogmeddevelopment" && 
	s_account != "rogmeddevelopmentdev" && 
	(s_account != "chumtvcityline") && 
	(s_account != "chumtvcitytvtoronto") && 
	(s_account != "chumtvcitytvedmonton") && 
	(s_account != "chumtvcitytvvancouver") && 
	(s_account != "chumtvcitytvwinnipeg") && 
	(s_account != "chumtvpulse24") && 
	(s_account != "chumtvcitytvcalgary") && 
	(s_account != "chumtvcitytv") &&
	(s_account != "chumtvcityvideoplayer")) {

	s_account += ",rogmedrogersmedia";
		if (isDevelopment) {
			s_account += "dev";
		}
}

document.write(unescape("%3Cscript src='" + analyticsProtocol + analyticsHostServer + "/js/reportSuitIdMap.js' type='text/javascript'%3E%3C/script%3E"));
document.write(unescape("%3Cscript src='" + analyticsProtocol + analyticsHostServer 
	+ "/js/omniture.js' type='text/javascript'%3E%3C/script%3E"));
