var tL=String(d.location);
var bfngi = "business finance-news-globeinvestor";
var bftgi = "business finance-tools-globeinvestor";
var bftgittr = bftgi+"-tracking tools-reports";
s.channel="globeinvestor";
s.server=window.location.hostname;

pdArr=getCookie('userinfo');
if(pdArr){ 
	pdArr=pdArr.split("|"); 
	s.prop1=pdArr[0];
	s.prop2=pdArr[1]; 
	s.prop3=pdArr[2]; 
	s.prop4=pdArr[3]; 
	s.prop5=(s.prop3 !="" || s.prop4!="") ? "registrant" : "na";
	s.prop6=pdArr[4];
}
	
s.eVar1=s.prop1;s.eVar2=s.prop2;s.eVar3=s.prop3;s.eVar4=s.prop4;s.eVar5=s.prop5;s.eVar6=s.prop6;s.eVar7=s.channel;
	
// place the base url into sprop15
if(tL.indexOf("?")>-1){
	OmnBaseUrl=tL.split("?");
	s.prop15=String(OmnBaseUrl[0]);
} else {
	s.prop15=tL;
}

function getUrlParam(token)	{
	var query = window.location.search.substring(1);
 	var vars = query.split("&");
 	for (i=0;i<vars.length;i++){
   	var pair = vars[i].split("=");
   	if (pair[0] == token){
    	return pair[1];
   	}
	}
}

if(tL.indexOf("filters-intraday")>-1){
	s.pageName=bfngi+"-news search";
} else if(tL.indexOf("company_news")>-1){
	s.pageName=bfngi+"-news for a symbol";
} else if(tL.indexOf("stock_list_news")>-1){
	s.pageName=bfngi+"-stocklist news";}

// tracking tools evaluations
else if(tL.indexOf("quotes")>-1){
	s.pageName=bftgi+"-tracking tools-quotes-symbol entry";
} else if(tL.indexOf("stock_today")>-1 || tL.indexOf("index_today")>-1){
	s.pageName=bftgi+"-tracking tools-quotes-index quote";
} else if(tL.indexOf("lookup")>-1){
	s.pageName=bftgi+"-tracking tools-quotes-symbol lookup";
} else if(tL.indexOf("pal_list")>-1 || tL.indexOf("pal_list_refresh")>-1){
	s.pageName=bftgi+"-tracking tools-quotes-quote pal";
} else if(tL.indexOf("upd_stx_list")>-1){
	s.pageName=bftgi+"-tracking tools-stocklist-create stocklist";}

// market actions evaluations
else if(tL.indexOf("pi_type=best")>-1){
	s.pageName=bftgi+"-market action-gainers";
} else if(tL.indexOf("pi_type=worst")>-1){
	s.pageName=bftgi+"-market action-losers";
} else if(tL.indexOf("pi_type=active")>-1){
	s.pageName=bftgi+"-market action-most actives";
} else if(tL.indexOf("newhighlow_search")>-1){
	s.pageName=bftgi+"-market action-new high low";}

// stock reports
else if(tL.indexOf("stock_rep")>-1 && tL.indexOf("SECLIST")>-1){
	s.pageName=bftgi+"-tracking tools-stocklist-report";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("stock_rep")>-1 && tL.indexOf("DETAIL")>-1){
	s.pageName=bftgittr+"-price-quote";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("stock_rep")>-1 && tL.indexOf("NETPRICE")>-1){
	s.pageName=bftgittr+"-price-dol_change";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("stock_rep")>-1 && tL.indexOf("BASIC")>-1){
	s.pageName=bftgittr+"-price-per_change";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("stock_rep")>-1 && tL.indexOf("5STAR")>-1){
	s.pageName=bftgittr+"-price-5_star_rating";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("stock_rep")>-1 || tL.indexOf("index_grp_report")>-1){
	s.pageName=bftgittr+"-price-quote";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("symbol_rep")>-1){
	s.pageName=bftgittr+"-price-5_star_rating";
	s.prop9="gi_SYMBLIST";
} else if (tL.indexOf("hist_price_filter")>-1){
	s.pageName=bftgittr+"-price-5_star_rating";
	s.prop9="gi_HFILTER";
}
	
// company reports
else if(tL.indexOf("company_prof")>-1){
	s.pageName="business finance-tools-globeinvestor-research tools-company snapshot-report";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("company_rep")>-1 && tL.indexOf("LATEST")>-1){
	s.pageName=bftgittr+"-financial-quarterly";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("company_rep")>-1 && tL.indexOf("RATIO")>-1){
	s.pageName=bftgittr+"-financial-ratio";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("company_rep")>-1 && tL.indexOf("SUMMARY")>-1){
	s.pageName=bftgittr+"-financial-annual";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("company_rep")>-1 && tL.indexOf("COMPANY")>-1){
	s.pageName=bftgittr+"-financial-quarterly";
	s.prop9="gi_"+getUrlParam('pi_mode');
}				
	
//estimate reports	
else if(tL.indexOf("estimate_prof")>-1){
	s.pageName="business finance-tools-globeinvestor-research tools-estimate snapshot-report";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("estimate_rep")>-1 && tL.indexOf("SUMM")>-1){
	s.pageName=bftgittr+"-estimate-summary";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("estimate_rep")>-1 && tL.indexOf("HIST")>-1){
	s.pageName=bftgittr+"-estimate-recommendation";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("estimate_rep")>-1 && tL.indexOf("QUARTERLY")>-1){
	s.pageName=bftgittr+"-estimate-quarterly";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("estimate_rep")>-1 && tL.indexOf("ANNUAL")>-1){
	s.pageName=bftgittr+"-estimate-annual";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("estimate_rep")>-1 && tL.indexOf("NEWEST")>-1){
	s.pageName=bftgittr+"-estimate-calendar";
	s.prop9="gi_"+getUrlParam('pi_mode');
} else if(tL.indexOf("estimate_rep")>-1 && tL.indexOf("BW")>-1){
	s.pageName=bftgittr+"-estimate-% surprise";
	s.prop9="gi_"+getUrlParam('pi_mode');
}
	
else if(tL.indexOf("show_chart")>-1){
	s.pageName=bftgi+"-research tools-charts-"+getUrlParam('pl_period');
	s.prop9="gi_"+getUrlParam('URL_r_mode');
}
			
//price history evaluations
else if(tL.indexOf("price_history")>-1){
	s.pageName=bftgittr+"-price history";
}

//symbol lookup
 
else if(tL.indexOf("company_search")>-1 && tL.indexOf("iaction=INDEXLIST")>-1){
	s.pageName=bftgi+"-research tools-indexes-list";
}
else if(tL.indexOf("company_search")>-1 && tL.indexOf("pi_comp_name")>-1){
	s.pageName=bftgi+"-research tools-symbol lookup-result";
}
else if(tL.indexOf("company_search")>-1){
	s.pageName=bftgi+"-research tools-symbol lookup-symbol entry";
}
else if(tL.indexOf("estimate_snapshot?symbol_in=&iaction_in=estimate")>-1){
	s.pageName=bftgi+"-research tools-estimate snapshot-symbol entry";
}
else if(tL.indexOf("show_surprise")>-1){
	s.pageName=bftgi+"-tracking tools-reports-earnings surprises";
}


else if(tL.indexOf("port_rep.gen")>-1){
  if (tL.indexOf("STRONG")>-1){
	s.pageName=bfngi+"-features-carrick_portfolios2006-strong buy";
   }
  else if (tL.indexOf("UNDERPERFORM")>-1){
	s.pageName=bfngi+"-features-carrick_portfolios2006-underperform";
   }
  else {
    s.pageName="";
  }
}

else {
	s.pageName="";
}

if(s.prop9){ s.prop9 = s.prop9.toLowerCase(); }

// Hierarchy Variables 
s.pageType="";

// change the heir1 variable based on the above sPageName. -> "globe:"+formatted variable
if(s.pageName==""){
	tS=new String(bftgi+"-others");
} else {
	tS=new String(s.pageName);
}
rExp = /-/gi;
nS = new String(":");
s.hier1="globe:"+tS.replace(rExp, nS);

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)d.write(s_code);