<!-- // HIT BOX PAGE CODE
// MAIN = www.aarp.org 

var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0100u";hbx.gn="ehg-aarp.hitbox.com";

/////////////////////////
//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES

// ACCOUNT INFO - SEE "account_num_master_list.js"

// Hostname (part of URL) this is tacked on at the end
var host = window.location.host; 

///////////////////////////////////////////////////
// ACCOUNT TAGGING TESTS
// BULLETIN TEST
if (document.URL.match('bulletin')) {
	// SET ACCOUNT VAR - WWW.AARP.ORG, BULLETIN, PUBLICATIONS, GLOBAL
	hbx.acct="DM54060289AC07EN3;DM5411191KVA07EN3;DM540826BBWD07EN3;DM5406110ANC07EN3";//ACCOUNT NUMBER(S)
}

// DIVIDED WE FAIL TESTS
// If URL matches - 
else if (document.URL.match('/dividedwefail') || document.URL.match('divididosperdemos') || document.URL.match('/dividedwefail2')) {
	// SET ACCOUNT VAR - WWW.AARP.ORG, DIVIDED WE FAIL, GLOBAL
	hbx.acct="DM54060289AC07EN3;DM570321P4ZV07EN3;DM5406110ANC07EN3";//ACCOUNT NUMBER(S)
	}

// TRAVELOCITY BLUNDER FIX
// If hostname contains - travelocity
else if (host.match("travelocity")) {
	// Travelocity & Global Accounts
	hbx.acct="DM560821C7FW07EN3;DM5406110ANC07EN3";//ACCOUNT NUMBER(S)
	}

// BETA.AARP.ORG - DM571031PDEB07EN3 (beta account)
// BETA - TEST ACCOUNT ADDED  - DM540826M3DE07EN3	
else if (host.match("beta.aarp.org") || document.URL.match('/external_sites/caregiving/')) {
	// Beta, AARP & Global Accounts
	// NEW BETA ACCOUNT # - DM571031PDEB07EN3
	hbx.acct="DM560821C7FW07EN3;DM5406110ANC07EN3";//ACCOUNT NUMBER(S)
	}
		
	
else {
	// SET ACCOUNT VAR - just AARP.ORG & GLOBAL
	hbx.acct="DM54060289AC07EN3;DM5406110ANC07EN3";//ACCOUNT NUMBER(S)
}
// END FUNKY ACCOUNT TAGGING
//////////////////////////////////////////////////


//////////////////////////////////////////////////
//////////////////////////////////////////////////
// WSO CUSTOMIZED HBX PAGE NAMING
// Customizes the page naming in HBX
// Copyright 2004, AARP Services Inc. 
// Developer: Chris McDaniel

// VARIABLE SET UP
// Path variable (part of URL) - this is passed to main function
var urlPath = window.location.pathname;
// MOVED HOSTNAME ABOVE for Travelocity fix
var slashChar = "/"; 
// Default Hostname - in case for some odd reason there is not one.
var defaultHost = "www.aarp.org";

// STRIP OUT BAD CHARACTERS FUNCTION
function badCharStrip(a) { 
	a = a.split("|").join(""); 
	a = a.split("&").join("_"); 
	a = a.split("'").join(""); 
	a = a.split("#").join(""); 
	a = a.split("$").join(""); 
	a = a.split("%").join(""); 
	a = a.split("^").join(""); 
	a = a.split("*").join(""); 
	a = a.split(":").join(""); 
	a = a.split("!").join(""); 
	a = a.split(">").join(""); 
	a = a.split("<").join(""); 
	a = a.split("~").join(""); 
	a = a.split(";").join(""); 
	a = a.split(" ").join("+"); 
   return a; 
}
// Document Title - run function on document.title
docTitle = badCharStrip(document.title);

// MAIN FUNCTION - spliceURL
// Chops out what we need from URL - directory path & filename
function spliceFullURL(fullString, subString) { // fullString = url, subString = slashChar

	// Get Content Group (directory path) 
	// GIVE ME EVERYTHING BETWEEN THE FIRST "/" and last "slash"
	contentGroup = fullString.substring(fullString.indexOf("/"),fullString.lastIndexOf(subString)+1);
		
	// GRAB FILENAME
	// If the final "/" has nothing after it, set the "fileName to ""
	// This happens with pages that are just directories (i.e. http://www.aarp.org/travel/)
	if (fullString.lastIndexOf(subString) == -1) { 
		// Put a Space in there
		return "+"; 
	} else { 
		return fullString.substring(fullString.lastIndexOf(subString)+1, fullString.length); 
	} 
	// HOSTNAME TEST - if no hostname, then set to www.aarp.org
	if (host == "") {
		host = defaultHost;
	}
	
} // END FUNCTION

////////////////////////////////
// RUN FUNCTION - sets filename
// Fixes & Clean Up URL
fileName = spliceFullURL(urlPath, slashChar);

// ###################
// CONTENT GROUP FIXES
// COMMUNITY FIX - /onlinecommunity/ serves out of day, want it to look like /community/ 
// if contentGroup == /onlinecommunity/
if (contentGroup == "/onlinecommunity/") {
	contentGroup = "/community/"
}
// ###################


// ####################################################
// SET PAGE NAME, CONTENT GROUP VARIABLES
// HBX Content Group (directory) = host + content group 
WSO_mlc = host + contentGroup;
// HBX PAGE NAME = file name + document.title
WSO_pn = fileName + "+" + docTitle;

//alert("MLC & Page Name = " + mlc + pn);



// #########################################################	
// SN OOPS PAGE LOGGING MODULE
oopsError = "OOPS MESSAGE DISPLAYED";

if (document.body.innerHTML.indexOf("Oops...") != -1) {	
	//alert("OH NO--");
	WSO_pn = fileName + "+" + oopsError + "+" + docTitle;
	//alert(WSO_pn);
	}	
if (document.body.innerHTML.indexOf("OOPS...") != -1) {	
	//alert("OH NO--");
	WSO_pn = fileName + "+" + oopsError + "+" + docTitle;
	//alert(WSO_pn);
	}	
// #########################################################	



// Set Page Name and MLC here
hbx.mlc=WSO_mlc;
hbx.pn=WSO_pn;
// ####################################################


// 360i CODE TO ASSIST TRACKING PAID SEARCH
// SETS HBX CUSTOM VAR 1 TO this stuff
// Added 1/23/2006
var lp = location.pathname;
lp = lp.substring(0,lp.lastIndexOf("/"));
if(lp == "") lp = "/";
// End 360i Code


// EXIT LINK TRACKING - added 4/4/2006 at request of Tim Hawken
function _hbOnExitLink(linkObj){
    _hbSet('el',linkObj.lid);
}

// ORIGINAL PAGE NAME & MLC VARS
//hbx.pn="PUT+PAGE+NAME+HERE";//PAGE NAME(S)
//hbx.mlc="CONTENT+CATEGORY";//MULTI-LEVEL CONTENT CATEGORY

// END WSO CUSTOM
//////////////////////////////////////////////////
//////////////////////////////////////////////////

hbx.pndef="title";//DEFAULT PAGE NAME
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY

//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="auto";//LINK TRACKING - defualt was none
//hbx.dlf="n";//DOWNLOAD FILTER
// Chris modified 12/5/06 because travelocity has ".do" page renders
hbx.dlf="!.do";//DOWNLOAD FILTER
hbx.dft="full";//DOWNLOAD FILE NAMING - was "y" , change to "full" would get the full path name. 
hbx.elf="n";//EXIT LINK FILTER - click off to sub-domain, count as an exit from site. 

//SEGMENTS AND FUNNELS
hbx.seg="";//VISITOR SEGMENTATION
hbx.fnl="";//FUNNELS

//CAMPAIGNS
hbx.cmp="";//CAMPAIGN ID
hbx.cmpn="";//CAMPAIGN ID IN QUERY
hbx.dcmp="";//DYNAMIC CAMPAIGN ID
hbx.dcmpn="";//DYNAMIC CAMPAIGN ID IN QUERY
hbx.dcmpe="";//DYNAMIC CAMPAIGN EXPIRATION
hbx.dcmpre="";//DYNAMIC CAMPAIGN RESPONSE EXPIRATION
hbx.hra="";//RESPONSE ATTRIBUTE
hbx.hqsr="";//RESPONSE ATTRIBUTE IN REFERRAL QUERY
hbx.hqsp="";//RESPONSE ATTRIBUTE IN QUERY
hbx.hlt="";//LEAD TRACKING
hbx.hla="";//LEAD ATTRIBUTE
hbx.gp="";//CAMPAIGN GOAL - put on campagin conversion page "LAST"
hbx.gpn="";//CAMPAIGN GOAL IN QUERY
hbx.hcn="";//CONVERSION ATTRIBUTE
hbx.hcv="";//CONVERSION VALUE
hbx.cp="null";//LEGACY CAMPAIGN
hbx.cpd="";//CAMPAIGN DOMAIN

//CUSTOM VARIABLES
// PUt anything you want, seperate with "|" 
hbx.ci="";//CUSTOMER ID
hbx.hc1=lp;//CUSTOM 1 - ** this is now populated with 360i's Search Track Code

hbx.hc2="";//CUSTOM 2
hbx.hc3="";//CUSTOM 3
hbx.hc4="";//CUSTOM 4
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES

//INSERT CUSTOM EVENTS


//END EDITABLE SECTION

//REQUIRED SECTION. CHANGE "YOURSERVER" TO VALID LOCATION ON YOUR WEB SERVER (HTTPS IF FROM SECURE SERVER)
// Defer - tells your browser that this is the last to load, defer to everything. 
// defer - can be made sure that the user actually loads the whole page. 


// END HIT BOX PAGE CODE
////////////////////////////////////////////////////////////////////////////
//-->
