/*
* TCM.com Omniture Implementation
* Populates data for page view tracking
*/
//prepares the URL to be parsed
var pathName = window.location.pathname.substring(1);
//if (pathname.charAt(pathname.length - 1) == "/") pathName += "index.html";
var pathArray = pathName.split('/');
var host = window.location.host;
// alert ("pathname: " + pathName + "; host: " + host + "; path[0]: " + pathArray[0] + "; path[1]: " + pathArray[1] )
//Initializing the JSON that holds the necessary data to be sent to Omniture
var metrics = {
pageName:	"OTHER",
server: '',
channel:	"",
prop1:	'',
prop2:	'',
prop3:	'',
prop4:	'',
prop5:	'',
prop6:	'',
prop7:	'',
prop8:	'',
prop9:	'',
prop10:	'',
prop11:	'',
prop12:	'',
prop13:	'',
prop14:	'',
prop15:	'',
prop16:	'',
prop17:	'',
prop18:	'',
prop19:	'',
prop20:	''
}
if (pathName == "2009REDESIGN/homepage.jsp" || pathName == "2009REDESIGN/homepage/" || pathArray[0] == "index" || pathArray[0] == "index.jsp"|| pathArray[0] == "" || pathArray[0] == null) {
metrics.pageName = "Home Page";
metrics.server = "Section Home";
metrics.channel = "Home";
} else {
/* if URL has ID then get contentId, FranchiseId, etc */
}
function populateMetricsData() {
if (metrics.pageName == 'OTHER') {
s.pageName = "OTHER:" + window.location.href;
} else {
s.pageName = metrics.pageName;
}
s.server = metrics.server; // subsection
s.channel = metrics.channel; // section
s.prop20 = window.location.href;
s.eVar1 = s.pageName; //s.pageName
s.eVar8 = s.prop1;	// franchise
s.eVar9 = s.prop2; // title
s.eVar10 = s.channel; // section
}
