// BEGIN TAUNTON PRESS HBX2.0 CUSTOM VARIABLES

function _hbxStrip(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;
}

function _taunton_hbx_read_cookie(pattern, group, def){
	var r = new RegExp(pattern, "i");
	var m = r.exec(document.cookie);
	if(m)
		return m[group];
	else
		return def;
}

//PRODUCTION ACCOUNT
var _taunton_acct="DM550406D1FD83EN3";
var _taunton_cacct="975504132772";
//-------------------------------------------------------------------------
//var _taunton_acct="DM550406L1EN83EN3";//STAGE ACCOUNT NUMBER(S)
//var _taunton_cacct="975504135112";//STAGE COMMERCE ACCOUNT NUMBER(S)
//-------------------------------------------------------------------------
//var _taunton_acct="DM550406D4ER83EN3";//LOCAL ACCOUNT NUMBER(S)
//var _taunton_cacct="975504132219";//LOCAL COMMERCE ACCOUNT NUMBER(S)


if (typeof(_site_specific_acct) != "undefined") {
    if (_site_specific_acct != "") {
        _taunton_acct = _taunton_acct + ";" + _site_specific_acct + ";";
    }
}


if (location.hostname != undefined) {
	var hostname = location.hostname.toLowerCase();
	if (!(hostname == 'www.taunton.com' || hostname == 'store.taunton.com' || hostname == 'reg.taunton.com')) {
		//TEST ACCOUNT
		_taunton_acct="DM550406L1EN83EN3";
		_taunton_cacct="975504135112";
		if (typeof(_site_specific_acct) != "undefined") {
            if (_site_specific_acct != "") {
		        _taunton_acct = _taunton_acct + ";" + "DM550406D4ER83EN3;";//test site specific account
		    }
		}
    }
}

var _taunton_title=_hbxStrip(window.document.title);

var _taunton_custom1=_taunton_hbx_read_cookie("eRightsUserID=([^&;]+)", 1, "");//CUSTOM 1
var _taunton_custom2=_taunton_hbx_read_cookie("cchbx=([^;]+)", 1, "W0001");//CUSTOM 2
var _taunton_custom3=_taunton_hbx_read_cookie("WNT=[TF]", 0, "");//CUSTOM 3
var _taunton_custom4="";//CUSTOM 4

// END TAUNTON PRESS HBX2.0 CUSTOM VARIABLES
