function execSiteCatalyst() {

	var title = document.title;
	var pageTitle = /^([^:]+)/.exec(title)[1];//non-office page titles are formatted like "Professional : Dan Day : Northwestern Mutual Wealth Management Company", we want "Professional"
	
	if ( (siteSection == "Home") || (window.location.pathname == "/") ) {
		pageTitle = "Home Page";
	} else if (siteSection == "Video") {//page titles look like "Dan Day : Northwestern Mutual Wealth Management Company : Video", we want "Video"
		pageTitle = "Video";
	} else if (template == "Office") {//office page titles are formatted like "Northwestern Network : The Qualy Group : Management Team", we want "Management Team"
		pageTitle = /([^:]+)$/.exec(title)[1];
	} else if (siteSection == "Resource Center/Articles") {//page titles look like "Dan Day : Northwestern Mutual Wealth Management Company - Using Diversification to Combat Risk : Article: Using Diversification to Combat Risk", we want "Using Diversification to Combat Risk"
		pageTitle = "Article-" + /([^:]+)$/.exec(title)[1];
	}
	
	pageTitle = pageTitle.replace(/^\s*|\s*$/, "");//left and right trim

	var pageName = template + "-" + pageTitle;

	var channel = "FWS/" + template + "/" + siteSection;//siteSection variable declared inline with HTML.

	s.pageName=pageName;//name of current page
	s.server="";//server ID if app is distributed
	s.channel=channel;//site section
	s.hier1=channel;//page hierarchy, uses same logic as channel
	s.pageType="";//set to errorPage on custom error pages
	s.prop1="";//search term
	s.prop2="";//# search results
	s.prop3="";//self-service type
	s.prop4="";//tool name
	s.prop5=agentNum;//AGENT ID.  Variable declared inline with HTML.  For offices it is 6 digit NONum + DNONum
	s.prop6="";//client status
	s.prop7="";//time parting hour (automatically set)
	s.prop8="";//time parting day (automatically set)
	s.prop9="";//application ID
	s.prop13=agentType;//ex: FR, MP, ...  Variable declared inline with HTML.
	s.prop14=template;//ex: WMAWMC, Office, ...  Variable declared inline with HTML.
	s.prop20=NoNum;//Network Office Number
	s.prop21=DNoNum;//District Network Office Number
	s.prop22=NoNum + DNoNum;//6 digit number contain NO and DNO num
	s.prop23=agentType + "|" + agentNum + "|" + template;
	/* Conversion Variables */
	s.campaign="";//set manually or automatically set when cmpid param is in query string
	s.state="";
	s.zip="";
	s.events="";//set to event6 for application start, event7 for application complete.  prop9 must have the same value on both the start and complete page
	s.products="";
	s.purchaseID="";
	s.eVar1="";//automatically set
	s.eVar2="";//automatically set
	s.eVar3="";//automatically set
	s.eVar4="";//automatically set
	s.eVar5="";//automatically set
	s.eVar6="";//automatically set
	s.eVar7="";//automatically set
	s.eVar8="";//automatically set
	s.eVar9="";//automatically set
	s.eVar20=s.prop20;
	s.eVar21=s.prop21;
	s.eVar22=s.prop22;
	s.eVar23=s.prop23;
	
	try {
		s.t();
	} catch (err) {
		//do nothing
	}
}

//execSiteCatalyst();//run immediately, may cause problems if DOM readiness is required to set SiteCatalyst variables (ex: you need to use document.getElementByID())
//window.onload = execSiteCatalyst;//run when page is done loading (DOM is ready), may conflict with other javascript using this event

//add SiteCatalyst execution to window.onload queue
var oldonload = window.onload;

if (typeof window.onload != 'function') {
	window.onload = execSiteCatalyst;
} else {
	window.onload = function() {
		oldonload();
		execSiteCatalyst();
	}
}


