var mcclatchy_cat="SAC|SB";
var host=window.location.hostname;
var qs=window.location.search;
var tail="";
var sections=window.location.pathname.split("/");

if (sections[1].match(/^\d\d-\d\d-\d\d\d\d$/)){
	sections.splice(1,1);
} else if (sections[1].match(/^(sun|mon|tues|wednes|thurs|fri|satur|to)day$/)){
	sections.splice(1,1);
}

if (host.match(/cars\.com/)) tail = "TP-CR|Class|Automotive";
else if (host.match(/apartments\.com/)) tail = "TP-AP|Class|Real_Estate|Rentals";
else if (host.match(/pqarchives/)) tail = "TP-AR|Other";
else if (host.match(/mycalendar/)) tail = "TP-MC|News|Entertainment";
else if (host.match(/capwiz\.com/)) tail = "TP-CW|News";
else if (host.match(/head2head\.com/)) tail = "TP-HH|News|Sports";
else if (host.match(/switchboard\.com/)) tail = "TP-SW|Other";
else if (host.match(/sacramento\.com/)) tail = "SAC|SA|Other";
else if (host.match(/careersite\.com/)) tail = "TP-CS|Class|Employment";
else if (host.match(/financialcontent\.com/)) tail = "TP-FC|News|Business";
else if (host.match(/p2i/)) tail = "TP-PT|Other";
else if (host.match(/pl1.nandomedia\.com/)) tail = "TP-MQ|Other";
else if (host.match(/uclick/)) tail = "TP-UC|News";
else if (host.match(/gdtnova/)) tail = "TP-GN|Class";
else if (host.match(/greatschools/)) tail = "TP-GS|Other";
else if (host.match(/healthology/)) tail = "TP-HG|Other";
else if (host.match(/adpay/)) tail = "TP-AY|Class";
else if (host.match(/legacy/)) tail = "TP-LG|Class";
else if (host.match(/cityfeet/)) tail = "TP-CF|Class|Real_Estate";
else if (host.match(/homescape/)) tail = "TP-HS|Class|Real_Estate";
else if (host.match(/homefinder/)) tail = "TP-HS|Class|Real_Estate";
else if (host.match(/interest/)) tail = "Class|Real_Estate";
else if (host.match(/mapquest/)) tail = "TP-MQ|Other";
else if (host.match(/marketplace/)) tail = "TP-HV|Retail";
else if (host.match(/localsearch.sacbee\.com/)) tail = "TP-PD|Retail";

/*
Apartments.com 	(TP-AP)	Class|Real_Estate
Associate Press hosted solutions 	(TP-AH)	News
Archives (ProQuest, Newsbank, etc.) 	(TP-AR)	News|Search
AdPay 	(TP-AY)	
CareerCast 	(TP-CC)	
Capwiz 	(TP-CW)	News
CareerSite/Employment Wizard 	(TP-CS)	Class|Employment
Cars.com 	(TP-CR)	
CityFeet 	(TP-CF)	
CityXpress 	(TP-CX)	
Classified Guys 	(TP-CG)	
Center for American Jobs 	(TP-CJ)	
Content that Works 	(TP-CN)	
Customcoupon.com 	(TP-CC)	
Databased Ads 	(TP-DB)	
Drupal	(TP-DR)	Other
Financial Content 	(TP-FC)	News|Business
FormRouter 	(TP-FR)	
Future of News 	(TP-FN)	
GDT Nova 	(TP-GN)	Class
Great Schools 	(TP-GS)	
Harvest Swift 	(TP-HV)	
Head2head 	(TP-HH)	News|Sports
Healthology 	(TP-HG)	
HomeScape/HomeFinder 	(TP-HS)	Class|Real_Estate
Internet 49 ISP 	(TP-IN)	
Ipix 	(TP-IX)	
Legacy.com 	(TP-LG)	News|Local|Search
MailCentro 	(TP-MA)	Other
MapQuest 	(TP-MQ)	Other
Maps.com 	(TP-MP)	Other
MyCalendar 	(TP-MC)	
MyCapture 	(TP-MT)	
P2i  	(TP-PT)	Other
People2people 	(TP-PP)	
Planet Discover 	(TP-PD)	Other|Search
Relational Networks 	(TP-RE)	
Salary.com  	(TP-SA)	Class|Employment
Sports Buff 	(TP-SB)	News|Sports
The Sports Network/XMLTeam 	(TP-SN)	News|Sports
Switchboard 	(TP-SW)	Other
Tee Time King 	(TP-TK)	
UClick 	(TP-UC)	
Universal Crossword 	(TP-UN)	
Wall Street Journal 	(TP-WS)	News|Business
Weather Underground 	(TP-WU)	News or News|Local
Web Crossing 	(TP-WC)	Other
Web Forums 	(TP-WF)	Other
West Host 	(TP-WH)	Other
Your Town 	(TP-YT)	

*/

/* ======================================== */

else if (host.match(/search/)) tail = "News|Search";
else if (host.match(/forums/)) tail = "News|Local";
else if (host.match(/chat/)) tail = "News|Local";
else if (host.match(/guide/)) tail = "Other";
else if (host.match(/data.sacbee\.com/)) tail = "News|Local";

else if (sections[1] == "static") {
	if (sections[3] == "ads") tail = "Other";
	else if (sections[3] == "adtemp") tail = "Other";
	else if (sections[3] == "bee") tail = "Other";
	else if (sections[3] == "business") tail = "News|Business";
	else if (sections[3] == "cars") tail = "Class|Automotive";
	else if (sections[3] == "classads") tail = "Class";
	else if (sections[3] == "business") {
		if (sections[4] == "careers") tail = "Class|Employment";
		else tail = "News|Business";
	}
	else if (sections[3] == "furniture") tail = "Class";
	else if (sections[3] == "home") tail = "Class|Real_Estate|Homes";
	else if (sections[3] == "homes") tail = "Class|Real_Estate|Homes";
	else if (sections[3] == "jobs") tail = "Class|Employment";
	else if (sections[3] == "sacramento") {	
		mcclatchy_cat="SAC|SA";
		tail = "Other";
	}
	else if (sections[3] == "search") tail = "Search";
	else if (sections[3] == "sitehelp") tail = "Other";
	else if (sections[3] == "shopping") tail = "Class";
	else if (sections[3] == "sports") tail = "News|Sports";
	else tail = "News|Local";
}

else if (sections[1] == "24hour") {
	if (sections[2] == "autos") tail = "Class|Automotive";
	else if (sections[2] == "jobs") tail = "Class|Employment";
	else if (sections[2] == "real_estate") tail = "Class|Real_Estate";
	else if (sections[2] == "business") tail = "News|Business";
	else if (sections[2] == "technology") tail = "News|Business";
	else if (sections[2] == "entertainment") {
		if (sections[3] == "movies") tail = "News|Entertainment|Movies";
		else if (sections[3] == "music") tail = "News|Entertainment|Music";
		else tail = "News|Entertainment";
	}
	else if (sections[3] == "game_reviews") tail = "News|Entertainment";
	else if (sections[2] == "breaking_news") tail = "News|Nation_World";
	else if (sections[2] == "front") tail = "News|Nation_World";
	else if (sections[2] == "galleries") tail = "News|Nation_World";
	else if (sections[2] == "nation") tail = "News|Nation_World";
	else if (sections[2] == "obituaries") tail = "News|Nation_World";
	else if (sections[2] == "opinions") tail = "News|Nation_World";
	else if (sections[2] == "photos") tail = "News|Nation_World";
	else if (sections[2] == "politics") tail = "News|Nation_World";
	else if (sections[2] == "special_reports") tail = "News|Nation_World";
	else if (sections[2] == "top") tail = "News|Nation_World";
	else if (sections[2] == "weird") tail = "News|Nation_World";
	else if (sections[2] == "world") tail = "News|Nation_World";
	else if (sections[2] == "sports") {
		if (sections[4] == "col") tail = "News|Sports|College";
		if (sections[3] == "nba_draft") tail = "News|Sports|College";
		if (sections[3] == "soccer") tail = "News|Sports|Pro";
		if (sections[3] == "tour_de_france") tail = "News|Sports|Pro";
		else tail = "News|Sports";
	}
	else if (sections[2] == "olympics") tail = "News|Sports";
	// covers health_science, home_garden, opinions, photos, travel, food_wine, religion
	else tail = "News";
}

else if (sections[1] == "classads") {
	if (sections[2] == "employment") tail = "Class|Employment";
	else if (sections[2] == "real_estate") tail = "Class|Real_Estate";
	else if (sections[2] == "homes") tail = "Class|Real_Estate|Homes";
	else if (sections[2] == "rentals") tail = "Class|Real_Estate|Rentals";
	else if (sections[2] == "transportation") tail = "Class|Automotive";
	else tail = "Class";
}
else if (sections[1] == "classified") {
	if (sections[2] == "employment") tail = "Class|Employment";
	else if (sections[2] == "real_estate") tail = "Class|Real_Estate";
	else if (sections[2] == "homes") tail = "Class|Real_Estate|Homes";
	else if (sections[2] == "rentals") tail = "Class|Real_Estate|Rentals";
	else if (sections[2] == "transportation") tail = "Class|Automotive";
	else tail = "Class";
}
else if (sections[1] == "onboard" || sections[2] == "onboard") tail = "Class|Real_Estate";

else if (sections[1] == "content") {
	if (sections[2] == "business") tail = "News|Business";
	else if (sections[3] == "careers") tail = "Class|Employment";
	else if (sections[2] == "cars") tail = "TP-CR|Class|Automotive";
	else if (sections[2] == "homes") tail = "Class|Real_Estate|Homes";
	else if (sections[2] == "community_news") tail = "News|Local";
	else if (sections[2] == "gallery") {
		if (sections[3] == "2002_nba_playoffs") tail = "News|Sports|Pro";
		else if (sections[3] == "kings_inc") tail = "News|Sports|Pro";
		else tail = "News|Local";
	}
	else if (sections[2] == "sports") {
		if (sections[3] == "baseball") tail = "News|Sports|Pro";
		else if (sections[3] == "basketball") tail = "News|Sports|Pro";
		else if (sections[3] == "colleges") tail = "News|Sports|College";
		else if (sections[3] == "football") tail = "News|Sports|Pro";
		else if (sections[3] == "highschool") tail = "News|Sports|Preps";
		else if (sections[3] == "horse_racing") tail = "News|Sports|Pro";
		else if (sections[3] == "motor") tail = "News|Sports|Pro";
		else if (sections[3] == "projects") tail = "News|Sports|Pro";
		else if (sections[3] == "tennis") tail = "News|Sports|Pro";
		else if (sections[3] == "trials") tail = "News|Sports|Pro";
		else tail = "News|Sports";
	}
	else if (sections[2] == "shopping") tail = "Class";
	else tail = "News|Local";
}

else if (sections[1] == "dwb_search") {	
	if (sections[2] == "vr") tail = "News|Search";
	else if (sections[2] == "cars") tail = "News|Search";
	else tail = "News|Search";
}

else if (sections[1] == "state_wire") {	
	if (sections[2] == "business") tail = "News|Business";
	else if (sections[2] == "entertainment") tail = "News|Entertainment";
	else if (sections[2] == "sports_stories") tail = "News|Sports";
	else if (sections[2] == "cars") tail = "Class|Automotive";
	else tail = "News|Local";
}

else if (sections[1] == "stats") tail = "News|Sports|Pro";
else if (sections[1] == "tsn-scripts") tail = "News|Sports|Pro";
else if (sections[1] == "vacations") tail = "Class";
else if (sections[1] == "jackpot") tail = "News|Local";
else if (sections[1] == "mbr") tail = "News|Local";
else if (sections[1] == "marketguide") tail = "News|Local";
else if (sections[1] == "lottery") tail = "News|Local";
else if (sections[1] == "7day_archive") tail = "News|Local";
else if (sections[1] == "dwb_gallery") tail = "News|Local";
else if (sections[1] == "search_tmpl") tail = "News|Search";
else if (sections[1] == "cgi-bin") tail = "News|Local";
else if (sections[1] == "front") tail = "News";
else if (sections[1] == "subscribers") tail = "Other";
else if (sections[1] == "register-bin") tail = "Other";
else if (sections[1] == "registration") tail = "Other";
else if (sections[1] == "user_registration") tail = "Other";
else if (sections[1] == "dwb_register") tail = "Other";
else if (sections[1] == "dwb_classads") tail = "Class|Search";

else if (sections[1] == "portal") {	
	mcclatchy_cat="SAC|SA";
	tail = "Other";
}

else if (!sections[1]) tail = "News";
else if (sections[1] == "") tail = "News";
else if (sections[1] == "index.html") tail = "News";
else tail = "Unknown";
//document.write('<span style="font-size:9px; color:#ccc;">' + tail + '</span>');

override_prop6 = mcclatchy_cat + "|" + tail;
//override_prop1 = mcclatchy_cat + "|" + tail + "|" + document.title + "|" + window.location.href;
override_prop7 = override_prop7;
//override_pagelevel = "G5 - " + document.title + "|" + window.location.href

/* ======================================== */

var default_account="nmsacramento";
var default_server="Sacbee";
var default_split_url = true;
var default_dynamicAccountSelection=false;
var default_dynamicAccountList="";
var default_dynamicAccountMatch="";
var reserve_popular_stories=false;
var popular_headline_min_length=20;
var popular_root_url1="http://www.sacbee.com";
var popular_root_url2="http://www.sacbee.com";
var default_trackDownloadLinks=true;
var default_linkDownloadFileTypes="aif,aiff,aifc,au,avi,dif,doc,dv,exe,m3u,mid,midi,mov,mpg,mp2,mp3,mpeg,mpv2,msg,pdf,ppt,pps,qtl,ra,ram,rm,rpm,rv,txt,vbe,wav,wm,wma,wmv,wvx,xls,zip";
var default_trackExternalLinks=false;
var default_linkInternalFilters="sacbee,sacramento,sacticket";
var default_trackInlineStats=true;
var default_linkLeaveQueryString=false;
var default_linkTrackVars="None";
var default_linkTrackEvents="None";
var default_channels_by_server=false;
var default_pages_by_channel=false;
var default_pages_by_server=true;
var prefix_spacer_prepage=" -- ";
var prefix_spacer_prechannel=" | ";
var default_pageName="";
var default_channel="";
var default_pageType="";
var default_pageValue="";
var default_product="";
var default_URL=window.location.href;
var default_version="";
var default_pagelevel="";
var default_content_source="";
var default_prop5="";
var default_prop6="";
var default_prop7="";
var default_prop8="";
var default_prop9="";
var default_prop10="";
var default_prop11="";
var default_prop12="";
var default_usePlugins=true;

/* ======================================== */

/*                                                                 */
var car_make, car_model, car_zip;
if (car_make || car_model || car_zip) {
	var override_prop7;
	if (!override_prop7) override_prop7=car_make+"|"+car_model+"|"+car_zip;
}

var reserve_popular_stories=true;
var measure_popularity=true;
var popular_headline_min_length=20;
var popular_root_url1='http://www.sacbee.com';
