GA_category_sites = Array();
GA_category_sites['il-cambridge'] = 1;
GA_category_sites['il-galva'] = 1;
GA_category_sites['il-orion'] = 1;
GA_category_sites['il-geneseo'] = 1;
GA_category_sites['ar-stuttgart'] = 1;
GA_category_sites['ar-whitehall'] = 1;
GA_category_sites['ar-helena'] = 1;
GA_category_sites['de-dover'] = 1;
GA_category_sites['de-sussex'] = 1;
GA_category_sites['de-milford'] = 1;
GA_category_sites['de-middletown'] = 1;
GA_category_sites['de-smyrnaclayton'] = 1;
GA_category_sites['de-communitypub'] = 1;
GA_category_sites['il-freeport'] = 1;
GA_category_sites['mo-kirksville'] = 1;
GA_category_sites['mountshastaherald'] = 1;
GA_category_sites['ca-ridgecrest'] = 1;
GA_category_sites['siskiyoudailynews'] = 1;
GA_category_sites['mo-macon'] = 1;
GA_category_sites['mo-chillicothe'] = 1;
GA_category_sites['mo-brookfield'] = 1;
GA_category_sites['la-gonzales'] = 1;
GA_category_sites['la-donaldsonville'] = 1;
GA_category_sites['la-plaquemine'] = 1;
GA_category_sites['mi-coldwater'] = 1;
GA_category_sites['sulphurdailynews'] = 1;
GA_category_sites['il-kewanee'] = 1;
GA_category_sites['il-marion'] = 1;
GA_category_sites['deridderdailynews'] = 1;
GA_category_sites['la-bastrop'] = 1;
GA_category_sites['mi-sturgis'] = 1;
GA_category_sites['leesvilledailyleader'] = 1;
GA_category_sites['oh-newphil'] = 1;
GA_category_sites['norwich'] = 1;
GA_category_sites['il-peoria'] = 1;
GA_category_sites['il-springfield'] = 1;
GA_category_sites['rrstar'] = 1;
GA_category_sites['mo-lakelifestyles'] = 1;
GA_category_sites['oh-massillon'] = 1;
GA_category_sites['mo-camdenton'] = 1;
GA_category_sites['mo-laurie'] = 1;
GA_category_sites['il-chester'] = 1;
GA_category_sites['il-murphysboro'] = 1;
GA_category_sites['il-westfrankfort'] = 1;
GA_category_sites['il-duquoin'] = 1;
GA_category_sites['il-harrisburg'] = 1;
GA_category_sites['il-benton'] = 1;
GA_category_sites['woc_addison'] = 1;
GA_category_sites['woc_bartlett'] = 1;
GA_category_sites['woc_batavia'] = 1;
GA_category_sites['woc_bensenville'] = 1;
GA_category_sites['woc_berkeley'] = 1;
GA_category_sites['woc_berwyn'] = 1;
GA_category_sites['woc_bloomingdale'] = 1;
GA_category_sites['woc_bolingbrook'] = 1;
GA_category_sites['woc_broadview'] = 1;
GA_category_sites['woc_brookfield'] = 1;
GA_category_sites['woc_burrridge'] = 1;
GA_category_sites['woc_carolstream'] = 1;
GA_category_sites['woc_cicero'] = 1;
GA_category_sites['woc_clarendonhills'] = 1;
GA_category_sites['woc_countryside'] = 1;
GA_category_sites['woc_darien'] = 1;
GA_category_sites['woc_downersgrove'] = 1;
GA_category_sites['woc_elmhurst'] = 1;
GA_category_sites['woc_forestview'] = 1;
GA_category_sites['woc_geneva'] = 1;
GA_category_sites['woc_glendaleheights'] = 1;
GA_category_sites['woc_glenellyn'] = 1;
GA_category_sites['woc_hanoverpark'] = 1;
GA_category_sites['woc_hillside'] = 1;
GA_category_sites['woc_hinsdale'] = 1;
GA_category_sites['woc_hodgkins'] = 1;
GA_category_sites['woc_huntley'] = 1;
GA_category_sites['woc_indianheadpark'] = 1;
GA_category_sites['woc_itasca'] = 1;
GA_category_sites['woc_lagrange'] = 1;
GA_category_sites['woc_lagrangepark'] = 1;
GA_category_sites['woc_lemont'] = 1;
GA_category_sites['woc_lisle'] = 1;
GA_category_sites['woc_lombard'] = 1;
GA_category_sites['woc_lyons'] = 1;
GA_category_sites['woc_marengo'] = 1;
GA_category_sites['woc_mccook'] = 1;
GA_category_sites['woc_naperville'] = 1;
GA_category_sites['woc_northriverside'] = 1;
GA_category_sites['woc_oakbrook'] = 1;
GA_category_sites['woc_oakbrookterrace'] = 1;
GA_category_sites['woc_riverside'] = 1;
GA_category_sites['woc_romeoville'] = 1;
GA_category_sites['woc_roselle'] = 1;
GA_category_sites['woc_stcharles'] = 1;
GA_category_sites['woc_stickney'] = 1;
GA_category_sites['woc_streamwood'] = 1;
GA_category_sites['woc_villapark'] = 1;
GA_category_sites['woc_warrenville'] = 1;
GA_category_sites['woc_wayne'] = 1;
GA_category_sites['woc_westchester'] = 1;
GA_category_sites['woc_westchicago'] = 1;
GA_category_sites['woc_westernsprings'] = 1;
GA_category_sites['woc_westmont'] = 1;
GA_category_sites['woc_wheaton'] = 1;
GA_category_sites['woc_willowbrook'] = 1;
GA_category_sites['woc_willowsprings'] = 1;
GA_category_sites['woc_winfield'] = 1;
GA_category_sites['woc_wooddale'] = 1;
GA_category_sites['woc_woodridge'] = 1;
GA_category_sites['leavenworthtimes'] = 1;
GA_category_sites['ks-lansing'] = 1;
GA_category_sites['augustagazette'] = 1;
GA_category_sites['auroraadvertiser'] = 1;
GA_category_sites['boonvilledailynews'] = 1;
GA_category_sites['carthagepress'] = 1;
GA_category_sites['chillicothetimesbulletin'] = 1;
GA_category_sites['corningleader'] = 1;
GA_category_sites['crescotimes'] = 1;
GA_category_sites['eldoradotimes'] = 1;
GA_category_sites['hawleynewseagle'] = 1;
GA_category_sites['herkimertelegram'] = 1;
GA_category_sites['herrinspokesman'] = 1;
GA_category_sites['hornelleveningtribune'] = 1;
GA_category_sites['il-freeport'] = 1;
GA_category_sites['il-lincoln'] = 1;
GA_category_sites['il-monmouth'] = 1;
GA_category_sites['kirksvilledailyexpress'] = 1;
GA_category_sites['ks-mcpherson'] = 1;
GA_category_sites['ks-pratt'] = 1;
GA_category_sites['lajuntatribunedemocrat'] = 1;
GA_category_sites['lenaweedailytelegram'] = 1;
GA_category_sites['littlefallstimes'] = 1;
GA_category_sites['macombjournal'] = 1;
GA_category_sites['maconchronicleherald'] = 1;
GA_category_sites['mariondailyrepublican'] = 1;
GA_category_sites['maryvilledailyforum'] = 1;
GA_category_sites['mexicoledger'] = 1;
GA_category_sites['miltonstandardjournal'] = 1;
GA_category_sites['mineraldailynewstribune'] = 1;
GA_category_sites['mo-brookfield'] = 1;
GA_category_sites['mo-kirksville'] = 1;
GA_category_sites['mo-macon'] = 1;
GA_category_sites['mo-mexico'] = 1;
GA_category_sites['mo-moberly'] = 1;
GA_category_sites['mountshastaherald'] = 1;
GA_category_sites['mpnnow'] = 1;
GA_category_sites['neoshodailynews'] = 1;
GA_category_sites['oswegopalladiumtimes'] = 1;
GA_category_sites['ridgecrestdailyindependent'] = 1;
GA_category_sites['rolladailynews'] = 1;
GA_category_sites['sayremorningtimes'] = 1;
GA_category_sites['siskiyoudailynews'] = 1;
GA_category_sites['stjamesleaderjournal'] = 1;
GA_category_sites['sturgisjournal'] = 1;
GA_category_sites['sulphurdailynews'] = 1;
GA_category_sites['wayneindependent'] = 1;
GA_category_sites['waynesbororecordherald'] = 1;
GA_category_sites['waynesvilledailyguide'] = 1;
GA_category_sites['wellingtondailynews'] = 1;
GA_category_sites['wellsvilledailyreporter'] = 1;
GA_category_sites['westfrankfortdailyamerican'] = 1;
GA_category_sites['il-olney'] = 1;
GA_category_sites['ca-gridley'] = 1;
GA_category_sites['il-newton'] = 1;
GA_category_sites['il-teutopolis'] = 1;
GA_category_sites['il-flora'] = 1;
GA_category_sites['il-carmi'] = 1;
GA_category_sites['ks-kansascity'] = 1;
GA_category_sites['derbyreporter'] = 1;
GA_category_sites['il-sitrader'] = 1;
GA_category_sites['mo-bignickel'] = 1;
GA_category_sites['il-pekin'] = 1;
GA_category_sites['il-pontiac'] = 1;
GA_category_sites['il-aledo'] = 1;
GA_category_sites['wv-ripley'] = 1;
GA_category_sites['utica'] = 1;
GA_category_sites['oh-green'] = 1;
GA_category_sites['ia-charlescity'] = 1;
GA_category_sites['ar-arkadelphia'] = 1;
GA_category_sites['pennyanchronicleexpress'] = 1;
GA_category_sites['mi-cheboygan'] = 1;
GA_category_sites['il-heartlandhorseman'] = 1;
GA_category_sites['agjournalonline'] = 1;
GA_category_sites['ar-hope'] = 1;
GA_category_sites['ar-prescott'] = 1;
GA_category_sites['ar-gurdon'] = 1;
GA_category_sites['ar-hebersprings'] = 1;
GA_category_sites['ar-newport'] = 1;
GA_category_sites['mi-saultstemarie'] = 1;
GA_category_sites['mo-greenfield'] = 1;
GA_category_sites['il-galesburg'] = 1;
GA_category_sites['mn-crookston'] = 1;
GA_category_sites['il-bradleyhoops'] = 1;
GA_category_sites['il-canton'] = 1;




GA_section_aliases = Array();
GA_section_aliases['lifestyles'] = 'lifestyle';
GA_section_aliases['opinion'] = 'opinions';
GA_section_aliases['video'] = 'videos';
GA_section_aliases['obits'] = 'obituaries';
GA_section_aliases['classifieds'] = 'class-general';
GA_section_aliases['state_news'] = 'state';
GA_section_aliases['news_buisness'] = 'news_business';

GA_section_aliases['crimes_and_courts'] = 'news';
GA_section_aliases['schools'] = 'news';
GA_section_aliases['government'] = 'news';
GA_section_aliases['election'] = 'news';
GA_section_aliases['ohio'] = 'news';
GA_section_aliases['world'] = 'news';

GA_section_aliases['communities'] = 'news';
GA_section_aliases['canton'] = 'news';
GA_section_aliases['north_canton'] = 'news';
GA_section_aliases['jackson'] = 'news';
GA_section_aliases['plain'] = 'news';
GA_section_aliases['perry'] = 'news';
GA_section_aliases['massillon'] = 'news';
GA_section_aliases['hartville'] = 'news';
GA_section_aliases['louisville'] = 'news';
GA_section_aliases['alliance'] = 'news';
GA_section_aliases['canal_fulton'] = 'news';
GA_section_aliases['carroll'] = 'news';

GA_section_aliases['multimedia'] = 'news';

GA_section_aliases['high_school'] = 'sports';
GA_section_aliases['browns'] = 'sports';
GA_section_aliases['indians'] = 'sports';
GA_section_aliases['cavaliers'] = 'sports';
GA_section_aliases['pros'] = 'sports';
GA_section_aliases['ohio_state'] = 'sports';
GA_section_aliases['college'] = 'sports';
GA_section_aliases['olympics'] = 'sports';
GA_section_aliases['recreation'] = 'sports';
GA_section_aliases['hall_of_fame'] = 'sports';


GA_section_aliases['people'] = 'business';

GA_section_aliases['letters'] = 'opinion';
GA_section_aliases['editorials'] = 'opinion';
GA_section_aliases['opinion_columnists'] = 'opinion';
GA_section_aliases['syndicated_columnists'] = 'opinion';


GA_section_aliases['celebrities'] = 'entertainment';
GA_section_aliases['arts'] = 'entertainment';


GA_section_aliases['food'] = 'lifestyle';
GA_section_aliases['health'] = 'lifestyle';
GA_section_aliases['home_and_garden'] = 'lifestyle';
GA_section_aliases['religion'] = 'lifestyle';
GA_section_aliases['travel'] = 'lifestyle';

GA_section_aliases['announcements'] = 'lifestyle';
GA_section_aliases['engagements'] = 'lifestyle';
GA_section_aliases['weddings'] = 'lifestyle';
GA_section_aliases['anniversaries'] = 'lifestyle';
GA_section_aliases['births'] = 'lifestyle';
GA_section_aliases['milestones'] = 'lifestyle';

/** Section Aliases

	This allows for the aliasing of a section ID to another section ID (ie. lifestyles -> lifestyle)

	**/

/** Handle Subsections **/
if (window.GFP_subsection_id === undefined){
	var GFP_subsection_id = GFP_section_id;
	if (window.WA_section_name !== undefined && WA_section_name != GFP_site_id){
		GFP_subsection_id = WA_section_name;
	}
}

if (window.GFP_page_type !== undefined){
	GA_googleAddAttr('page_type', GFP_page_type);
}

if (GA_section_aliases[GFP_subsection_id] != undefined && GA_category_sites[GFP_site_id] == 1){
	GFP_subsection_id = GA_section_aliases[GFP_subsection_id];
}


/** Turn Sections into category attributes **/

if (GA_section_aliases[GFP_section_id] != undefined){
	GA_googleAddAttr('section_id', GA_section_aliases[GFP_section_id]);
} else {
	GA_googleAddAttr('section_id', GFP_section_id);
}

if (GA_section_aliases[GFP_subsection_id] != undefined){
	GA_googleAddAttr('subsection_id', GA_section_aliases[GFP_subsection_id]);
} else {
	GA_googleAddAttr('subsection_id', GFP_subsection_id);
}
GA_googleAddAttr('site_id', GFP_site_id);

/** Document Path **/
GA_document_path = (""+document.location).replace(/\?.+/, "").split("/");
GA_document_path.splice(0,3);
if (GA_document_path[GA_document_path.length-1] == "") {
    GA_document_path.pop();
}
GA_googleAddAttr('page_url', GA_document_path.join("_"));

/** site override
	
	This is a temporary fix to set a site to use category targetting for ads instead of placement names.
	
	**/


if (GA_category_sites[GFP_site_id] == 1){
	GFP_site_id = 'global';
	GFP_section_id = 'global';
}

/** Pattern obj

	You can jam in regular expressions or regular strings.  If you use regex stuff, make sure
	it starts & ends with /'s and that it's a valid regex.  There isn't much in here keeping
	you from screwing those up, so be careful.
	
	Assign patterns to a category like this:
	
		smart_pattern.category_name 	= '/patt[e]rn/';
		smart_pattern.category_name_2	= 'pattern';
			
	**/

if (typeof(GA_pattern) != 'undefined'){
	GA_pattern.automotive	= GA_pattern.automotive != "" ? GA_pattern.automotive : '/(autos)|(car)|(wheels)/';
} else {
	var GA_pattern = new Array();	
	GA_pattern.automotive = '/(autos)|(car)|(wheels)/';
	GA_pattern.realestate = '/(homes)|(real.?estate)/';
}
	
	
	
/** The smart_check function will optionall accept a pattern object, and create & update cookies based on
	matches to document.location
	
	**/

function GA_smartad(p) { // test URL for certain patterns
	var r = document.getElementById('results');		
	var patterns = typeof(p) != 'undefined' ? p : GA_pattern;
	
	for(var category in patterns) {		
		var match = false;
		var visits = GA_eatCookie(category); if(visits == 'NaN' || visits == 'null') visits = 0;
		
		if(patterns[category].indexOf('/') == 0) { //this is PROBABLY a regex
			var pLen = (patterns[category].length)-1;
				pLen = (patterns[category].lastIndexOf('/') == pLen ? (pLen-1) : pLen);
							
			var re = new RegExp(patterns[category].substr(1, pLen));
			var m = re.exec(document.location);
			
			if(m != null) match = true; } 
		else { var loc = document.location + ''; if(loc.indexOf(patterns[category]) != -1) match = true; }
		
		domain = document.domain.match( /[^\.]+\.[^\.]+$/ );;
		
		if(match) { visits++; GA_bakeCookie(category, visits, 7, domain); }
		try { GA_googleAddAttr(category, visits); } catch(e) { }
	}
	return;
}
		
GA_smartad();

//** cookie scripts from quirksmode.org **/
function GA_bakeCookie(name,value,days,domain) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; domain="+domain+"; path=/"; }
function GA_eatCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); }	return null; }
function GA_eraseCookie(name) { bakeCookie(name,"",-1); }




