/*                                                                 */
/* ================== Site-specific settings ======================*/
/* ================== for  Raleigh N&O       ======================*/
/* ==================== Version 121603 ============================*/
/*                                                                 */
var host = window.location.hostname;
var qs = window.location.search;
var sections = window.location.pathname.split("/");
var nao_tail = "";
var mcc_tail = "";
var third_party = 0;
// temporary addition to locate rogue pages...
// var override_URL;if(!override_URL)override_URL="G5-"+document.URL;

// remove editions from webpath array
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)day$/))
	{sections.splice(1,1);}

/////////////// THIRD PARTY / SEARCH SECTIONS
// this works if you send them stats code that calls the stats_local.js file off your site
if (host.match(/cars\.com/)) {
	third_party = 1;
	mcc_tail = "NO|TRI|TP-CR|Class|Automotive";
	nao_tail = "MISCELLANEOUS - Automotive";
	}
else if (host.match(/apartments\.com/)) {
	third_party = 1;
	mcc_tail = "NO|TRI|TP-AP|Class|Real_Estate";
	nao_tail = "MISCELLANEOUS - Rentals";
	}
else if (host.match(/capwiz\.com/)) {
	third_party = 1;
	mcc_tail = "NO|NAO|TP-CW|News|Nation_World";
	nao_tail = "NEWS - Nation & World";
	}
else if (host.match(/head2head\.com/)) {
	third_party = 1;
	mcc_tail = "NO|NAO|TP-HH|News|Sports";
	nao_tail = "SPORTS";
	}
else if (host.match(/switchboard\.com/)) {
	third_party = 1;
	mcc_tail = "NO|TRI|TP-SW|Class";
	nao_tail = "LIFESTYLES - Directory";
	}
else if (host.match(/(employmentwizard|careersite)/)) {
	third_party = 1;
	mcc_tail = "NO|TJ|TP-CS|Class|Employment";
	var re_cs1 = /vaui|candidate/;
	var re_cs2 = /vrui|employer/;
	var dir_cs = sections[2];
	if (dir_cs.match(re_cs1)) {
		nao_tail = "TriangleJobs.com - Job Seekers";
    		}
	else if (dir_cs.match(re_cs2)) {
		nao_tail = "TriangleJobs.com - Employers";
    		}
	else {
		nao_tail = "TriangleJobs";
		}
	}
else if (host.match(/financialcontent\.com/)) {
	third_party = 1;
	mcc_tail = "NO|NAO|TP-FC|News|Business";
	nao_tail = "BUSINESS - Stocks";
	}
else if (host.match(/wsj\.com/)) {
	third_party = 1;
	mcc_tail = "NO|NAO|TP-WS|News|Business";
	nao_tail = "BUSINESS - Personal Finance";
	}
else if (host.match(/p2i/)) {
	third_party = 1;
	mcc_tail = "NO|TP-PT|Other";
	nao_tail = "LIFESTYLES - Marketplace";
	}
else if (host.match(/(localsearch|planetdiscover)/)) {
	third_party = 1;
	mcc_tail = "NO|TRI|TP-PD|News|Search";
	nao_tail = "LIFESTYLES - Directory";
	}
else if (host.match(/forums\.triangle\.com/)) {
        third_party = 1;
        mcc_tail = "NO|TRI|TP-WC|Other";
        nao_tail = "MISCELLANEOUS - Communities";
        }
else if (host.match(/ncneighbors\.com/)) {
        third_party = 1;
        mcc_tail = "NO|TP-YT|News|Local";
        nao_tail = "MISCELLANEOUS - Communities";
        }
else if ((host.match(/triangle\.teetimeking\.com/)) || host.match(/golf\.triangle\.com/)) {
        third_party = 1;
        mcc_tail = "NO|TRI|TP-TK|Other";
        nao_tail = "SPORTS - Golf";
        }
else if (host.match(/146\.145\.120\.3/)) {
        third_party = 1;
        mcc_tail = "NO|NAO|News|Sports|College";
        nao_tail = "SPORTS - College Sports";
        }
else if (host.match(/wunderground\.com/)) { 
        third_party = 1;
        mcc_tail = "NO|NAO|News"; 
        nao_tail = "MISCELLANEOUS - Weather";
        }
else if (host.match(/newsobserver\.typepad\.com/)) {
        third_party = 1; 
        mcc_tail = "NO|NAO|News"; 
        nao_tail = "LIFESTYLES - Food & Fitness";
        } 
else if (host.match(/homefinder\.com/)) {
        third_party = 1;
        mcc_tail = "NO|TRI|TP-HS|Class|Real_Estate";
        nao_tail = "MISCELLANEOUS - Real Estate";
        }
else if (host.match(/miva\.nando\.com/)) {
        third_party = 1; 
        mcc_tail = "NO|NAO|Other";
        nao_tail = "MISCELLANEOUS - Member Center";
        } 
else if (host.match(/blogs/)) {
        third_party = 1;
        mcc_tail = "NO|NAO|News|Local";
        nao_tail = "NEWS - Local & State";
        }



// If we are processing a third-party site, set the override fields.
if (third_party == 1) {
	override_prop6 = mcc_tail;
	var override_channel = nao_tail;
	}

// If it's one of our DWB-hosted sites, tho, do some other stuff:
else {
	if ((override_channel == 'digest') ||
	    (override_channel == 'opinion') ||
	    (override_channel == '_front') ||
            (override_channel == 'front') ||
            (override_channel == '_news') ||
            (override_channel == '_features') ||
            (override_channel == 'edwards') ||
            (override_channel == '_sports') ||
            (override_channel == 'business') ||
            (override_channel == 'preps') ||
            (override_channel == 'football') ||
            (override_channel == 'community') ||
            (override_channel == 'hurricanes') ||
            (override_channel == 'entertainment') ||
            (override_channel == '_editorials') ||
            (override_channel == 'sports') ||
            (override_channel == 'coverage') ||
            (override_channel == 'chapelhill') ||
            (override_channel == '_business') ||
            (override_channel == 'Stockcar racing') ||
            (override_channel == 'womens_basketball') ||
            (override_channel == 'legislature') ||
            (override_channel == 'ncpolitics') ||
            (override_channel == 'ncelections') || 
            (override_channel == 'unc') || 
            (override_channel == 'wup') || 
            (override_channel == 'duke') || 
            (override_channel == 'multimedia') || 
            (override_channel == 'news') || 
            (override_channel == 'Front') || 
            (override_channel == 'columnist') || 
            (override_channel == 'college') || 
            (override_channel == 'ourlives') || 
            (override_channel == 'schedule') || 
            (override_channel == 'Features') || 
            (override_channel == 'ncnews') || 
            (override_channel == 'technology') || 
            (override_channel == 'Election') ||
            (override_channel == 'nation') || 
            (override_channel == 'columnists') || 
            (override_channel == 'panthers') || 
            (override_channel == 'issues') || 
            (override_channel == 'wfu') || 
            (override_channel == 'Mens basketball') || 
            (override_channel == 'jackson') || 
            (override_channel == 'bloom') || 
            (override_channel == 'Business') || 
            (override_channel == 'Tours') || 
            (override_channel == 'traffic') || 
            (override_channel == 'outdoors') || 
            (override_channel == 'gell') || 
            (override_channel == 'hotlists') || 
            (override_channel == 'Nfl') || 
            (override_channel == 'communities') || 
            (override_channel == 'Galleries') || 
            (override_channel == 'sheehan') || 
            (override_channel == 'rogers') || 
            (override_channel == 'ncsports') || 
            (override_channel == 'storm') || 
            (override_channel == 'kinstonfire') || 
            (override_channel == 'holly') || 
            (override_channel == 'dining') || 
            (override_channel == 'letters') || 
            (override_channel == 'pros') || 
            (override_channel == 'olf') || 
            (override_channel == '24hour') || 
            (override_channel == 'iraq_2004') || 
            (override_channel == 'saunders') || 
            (override_channel == 'acc_2004') || 
            (override_channel == 'previews') || 
            (override_channel == 'Mlb') || 
            (override_channel == 'cockshutt') || 
            (override_channel == 'nfl') || 
            (override_channel == 'science') || 
            (override_channel == 'phipps') || 
            (override_channel == 'stevens') || 
            (override_channel == 'nascar') || 
            (override_channel == 'Golf') || 
            (override_channel == 'decock') || 
            (override_channel == 'investigation') || 
            (override_channel == 'dome') || 
            (override_channel == 'other_sports') || 
            (override_channel == 'bookclub') || 
            (override_channel == 'arts') || 
            (override_channel == '2003') || 
            (override_channel == 'world') || 
            (override_channel == 'isabel') || 
            (override_channel == 'opinions') || 
            (override_channel == 'triangle') || 
            (override_channel == 'ecu') || 
            (override_channel == 'iraq') || 
            (override_channel == 'snow') || 
            (override_channel == 'Game 4 FSU vs. N.C. State  (7 p.m.)') || 
	    (override_channel == '/front')) {
		override_channel = 'MISCELLANEOUS - Obsolete Channel';
		override_prop6 = 'NO|Other';
	}
	else if (override_channel == 'POLITICS') {
		override_channel = 'MISCELLANEOUS - Politics';
		override_prop6 = 'NO|NAO|News|Nation_World';
	}
        else if (override_channel == 'THINGS TO DO') {
                override_channel = 'LIFESTYLES';
                override_prop6 = 'NO|NAO|News';
        }
        else if (override_channel == 'NEWS - Triangle/NC News') {
                override_channel = 'NEWS - Local & State';
                override_prop6 = 'NO|NAO|News|Local';
        }
	if (!override_prop6) {
		override_prop6 = "NO|Unknown";
	}
}

var default_pageName='';/* Blank defaults to HTML page title */
var default_server='';/* Blank defaults to host domain if available */
var default_channel='';/* Blank defaults to high-level path if available */
var default_pageType='';/* Blank defaults to blank */
var default_pageValue='';/* Blank defaults to blank */
var default_product='';/* Blank defaults to blank */
var default_URL=document.location.href;

/* modified on 10/27/2003, if the page is an index page, assign URL to prop9 */
var href_array_local = document.location.href.split("/");
var fileandtag_local = href_array_local[href_array_local.length-1];
var tagstrip_local = fileandtag_local.split("\#");
var fileandquery_local = tagstrip_local[0];
var querystrip_local = fileandquery_local.split("\?");
var filename_local = querystrip_local[0];
if (filename_local == "" || filename_local == "index.html" || filename_local == "index.htm")
{
   var override_prop9 = default_URL;
}
/* end modification */

var default_version='';/* Blank defaults to blank */
var default_pagelevel='';/* Blank defaults to section vs. front calculation */
var default_content_source='';/* Blank defaults to blank */
var default_prop5='';/* Blank defaults to blank */
var default_prop6='';/* Blank defaults to blank */
var default_prop7='';/* Blank defaults to blank */
var default_prop8='';/* Blank defaults to blank */
var default_prop9='';/* Blank defaults to blank */
var default_prop10='';/* Blank defaults to blank */
/*                                                                 */
/* ++++++++++++++++++++ New code as of 121603 ++++++++++++++++++++ */
/*                                                                 */
var default_prop11='';/* Blank defaults to blank */
/*                                                                 */
var default_dynamicAccountSelection=false; /* Set to true to turn on dyanamic account selection */
var default_dynamicAccountList='nmtracking,nmtesttest=docs.nandomedia';
/*                 Set to form of account(s)=matching_string,account(s)=matching_string, etc.
                   where account is the site identifier and matching string is either the domain 
                   or a string that will be matched against the dynamicAccountMatch string.
                   The stats will go to the first account group that matches. To send to multiple
                   accounts, separate the site identifiers by a comma.                         */
var default_dynamicAccountMatch='docs.nandomedia'; /* Blank defaults to matching against domain */

var reserve_popular_stories=false;/* This causes stats.js to ignore attempts to set prop10 and prop11 so that they are clear for use by popular pages code */
        /* Do NOT set this to true for Modesto as long as their popular pages code 
           attempts to directly set s_prop11.       */
var popular_headline_min_length=20; /* Set a minimum length of a headline in case it has to be truncated in the list */
var popular_root_url1=''; /* e.g., 'http://www.modbee.com' */
var popular_root_url2='';
        /* These two should be set to the two most common root URLs used in the 
           URLs of stories being measured for Most Popular Story. 
           Both root URLs should refer to the same doc root.  */
/*                                                                 */
/* ++++++++++++++++++++++++ End new code +++++++++++++++++++++++++ */
/*                                                                 */
var default_trackDownloadLinks=false;/* Set to true to enable tracking of downloads */
var default_linkDownloadFileTypes='aif,aiff,aifc,au,avi,dif,doc,dv,exe,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';
/* Only files types listed in the string will be tracked */
/*                                                                 */
var default_trackExternalLinks=false;/* Set to true to track outside links */
//var default_linkInternalFilters="nandomedia,nando,nandotimes,sportserver";
var default_linkInternalFilters="";
/* List internal i.e., non-tracked domains in string */
/*                                                                 */
var default_channels_by_server=false;/* Prefix server name in channel report */
var default_pages_by_channel=false; /* Add channel name to page name prefix (after server name) */
var default_pages_by_server=true;/* Prefix server name to page name */
/*                                                                 */
var prefix_spacer_prepage=' -- ';/* No override. This can be set only sitewide */
var prefix_spacer_prechannel=' | ';/* No override. This can be set only sitewide */
/*


/*                                                                 */
/* ================= End Site-specific settings ===================*/
/*                                                                 */

