s_om.server=window.location.hostname;




function trackMarketWatch() {
	
}

function findOffersRE(bodyString){
	//find soid from offer URLs
	//split on OM URL and look for soid at beginning of string.
	//soid must start with o= and end with ",',&,> or space.
	//if the soid contains 2 dashes only the first two groups of numbers are returned
	//soid must be numeric, dash is optional UNLESS CID is present, then both dashes are required.
	//on second thought, let's just say the dash in the soid is required, the second one is optional.
	var impString = "";
	var sPattern = /https:\/\/www64\.ameriprise\.com\/om\/FS\?rt=f.+[;&]o=/gi;
	var ar = bodyString.split(sPattern);
	var sStr
	var RE = new RegExp('(^[0-9]+\-?[0-9]+)[-&"\' >]')
	for (i=1;i<=ar.length-1;i++){
		if (RE.test(ar[i])){
			sStr=ar[i].match(RE);
			if(impString == ""){
				impString = RegExp.$1;
			}
			else{
				impString = impString + ",;" + RegExp.$1;
			}
		}
	}
	/* SiteCatalyst Variables */
	s_om.products=";"+impString;
	if (impString.length > 0) s_om.events="event13"; //offer impression only if offers are found
	
}

function parseURLPath() {
	//Parses URL path and sets channel and sprop1-3 based on directory structure.
	//set to only work in "amp" root directory
	var aURL= document.URL.toLowerCase().split("/");
	if (aURL.length > 4){
		if (aURL[3]=="amp"){
			//on ameriprise site
			if (aURL[4]=="default.asp"||aURL[4]=='') s_om.channel='Home Page';
				else{
					if (aURL.length>=6) s_om.channel=aURL[4];else s_om.channel='';
				}
			if (aURL.length>=7) s_om.prop1=aURL[5];else s_om.prop1='';
			if (aURL.length>=8) s_om.prop2=aURL[6];else s_om.prop2='';
			if (aURL.length>=9) s_om.prop3=aURL[7];else s_om.prop3='';
		}
		//place conditional code for other sites here.
	}
}
