// ========================================================================
// Begin EK
// ========================================================================

// ------------------------------------------------------------------------
// ekProcess
//
// This function populates the global variable ekMetrics with values
// keyed as follows:
//
//    CC - country code
//    ll - language code
//    name - document (base) name
//    path - document path (location in hierarchy)
// ------------------------------------------------------------------------

// HBX start time
var HBXt0 = (new Date).getTime();

// DO NOT REMOVE THIS LINE! __BEGIN__METRICS__COMMON__CODE__
var ekMetrics = {};
var ekCustomAttributes = ["ProductId",
			  "Language",
			  "ContentType",
			  "ProductServiceClass"];

linkRE = new RegExp("^/link$");

function ekProcess(hostname,
		   docPath,
		   documentName,
		   documentPath,
		   documentLocale,
                   docCampaign)
{
    var hostsRE = "(www|kex|faqs|partner|b2becat|kiosk|epcot|mpp|kodapost|boards|promotion|know\.us|graphics)";
    var envRegEx = new RegExp("^" + hostsRE + "(\\w*)\\.kodak\\.com", "i");

    docPath = docPath.replace(/;jsessionid.*$/i, '');
    var docName = docPath.substring(docPath.lastIndexOf('/') + 1) || "INDEX";
    docPath = docPath.replace(/\/[^\/]*$/, '');

    var haveLocale = documentLocale != null;
    var haveName   = documentName   != null;
    var havePath   = documentPath   != null;
    var haveCampaign = docCampaign  != null;

    var isContentPlatform = (docName.match(/^PageQuerier.jhtml/) ||
			     docPath.match(linkRE) ||
			     (havePath &&
			      documentPath.match(/Kodak.com \(2\)/)));

    // The result of this snippet is used right away, and also later on.
    //
    // match() returns an array:
    // First element is the whole match (like perl's $&)
    // Subsequent elements are backreferences (like perl's $1, $2,...)
    // Here, wwwca.kodak.com match returns ('wwwca.kodak.com', 'www', 'ca'),
    // and wwwcafr.kodak.com match returns ('wwwcafr.kodak.com', 'www',
    //  'cafr'),since envRegEx has two backreferences, one for the host and
    // one for the country.
    var countryCName = null;
    var otherHost = '';

    // Some special sites, such as faqs,kodak.com and
    // graphics.kodak.com need special treatment:
    // They will be mapped into a branch within the kodak.com tree.
    var specialSite = null;

    // Special cases for "kodak.com" and proshots
    hostname = hostname.replace(/proshots.com/, "kodak.com");

    if (hostname.match(/^kodak.com/i))
 	hostname = "www." + hostname;

    if (hostname.match(/^faqs.kodak.com/i))
    {
        hostname = "www.kodak.com";
        specialSite = 'faqs';
    }

    if (hostname.match(/^graphics.kodak.com/i))
    {
        hostname = "www.kodak.com";
        specialSite = 'graphics';
    }

    var locales = hostname.match(envRegEx);
    if (locales)
    {
	var locale = locales[2];

	// Is there anything after the hostRE part (eg, www, kex...)
	if (typeof(locale) != 'undefined' && locale)
	{
	    // Yes, there is something
	    var CC = locale.substring(0, 2).toUpperCase();
	    var ll = locale.substring(2, 4).toLowerCase();

	    // but is it a country code?
	    if (acctForLocale(CC) != null && ll.match(/^(en|fr|de|nl|zh|)$/))
	    {
		// Yes, it is a country
		countryCName = {CC: CC, ll: ll || "unknown"};
		otherHost = '';
	    }
	    else
		// Not a valid  - bad host
		otherHost = '/ERRORS/OTHER HOSTS/' + hostname;
	}
	else
	    // No, there is nothing - good hostname
	    otherHost = '';
    }
    else
	// Did not match EnvRegEx - bad host
	otherHost = '/ERRORS/OTHER HOSTS/' + hostname;


    // Define CC and ll, using locale if given.
    ekMetrics.CC = ekMetrics.ll = "unknown";
    if (haveLocale)
    {
	var ll_CC = documentLocale.split(/_/);

	if (ll_CC.length != 2)
	    haveLocale = false; // invalid locale - ignore

	else
	{
	    ekMetrics.CC = (acctForLocale([ll_CC[1]]) == null
			    ? "other"
			    : ll_CC[1]);

	    ekMetrics.ll = ll_CC[0];
	}
    }
    if (haveCampaign)
    {
        ekMetrics.Campaign = docCampaign;
    }

    // Define document name and path
    ekMetrics.name = noAmpersand(haveName
				 ? (isContentPlatform
				    ? documentName + " Page"
				    : documentName)
				 : docName);
    ekMetrics.name = ekMetrics.name.replace(/index\.\w+$/, "INDEX");
    ekMetrics.name = ekMetrics.name.replace(/\'/, " ");

    var pathWithAmpersands;

    // if the ekDocumentPath variable was set in the html of the page, use it
    if (havePath && specialSite != 'graphics')
    {
        if (isContentPlatform && haveName)
            pathWithAmpersands = documentPath + "/" + documentName;
        else
            pathWithAmpersands = documentPath;
    }

    // otherwise, use the docPath variable, which was calculated earlier.
    else
        pathWithAmpersands = docPath;

    // This path may contain ampersands, so remove them before storing in ekMetrics.
    ekMetrics.path = noAmpersand(pathWithAmpersands);
//     ekMetrics.path = noAmpersand(havePath
// 				 ? (isContentPlatform
// 				    ? documentPath + "/" + documentName
// 				    : documentPath)
// 				 : docPath);
    ekMetrics.path = ekMetrics.path.replace(/\'/, " ")

    // See if the URL pathname starts with a /CC/ll or /cgi-bin/CC/ll.
    // If so, remove it from the path, unless there is an explicit one,
    // and set the CC to it, unless we have an explicit locale.
    if (!(haveLocale && havePath))
    {
	// If a match, locale is
	//      0                 1          2     3
	//     ["/CC/ll",         null,      "CC", "ll"]
	// or
	//     ["/cgi-bin/CC/ll", "cgi-bin", "CC", "ll"]
	var locale = docPath.match(/^(\/cgi-bin)?\/(\w+)\/([\w\-]+)/);

	if (locale && locale.length == 4)
	{
	    var CC = locale[2];

	    if (acctForLocale(CC) == null)
	    {
		ekMetrics.CC = "unknown";
		ekMetrics.ll = "unknown";
	    }

	    else
	    {
		if (!havePath)
		{
		    // ^ / ([A-z]+) / ([-A-z]+)|...|x,
		    ekMetrics.path =
			docPath.replace(/^(\/cgi-bin)?\/(\w+)\/([\w\-]+)/,
					locale[1] ? locale[1] : "");
		    havePath = true;
		}
	    
		if (!haveLocale)
		{
		    ekMetrics.CC = CC;
		    ekMetrics.ll = locale[3];
		    haveLocale = true;
		}
	    }
	}
    }

    // Prefix path with other host info, if we haven't already
    // channeled it to the proper place under Kodak.com
    var mappedName = ekMap(ekMetrics.path, isContentPlatform, specialSite);

    ekMetrics.path =
	otherHost + mappedName.replace(new RegExp("^/*"), "/");

    // Special handling for country sites wwwCC.kodak.com (and also
    // wwwCCLL)
    if (!haveLocale && countryCName != null)
    {
	ekMetrics.CC = countryCName.CC;
	ekMetrics.ll = countryCName.ll;
    }

    ekMetrics.meta = {};
    for (var i in ekCustomAttributes)
	ekMetrics.meta[ekCustomAttributes[i]] = [];

    getMetaTags(ekMetrics, 'ekMetrics.');

    ekMetrics.attr = [];

    for (var i = 0; i < ekCustomAttributes.length; ++i)
	ekMetrics.attr[i] = ekMetrics.meta[ekCustomAttributes[i]].join(',');

    document.__VSM = [escape(hostname),
		      escape(docPath),
		      escape(ekMetrics.path),
		      escape(ekMetrics.name)].join(":");
}

function getMetaTags(obj, metricsTagPrefix)
{
    var offset = metricsTagPrefix.length;

    var tags = (document.all
		? document.all.tags("meta")
		: (document.documentElement
		   ? document.getElementsByTagName("meta")
		   : null));

    if (typeof(tags) == "undefined" || !tags)
	return;

    for (var i = 1; i <= tags.length; ++i)
    {
	meta = tags.item(i - 1);

	if (meta.name && meta.name.indexOf(metricsTagPrefix) == 0)
	{
	    var name = meta.name.substring(offset);
	    if (typeof(obj.meta[name]) == 'undefined')
		obj.meta[name] = [];
	    var val = obj.meta[name]
		val[val.length] = meta.content;
	}
    }
}
function noAmpersand(str)
{
    return str.replace(/ *&(amp;)? */g," and ");
}

function ekMap(path, isContentPlatform, specialSite)
{
    // Special sites are handled by mapping them into a branch in the
    // virtual site map.
    if (specialSite == 'faqs')
	return "Kodak.com (2)/CLASSIC/service/knowledgebase" + path;

    if (specialSite == 'graphics')
    	return "/Kodak.com (2)/Commercial/Graphic Communications" + path;

    // The rest of the URL, from the main kodak.com site, is mapped
    // using this table.
    // This is an array, not a hash, since order does matter! - high
    // precedence mappings go first. E.g., if we have different
    // mappings for /business/motion and /business, we need to look
    // for them in this order. If this were a hash, the order would
    // not be preserved.
    var table =
        [
         { regex: new RegExp('^Hidden Branch'),
            vPath: 'Kodak.com (2)/Hidden Branch'},
          { regex: new RegExp('^/business/aim/aerial'),
            vPath: '/Kodak.com (2)/Commercial/Aerial'},
          { regex: new RegExp('^/motion'),
            vPath: '/Kodak.com (2)/Commercial/Cinematography'},
          { regex: new RegExp('^/business/docimaging'),
            vPath: '/Kodak.com (2)/Commercial/Document Imaging'},
          { regex: new RegExp('^/business/wrt'),
            vPath: '/Kodak.com (2)/Commercial/Document Imaging'},
          { regex: new RegExp('^/business/econtent4'),
            vPath: '/Kodak.com (2)/Commercial/Document Imaging'},
          { regex: new RegExp('^/dpq/site'),
            vPath: '/Kodak.com (2)/Commercial/Document Imaging'},
          { regex: new RegExp('^/business/graphicComm'),
            vPath: '/Kodak.com (2)/Commercial/Graphic Communications'},
          { regex: new RegExp('^/government/governmentMarkets/contracts'),
            vPath: '/Kodak.com (2)/Commercial/Government Contracts'},
          { regex: new RegExp('^/health'),
            vPath: '/Kodak.com (2)/Commercial/Medical and Dental'},
          { regex: new RegExp('^/professional'),
            vPath: '/Kodak.com (2)/Commercial/Pro Lab'}
        ];

    for (var i in table)
    {
	var regex = table[i].regex;
	if (path.match(regex))
	    return path.replace(regex, table[i].vPath);
    }

    return (isContentPlatform || path.match(/^\/ERRORS/)
	    ? path
	    : "/Kodak.com (2)/CLASSIC" + path);
}


// ---------------------------------------
// Countries and Regions
// ---------------------------------------
var kodakTotalAccount = ";DM540218MMBB"; 

var regions =
{
    "Eamer":            "DM5402178PAB",
    "LAR":              "DM54021771BA",
    "GAR":              "DM5402177LEC",
    "GCR":              "DM5402177LEC;DM540217I7ME",
    "WesternEamer":     "DM5402178PAB;DM540218JFMC",
    "MiddleEast":       "DM5402178PAB;DM540218EKEB"
};


var countries =
{
   // No Region
    "CA":      "DM5402177DZE", // Canada
    "JP":      "DM540218PAFC", // Japan
    "US":      "DM540217K7AV", // United States
    "other":   "DM540504OANR", // Other locale
    "global":  "DM540504IJAD", // Global pseudo country
    "unknown": "DM5405046NVR", // Unknown locale
    "O1":      "DM540218DKFE", // O1 Other account Gallery
    "O2":      "DM540218CIZA", // O2 Other account Gallery
    "O3":      "DM540218MHRB", // O3 other Gallery US
    "O4":      "DM5402186PDE", // O4 other know.kodak.com
    "O5":      "DM540218DKMM", // O5 other creo.kodak.com

    //Middle East make sure this still rolls up in eamer
    "BH":  regions.MiddleEast, // Bahrain
    "EG":  regions.MiddleEast, // Egypt
    "JO":  regions.MiddleEast, // Jordan
    "KW":  regions.MiddleEast, // Kuwait
    "LB":  regions.MiddleEast, // Lebanon
    "OM":  regions.MiddleEast, // Oman
    "QA":  regions.MiddleEast, // Qatar
    "SA":  regions.MiddleEast, // Saudi Arabia
    "SY":  regions.MiddleEast, // Syria
    "AE":  regions.MiddleEast, // United Arab Emirates
    "YE":  regions.MiddleEast, // Yemen

   // Eamer Region
    "AT": "DM540218N5BE;" + regions.Eamer, // Austria
    "BE": "DM540217FIVW;" + regions.Eamer, // Belgium
    "CZ": "DM5402182DBE;" + regions.Eamer, // Czech Republic
    "DK": "DM540217CFAZ;" + regions.Eamer, // Denmark
    "FI": "DM540218KLBV;" + regions.Eamer, // Finland
    "GR": "DM54021870EB;" + regions.Eamer, // Greece
    "HU": "DM540218G5WA;" + regions.Eamer, // Hungary
    "NL": "DM54021881DA;" + regions.Eamer, // Netherlands
    "NO": "DM540218KCSE;" + regions.Eamer, // Norway
    "PL": "DM540218KMZN;" + regions.Eamer, // Poland
    "PT": "DM540218MJEE;" + regions.Eamer, // Portugal
    "RU": "DM5402189CZE;" + regions.Eamer, // Russia
    "ZA": "DM54021855SZ;" + regions.Eamer, // South Africa
    "ES": "DM540217IMSZ;" + regions.Eamer, // Spain
    "SE": "DM54021865ZR;" + regions.Eamer, // Sweden
    "CH": "DM54021878EM;" + regions.Eamer, // Switzerland
    "TR": "DM540218J9EA;" + regions.Eamer, // Turkey

    // Western Eamer subregion Eamer
    "FR": "DM5402179KNE;" + regions.WesternEamer, // France
    "DE": "DM540217PFDR;" + regions.WesternEamer, // Germany
    "IT": "DM540218K4VF;" + regions.WesternEamer, // Italy
    "GB": "DM5402181DED;" + regions.WesternEamer, // United Kingdom
    "UK": "DM5402181DED;" + regions.WesternEamer, // United Kingdom alias


    // GAR Region
    "AU": "DM5402189GFF;" + regions.GAR, // Australia
    "IN": "DM540218NHSW;" + regions.GAR, // India
    "KR": "DM540218B9BN;" + regions.GAR, // Korea
    "MY": "DM540218H6EZ;" + regions.GAR, // Malaysia
    "NZ": "DM540218GCCC;" + regions.GAR, // New Zealand
    "PH": "DM5402187AVR;" + regions.GAR, // Philippines
    "SG": "DM540218L0WM;" + regions.GAR, // Singapore
    "TH": "DM5402189LEA;" + regions.GAR, // Thailand

    // GCR Subregion of GAR
    "CN": "DM540218I3ED;" + regions.GCR, // China
    "HK": "DM54021836ZM;" + regions.GCR, // Hong Kong
    "TW": "DM5402188CDM;" + regions.GCR, // Taiwan

    // LAR Region
    "AR": "DM540217LGAM;" + regions.LAR, // Argentina
    "BR": "DM540217E5SZ;" + regions.LAR, // Brazil
    "CL": "DM54021764DV;" + regions.LAR, // Chile
    "CR": "DM5402177PBE;" + regions.LAR, // Costa Rica
    "EC": "DM540217L3MM;" + regions.LAR, // Ecuador
    "SV": "DM54021762FD;" + regions.LAR, // El Salvador
    "GT": "DM5402179EZE;" + regions.LAR, // Guatemala
    "HN": "DM540217EJWA;" + regions.LAR, // Honduras
    "MX": "DM540217NHAA;" + regions.LAR, // Mexico
    "NI": "DM5402176FDE;" + regions.LAR, // Nicaragua
    "PA": "DM5402174MBB;" + regions.LAR, // Panama
    "PE": "DM540217IJVR;" + regions.LAR, // Peru
    "VE": "DM540217J4WF;" + regions.LAR // Venezuela
};

function acctForLocale(locale)
{
    return (typeof(countries[locale]) == 'undefined'
	    ? null
	    : countries[locale] + kodakTotalAccount);
}

// DO NOT REMOVE THIS LINE! __END__METRICS__COMMON__CODE__

// HBX start time
var HBXt1 = (new Date).getTime();

// Now that all data is in place, process ek data and populate ekMetrics
ekProcess(document.location.hostname,
	  document.location.pathname,
	  (typeof(ekDocumentName)   != 'undefined' ? ekDocumentName : null),
	  (typeof(ekDocumentPath)   != 'undefined' ? ekDocumentPath : null),
	  (typeof(ekDocumentLocale) != 'undefined' ? ekDocumentLocale : null),
          (typeof(ekCampaignID)     != 'undefined' ? ekCampaignID : null));

// HBX start time
var HBXt2 = (new Date).getTime();


// ========================================================================
// End EK
// ========================================================================

// ========================================================================
// Begin HBX
// ========================================================================

// ---------------------------------------
// hbx page code
// ---------------------------------------
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="HBX0103u";
hbx.gn="ehg-kodak.hitbox.com";

//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
hbx.acct = acctForLocale(ekMetrics.CC);           //ACCOUNT NUMBER(S)
hbx.pn	 = ekMetrics.name || "PUT+PAGE+NAME+HERE";//PAGE NAME
hbx.mlc	 = ekMetrics.path || "CONTENT+CATEGORY";  //MULTI-LEVEL CONTENT CATEGORY

hbx.pndef = "title"; //DEFAULT PAGE NAME
hbx.ctdef = "full";  //DEFAULT CONTENT CATEGORY

//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv	  = "2";  //FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt	  = "auto";  //LINK TRACKING
hbx.dlf	  = "n";  //DOWNLOAD FILTER
hbx.dft	  = "n";  //DOWNLOAD FILE NAMING
hbx.elf	  = "n";  //EXIT LINK FILTER

//SEGMENTS AND FUNNELS
hbx.seg	  = "";  //VISITOR SEGMENTATION
hbx.fnl	  = "";  //FUNNELS

//CAMPAIGNS
hbx.cmp	  = ekMetrics.Campaign || "";  //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
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
hbx.ci	  = "";  //CUSTOMER ID

for (var i = 0; i < ekCustomAttributes.length; ++i)
    hbx['hc' + (i + 1)] = ekMetrics.attr[i];

//  hbx.hc1	  = ekMetrics.meta.ProductId.join(',');           //CUSTOM 1
//  hbx.hc2	  = ekMetrics.meta.Language.join(',');            //CUSTOM 2
//  hbx.hc3	  = ekMetrics.meta.ContentType.join(',');         //CUSTOM 3
//  hbx.hc4	  = ekMetrics.meta.ProductServiceClass.join(','); //CUSTOM 4

hbx.hrf	  = "";  //CUSTOM REFERRER
hbx.pec	  = "";  //ERROR CODES

//INSERT CUSTOM EVENTS

//END EDITABLE SECTION

// ---------------------------------------
// End hbx page code
// ---------------------------------------

// ---------------------------------------
// Try not to touch the fine code below.
// ---------------------------------------

//hbx.js,HBX1.3,COPYRIGHT 1997-2004 WEBSIDESTORY,INC. ALL RIGHTS RESERVED. U.S.PATENT No.6,393,479B1 & 6,766,370. INFO:http://websidestory.com/privacy
var _vjs="HBX0130.03u";
var _dl=".exe,.zip,.wav,.mp3,.mov,.mpg,.avi,.doc,.pdf,.xls,.ppt,.gz";
function _NA(a){return new Array(a?a:0)}function _NO(){return new Object()}
var _mn=_hbq="",_hbA=_NA(),_hud="undefined",_lv=_NO(),_ec=_if=_ll=_hec=_hfs=_hfc=_fvf=_ic=_pC=_fc=_pv=0,_hbi=new Image(),_hbin=_NA(),_pA=_NA();
_lv.id=_lv.pos=_lv.l="";_hbE=_D("hbE")?_hbE:"";_hbEC=_D("hbEC")?_hbEC:0;var _ex="expires=Wed, 1 Jan 2020 00:00:00 GMT",_lvm=_D("lvm")?_lvm:150;
function _D(v){return(typeof eval("window._"+v)!=_hud)?eval("window._"+v):""}function _DD(v){return(typeof v!=_hud)?1:0}
function _A(v){return escape(v)}function _B(){return 0}function _GP(){return location.protocol=="https:"?"https://":"http://"}
function _IC(a,b,c){return a.charAt(b)==c?1:0}function _II(a,b,c){return a.indexOf(b,c?c:0)}function _IL(a){return a!=_hud?a.length:0}
function _IF(a,b,c){return a.lastIndexOf(b,c?c:_IL(a))}function _IP(a,b){return a.split(b)}
function _IS(a,b,c){return b>_IL(a)?"":a.substring(b,c!=null?c:_IL(a))}
function _RP(a,b,c,d){d=_II(a,b);if(d>-1){a=_RP(_IS(a,0,d)+","+_IS(a,d+_IL(b),_IL(a)),b,c)}return a}
function _TL(a){return a.toLowerCase()}function _TS(a){return a.toString()}function _TV(){_hbSend()}function _SV(a,b,c){_hbSet(a,b,c)}
function _VS(a,b){eval("_"+a+"='"+b+"'")}
function _VC(a,b,c,d){b=_IP(a,",");for(c=0;c<_IL(b);c++){d=_IP(b[c],"|");_VS(d[0],(_D(d[0]))?_D(d[0]):d[1]?d[1]:"")}}
for(var _a=0;_a<_hbEC;_a++){_pv=_hbE[_a];if(_pv._N=="pv"){for(var _b in _pv){if(_EE(_b)){_VS(_b,_pv[_b])}}}}
_VC("pn|PUT+PAGE+NAME+HERE,mlc|CONTENT+CATEGORY,elf|n,dlf|n,dft|n,pndef|title,ctdef|full,hcn|");
function _ER(a,b,c){_hbi.src=_GP()+_gn+"/HG?hc="+_mn+"&hb="+_A(_acct)+"&hec=1&ec=1&err="+((typeof a=="string")?_A(a+"-"+c):"Unknown")}
function _EE(a){return(a!="_N"&&a!="_C")?1:0}_EV(window,"error",_ER);
function _hbSend(c,a,i){a="";_hec++;for(i in _hbA)if(typeof _hbA[i]!="function")a+="&"+i+"="+_hbA[i];_Q(_hbq+"&hec="+_hec+a+_hbSendEV());_hbA=_NA()}
function _hbSet(a,b,c,d,e){d=_II(_hbq,"&"+a+"=");if(d>-1){e=_II(_hbq,"&",d+1);e=e>d?e:_IL(_hbq);if(a=="n"||a=="vcon"){_hbq=_IS(_hbq,0,d)+"&"+a+"="+b+
_IS(_hbq,e);_hec=-1;if(a=="n"){_pn=b}else{_mlc=b}}else{_hbq=_IS(_hbq,0,d)+_IS(_hbq,e)}}if((a!="n")&&(a!="vcon"))_hbA[a]=(c==0)?b:_A(b)}
function _hbRedirect(a,b,c,d,e,f,g){_SV("n",a);_SV("vcon",b);if(_DD(d)&&_IL(d)>0){d=_IC(d,0,"&")?_IS(d,1,_IL(d)):d;e=_IP(d,"&");for(f=0;f<_IL(e);
f++){g=_IP(e[f],"=");_SV(g[0],g[1])}}_TV();if(c!=""){_SV("hec",0);setTimeout("location.href='"+c+"'",500)}}
function _hbSendEV(a,b,c,d,e,f,x,i){a=c="",e=_IL(_hbE);for(b=0;b<e;b++){c=_hbE[b];for(var d in c){if(_EE(d)&&c[d].match){x=c[d].match(/\[\]/g);
if(x!=null&&_IL(x)>c._C)c._C=_IL(x)}}for(d in c){if(_EE(d)&&c[d].match){x=c[d].match(/\[\]/g);x=(x==null)?0:_IL(x);for(i=x;i<c._C;i++)c[d]+="[]"}}}
for(b=0;b<e;b++){c=_hbE[b];for(f=b+1;f<e;f++){if(_hbE[f]!=null&&c._N==_hbE[f]._N){for(d in c){if(_EE(d)&&_hbE[f]!=null)c[d]+="[]"+_hbE[f][d];
_hbE[f][d]=""}}}for(d in c){if(_EE(d)&&c._N!=""&&c._N!="pv"){a+="&"+c._N+"."+d+"="+_RP(_A(c[d]),"%5B%5D",",")}}}_hbE=_NA();_hbEC=0;return a}
function _hbM(a,b,c,d){_SV('n',a);_SV('vcon',b);if(_IL(c)>0)_SV(c,d);_TV()}
function _hbPageView(p,m){_hec=-1;_hbM(p,m,"")}function _hbExitLink(n){_hbM(_pn,_mlc,"el",n)}function _hbDownload(n){_hbM(_pn,_mlc,"fn",n)}
function _hbVisitorSeg(n,p,m){_SV("n",p);_SV("vcon",m);_SV("seg",n,1);_TV()}function _hbCampaign(n,p,m){_hbM(p,m,"cmp",n)}
function _hbFunnel(n,p,m){_hbM(p,m,"fnl",n)}function _hbGoalPage(n,p,m){_hbM(p,m,"gp",n)}
function _hbLink(a,b,c){_SV("lid",a);if(_DD(b))_SV("lpos",b);_TV()}
function _LE(a,b,c,d,e,f,g,h,i,j,k,l){b="([0-9A-Za-z\\-]*\\.)",c=location.hostname,d=a.href,h=i="";eval("_f=/"+b+"*"+b+"/");if(_DD(_f)){_f.exec(c);	
j=(_DD(_elf))?_elf:"";if(j!="n"){if(_II(j,"!")>-1){h=_IS(j,0,_II(j,"!"));i=_IS(j,_II(j,"!")+1,_IL(j))}else{h=j}}k=0;if(_DD(_elf)&&_elf!="n"){
if(_IL(i)){l=_IP(i,",");for(g=0;g<_IL(l);g++)if(_II(d,l[g])>-1)return}if(_IL(h)){l=_IP(h,",");for(g=0;g<_IL(h);g++)if(_II(d,l[g])>-1)k=1}}
if(_II(a.hostname,RegExp.$2)<0||k){	e=_IL(d)-1;return _IC(d,e,'/')?_IS(d,0,e):d}}}
function _LD(a,b,c,d,e,f){b=a.pathname,d=e="";b=_IS(b,_IF(b,"/")+1,_IL(b));c=(_DD(_dlf))?_dlf:"";if(c!="n"){if(_II(c,"!")>-1){d=","+_IS(c,0,_II(c,"!"));
e=","+_IS(c,_II(c,"!")+1,_IL(c))}else{d=","+c}}f=_II(b,"?");b=(f>-1)?_IS(b,0,f):b;if(_IF(b,".")>-1){f=_IS(b,_IF(b,"."),_IL(b));
if(_II(_dl+d,f)>-1&&_II(e,f)<0){var dl=b;if(_DD(_dft)){if(_dft=="y"&&a.name){dl=a.name}else if(_dft=="full"){dl=a.pathname}}return dl}}}
function _LP(a,b,c){for(c=0;c<_IL(a);c++){if(b==0){if(_IL(_lv.l)<_lvm)_LV(a[c]);else break}else if(b==1)_EV(a[c],'mousedown',_LT)}}
function _LV(a,b,c){b=_LN(a);c=b[0]+b[1];if(_IL(c)){_lv.id+=_A(b[0])+",";_lv.pos+=_A(b[1])+",";_lv.l+=c}}
function _LN(a,b,c,d){b=a.href;b+=a.name?a.name:"";c=_LVP(b,"lid");d=_LVP(b,"lpos");return[c,d]}
function _LT(e){if((e.which&&e.which==1)||(e.button&&e.button==1)){var a=document.all?window.event.srcElement:this;for(var i=0;i<4;i++){if(a.tagName&&
_TL(a.tagName)!="a"&&_TL(a.tagName)!="area"){a=a.parentElement}}var b=_LN(a),c=d="";a.lid=b[0];a.lpos=b[1];if(_D("lt")&&_lt!="manual"){if((a.tagName&&
_TL(a.tagName)=="area")){if(!_IL(a.lid)){if(a.parentNode){if(a.parentNode.name)a.lid=a.parentNode.name;else a.lid=a.parentNode.id}}if(!_IL(a.lpos))
a.lpos=a.coords}else{if(_IL(a.lid)<1)a.lid=_LS(a.text?a.text:a.innerText?a.innerText:"");if(!_IL(a.lid)||_II(_TL(a.lid),"<img")>-1)a.lid=_LI(a)}}
if(!_IL(a.lpos)&&_D("lt")=="auto_pos"&&a.tagName&&_TL(a.tagName)!="area"){c=document.links;for(d=0;d<_IL(c);d++){if(a==c[d]){a.lpos=d+1;break}}}
var _f=0,l=_TL(a.protocol),j=k="";if(l!="mailto:"&&l!="javascript:"){j=_LE(a),k=_LD(a);if(_DD(k))a.fn=k;else if(_DD(j))a.el=j}
if(_D("lt")&&_IC(_lt,0,"n")!=1&&_DD(a.lid)&&_IL(a.lid)>0){_SV("lid",a.lid);if(_DD(a.lpos))_SV("lpos",a.lpos);_f=1}if(_DD(a.fn)){_SV("fn",a.fn);_f=2}
else if(_DD(a.el)){_SV("el",a.el);_f=1}if(_f>0){if(_IL(_hlf)>0&&_f==1){_SV("lf",_hlf);_hfs=1}_TV()}}}
function _LVP(a,b,c,d,e){c=_II(a,"&"+b+"=");c=c<0?_II(a,"?"+b+"="):c;if(c>-1){d=_II(a,'&',c+_IL(b)+2);e=_IS(a,c+_IL(b)+2,d>-1?d:_IL(a));
if(!_ec){if(!(_II(e,"//")==0))return e}else return e}return ""}
function _LI(a){var b=""+a.innerHTML,bu=_TL(b),i=_II(bu,"<img");if(bu&&i>-1){eval("__f=/ src\s*=\s*['\"]?([^'\" ]+)['\"]?/i");__f.exec(b);
if(RegExp.$1)b=RegExp.$1}return b}
function _LSP(a,b,c,d){d=_IP(a,b);return d.join(c)}
function _LS(a,b,c,d,e,f,g){c=_D("lim")?_lim:100;b=(_IL(a)>c)?_A(_IS(a,0,c)):_A(a);b=_LSP(b,"%0A","%20");b=_LSP(b,"%0D","%20");b=_LSP(b,"%09","%20");
c=_IP(b,"%20");d=_NA();e=0;for(f=0;f<_IL(c);f++){g=_RP(c[f],"%20","");if(_IL(g)>0){d[e++]=g}}b=d.join("%20");return unescape(b)}
function _EM(a,b,c,d){a=_D("fv");b=_II(a,";"),c=parseInt(a);d=3;if(_TL(a)=="n"){d=999;_fv=""}else if(b>-1){d=_IS(a,0,b);_fv=_IS(a,b+1,_IL(a))}
else if(c>0){d=c;_fv=""}return d}
function _FF(e){var a=(_bnN)?this:_EVO(e);_hlf=(a.lf)?a.lf:""}
function _FU(e){if(_hfs==0&&_IL(_hlf)>0&&_fa==1){_hfs=1;if(_hfc){_SV("sf","1")}else if(_IL(_hlf)>0){_SV("lf",_hlf)}_TV();_hlf="",_hfs=0,_hfc=0}}
function _FO(e){var a=true;if(_DD(this.FS))eval("try{a=this.FS()}catch(e){}");if(a!=false)_hfc=1;return a}
function _FA(a,b,c,d,e,f,g,h,i,ff,fv,s){b=a.forms;ff=new Object();f=_EM();for(c=0;c<_IL(b);c++){ff=b[c],d=s=0,e=ff.elements,fv=eval(_D("fv"));if(_DD(fv)
&&_TL(_TS(fv))!="n"&&fv!=""&&typeof fv=="function"){_fv=new Function("if("+_fv+"()){_fvf=0;_hfc=1}");_EV(ff,"submit",_fv),_fvf=1,_fa=1}g=ff.name?ff.name
:"forms["+c+"]";for(h=0;h<_IL(e);h++){if(e[h].type&&"hiddenbuttonsubmitimagereset".indexOf(e[h].type)<0&&d++>=f)break}if(d>=f){_fa=1;for(h=0;h<_IL(e);
h++){i=e[h];if(i.type&&"hiddenbuttonsubmitimagereset".indexOf(i.type)<0){i.lf=g+".";i.lf+=(i.name&&i.name!="")?i.name:"elements["+h+"]";
_EV(i,"focus",_FF)}}ff.FS=null;ff.FS=ff.onsubmit;if(_DD(ff.FS)&&ff.FS!=null){ff.onsubmit=_FO}else if(!(_bnN&&_bv<5)&&_hM&&!(_bnI&&!_I5)){if((!_bnI)||
(_II(navigator.userAgent,"Opera")>-1)){ff.onsubmit=_FO}else{_EV(ff,"submit",_FO);
eval("try{document.forms["+c+"].FS=document.forms["+c+"].submit;document.forms["+c+"].submit=_FO;throw ''}catch(E){}")}}}}}
function _GR(a,b,c,d){if(!_D("hrf"))return a;if(_II(_hrf,"http",0)>-1)return _hrf;b=window.location.search;b=_IL(b)>1?_IS(b,1,_IL(b)):"";
c=_II(b,_hrf+"=");if(c>-1){ d=_II(b,"&",c+1);d=d>c?d:_IL(b);b=_IS(b,c+_IL(_hrf)+1,d)}return(b!=_hud&&_IL(b)>0)?b:a}
function _PO(a,b,c,d,e,f,g){d=location,e=d.pathname,f=_IS(e,_IF(e,"/")+1),g=document.title;if(a&&b==c){return(_pndef=="title"&&g!=""&&g!=d&&
!(_bnN&&_II(g,"http")>0))?g:f?f:_pndef}else{return b==c?(e==""||e=="/")?"/":_IS(e,(_ctdef!="full")?_IF(e,"/",_IF(e,"/")-2):_II(e,"/"),_IF(e,"/"))
:(b=="/")?b:((_II(b,"/")?"/":"")+(_IF(b,"/")==_IL(b)-1?_IS(b,0,_IL(b)-1):b))}}
function _PP(a,b,c,d){return ""+(c>-1?_PO(b,_IS(a,0,c),d)+";"+_PP(_IS(a,c+1),b,_II(_IS(a,c+1),";")):_PO(b,a,d))}
_mlc=_PP(_mlc,0,_II( _mlc,";"),"CONTENT+CATEGORY");_pn=_PP(_pn,1,_II(_pn,";"),"PUT+PAGE+NAME+HERE");
function _NN(a){return _D(a)!="none"}if(_NN("lt")){_LP(document.links,0)}
var _rf=_A(document.referrer),_et=_oe=_we=0,_ar="",_hM=(!(_II(navigator.userAgent,"Mac")>-1)),_tls="";_bv=parseInt(navigator.appVersion);
_bv=(_bv>99)?(_bv/100):_bv;var __f,_hrat=_D("hra"),_hra="",_$r="document.referrer)+''}",_$c="catch(_e)",_hbi=new Image(),_fa=_hlfs=_hoc=0,
_hlf=_ce=_ln=_pl='',_bn=navigator.appName,_bn=(_II(_bn,"Microsoft")?_bn:"MSIE"),_bnN=(_bn=="Netscape"),_bnI=(_bn=="MSIE"),_hck="*; path=/; "+(_D("cpd")&&
_D("cpd")!=""?(" domain=."+_D("cpd")+"; "):"")+_ex,_N6=(_bnN&&_bv>4),_I5=((_II(navigator.userAgent,'MSIE 5')>-1)||
(_II(navigator.userAgent,'MSIE 6')>-1)),_ss=_sc="na",_sv=11,_cy=_hp="u",_tp=_D("ptc");if(_N6||_I5)eval("try{_tls=top.location.search}catch(_e){}")
function _E(a){var b="";var d=_IP(a,",");for(var c=0;c<_IL(d);c++)b+="&"+d[c]+"="+_A(_D(d[c]));return b}
function _F(a,b){return(!_II(a,"?"+b+"="))?0:_II(a,"&"+b+"=")}function _G(a,b,c,d){var e=_F(a,b);if(d&&e<0&&top&&window!=top){e=_F(_tls,b);
if(e>-1)a=_tls};return(e>-1)?_IS(a,e+2+_IL(b),(_II(a,"&",e+1)>-1)?_II(a,"&",e+1):_IL(a)):c}
function _H(a,b,c){if(!a)a=c;if(_I5||_N6){eval("try{_vv=_G(location.search,'"+a+"','"+b+"',1)}"+_$c+"{}")}else{_vv=_G(location.search,a,b,1)}return unescape(_vv)}
function _I(a,b,c,d){__f=_IS(a,_II(a,"?"));if(b){if(_I5||_N6){eval("try{_hra=_G(__f,_hqsr,_hra,0)}"+_$c+"{}")}else{_hra=_G(__f,_hqsr,_hra,0)}};
if(c&&!_hra){if(_I5||_N6){eval("try{_hra=_G(location.search,_hqsp,_hra,1)}"+_$c+"{}")}else{_hra=_G(location.search,_hqsp,_hra,1)}};if(d&&!_hra)_hra=d;return _hra}
_dcmpe=_H(_D("dcmpe"),_D("dcmpe"),"DCMPE");_dcmpre=_H(_D("dcmpre"),_D("dcmpre"),"DCMPRE");_vv="";_cmp=_H(_D("cmpn"),_D("cmp"),"CMP");
_gp=_H(_D("gpn"),_D("gp"),"GP");_dcmp=_H(_D("dcmpn"),_D("dcmp"),"DCMP");
if(_II(_cmp,"SFS-")>-1){document.cookie="HBCMP="+_cmp+"; path=/;"+(_cpd!=""?(" domain=."+_cpd+"; "):"")+_ex}
function _J(a,b){return(_II(a,"CP=")<0)?"null":_IS(a,_II(a,"CP=")+3,(b=="*")?_II(a,"*"):null)}
if(_bnI&&_bv>3)_ln=navigator.userLanguage;if(_bnN){if(_bv>3)_ln=navigator.language;if(_bv>2)for(var i=0;i<_IL(navigator.plugins);i++)_pl+=
navigator.plugins[i].name+":"};var _cp=_D("cp");if(location.search&&_TL(_cp)=="null")_cp=_J(location.search,"x");if(_II(document.cookie,"CP=")>-1){
_ce="y";_hd=_J(document.cookie,"*");if(_TL(_hd)!="null"&&_cp=="null"){_cp=_hd}else{document.cookie="CP="+_cp+_hck}}else{document.cookie="CP="+_cp+_hck;
_ce=(_II(document.cookie,"CP=")>-1)?"y":"n"};if(window.screen){_sv=12;_ss=screen.width+"*"+screen.height;_sc=_bnI?screen.colorDepth:screen.pixelDepth;
if(_sc==_hud)_sc="na"};_ra=_NA();if(_ra.toSource||(_bnI&&_ra.shift))_sv=13;if(_I5&&_hM){if(_II(""+navigator.appMinorVersion,"Privacy")>-1)_ce="p";
if(document.body&&document.body.addBehavior){document.body.addBehavior("#default#homePage");_hp=document.body.isHomePage(location.href)?"y":"n";
document.body.addBehavior("#default#clientCaps");_cy=document.body.connectionType}};var _hcc=(_DD(_hcn))?_D("hcv"):"";if(!_D("gn"))_gn="ehg.hitbox.com";
if(_D("ct")&&!_D("mlc"))_mlc=_ct;_ar=_GP()+_gn+"/HG?hc="+_mn+"&hb="+_A(_acct)+"&cd=1&hv=6&n="+_A(_pn)+"&con=&vcon="+_A(_mlc)+"&tt="+_D("lt")+
"&ja="+(navigator.javaEnabled()?"y":"n")+"&dt="+(new Date()).getHours()+"&zo="+(new Date()).getTimezoneOffset()+"&lm="+Date.parse(document.lastModified)
+(_tp?("&pt="+_tp):"")+_E((_bnN?"bn,":"")+"ce,ss,sc,sv,cy,hp,ln,vpc,vjs,hec,pec,cmp,gp,dcmp,dcmpe,dcmpre,cp,fnl")+"&seg="+_D("seg")+"&epg="+_D("epg")+
"&cv="+_A(_hcc)+"&gn="+_A(_D("hcn"))+"&ld="+_A(_D("hlt"))+"&la="+_A(_D("hla"))+"&c1="+_A(_D("hc1"))+"&c2="+_A(_D("hc2"))+"&c3="+_A(_D("hc3"))+"&c4="+
_A(_D("hc4"))+"&customerid="+_A(_D("ci")?_ci:_D("cid"))+"&lv.id="+_lv.id+"&lv.pos="+_lv.pos;if(_I5||_N6){eval("try{_rf=_A(top."+_$r+_$c+"{_rf=_A("+_$r)}
else{if(top.document&&_IL(parent.frames)>1){_rf=_A(document.referrer)+""}else if(top.document){_rf=_A(top.document.referrer)+""}}if((_rf==_hud)||
(_rf==""))_rf="bookmark";_rf=unescape(_rf);_rf=_GR(_rf);_hra=_I(_rf,_D("hqsr"),_D("hqsp"),_hrat);_ar+="&ra="+_A(_hra)+"&rf="+_A(_IS(_rf,0,500))+
"&pl="+_A(_pl)+_hbSendEV();if(_D("onlyMedia")!="y")_hbi.src=_ar+"&hid="+Math.random();_hbq=_IS(_ar,0,_II(_ar,"&hec"));_hbE=_NA();
function _Q(a){var b="";b=new Image();b.src=a+"&hid="+Math.random()}
function _X(a){if(_ec==0){_ec=1;a=document;if(_NN("lt")||_NN("dlf")||_NN("elf")){_LP(a.links,1)}if(_NN("fv"))_FA(a)}}
function _EV(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false)}else if(a.attachEvent){a.attachEvent("on"+b,c)}}
function _EVO(e){return document.all?window.event.srcElement:this} 
_EV(window,"load",_X);_EV(window,(_bnI&&_DD(window.onbeforeunload))?"beforeunload":"unload",_FU);setTimeout("_X()",3000);

// ---------------------------------------
// End of hbx.js fine code.
// ---------------------------------------

// Timing and debugging
var HBXt3 = (new Date).getTime();
document.__tagtime = ('tag time:'    + (HBXt3 - HBXt0) + 
		      '(start:'      + (HBXt1 - HBXt0) +
		      ", ekProcess:" + (HBXt2 - HBXt1) +
		      ", hbx:"       + (HBXt3 - HBXt2) + ')' );

document.__beacon = unescape(_hbi.src == 'undefined'
			     ? ""
			     : _hbi.src.replace(/&/g, "<br>&"));

var ST_wo=window.onload?window.onload:0;
if (typeof(window.parent) != 'undefined' &&
    typeof(window.parent.controller) != 'undefined')
    window.onload=new Function("if(ST_wo)ST_wo();window.parent.controller.x()");

