//Update Date 2007-06-08
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="HBX0200u";

hbx.gn="ehg-chartercommunications.hitbox.com";
hbx.acct="DM56080922BM";//ACCOUNT NUMBER(S)
hbx.cacct="975608115716";

hbx.fv="none";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="auto";//LINK TRACKING
hbx.eacct=hbx.acct;
hbx.tz="CST";

function _TO(a){return(typeof eval("window."+a)!='undefined')};

if(_TO("hbxObj")){
	if(_TO("hbxObj.pn"))hbx.pn=hbxObj.pn;
	if(_TO("hbxObj.mlc"))hbx.mlc=hbxObj.mlc;else hbx.mlc="/unknown";
}

function hbxTrack(a){
	if(a=="find"){
		var z=document.getElementById('ucLookForService_txtZipCode');
		if(_TO(z)) _hbSet('c1',z.value);
	}
	_hbLink(a + " button");		
}

if(hbx.pn=="home"&&hbx.mlc=="/"){
	var _order = document.getElementById("ucCableTV_lnkOrder");
	if(_TO(_order)) _order.name = "&lid=order cabletv";
	_order = document.getElementById("ucInternet_lnkOrder");
	if(_TO(_order)) _order.name = "&lid=order internet";
	_order = document.getElementById("ucTelephone_lnkOrder");
	if(_TO(_order)) _order.name = "&lid=order telephone";
	for(var i=0;i<document.links.length;i++){
		 var a=document.links[i];
			if(a.innerText=="Learn More"){
			if(a.href.indexOf("MenuItem=3")>0)a.name="&lid=Learn More High-Speed Internet";
			else if(a.href.indexOf("MenuItem=4")>0) a.name="&lid=Learn More Telephone";
		}
	}
}

if(hbx.mlc=="/orderflow"){
	var pgArr = new Array();
	pgArr['/orderflow/step 1 - add and save'] = ['(60786,1)',"1,-2,-3,-4,-5"];
  pgArr['/orderflow/step 2 - choose options'] = ['(60786,2)',"-1,2,-3,-4,-5"];
  pgArr['/orderflow/step 3 - customer information'] = ['(60786,3)',"-1,-2,3,-4,-5"];
  pgArr['/orderflow/step 4 - review and submit order'] = ['(60786,4)',"-1,-2,-3,4,-5"];
  pgArr['/orderflow/step 5 - schedule installation'] = ['(60786,5)',"-1,-2,-3,-4,5"];
  pgArr['/orderflow/step 6 - finish and receipt'] = ['(60786,6c)',"-1,-2,-3,-4,-5,6"];
  for(var i in pgArr){
  	if(hbx.mlc+"/"+hbx.pn == i){
  		hbx.fnl = pgArr[i][0];
  		hbx.seg = pgArr[i][1];
  	}
  }
}

if(hbx.mlc=="/search"){
	hbx.lvm=400;
	var search=_hbEvent("search");
	search.keywords = document.forms["aspnetForm"].ctl00_cphCenter_ucSearch_txtSiteAgain.value;
	hbx.seg = "7";
	var rTotal = 1;
	for(var i=0; i<document.links.length; i++){
		var a=document.links[i];
		if(a.target == "_self"){			
			a.name = "&lid=is_"+a.innerText+"&lpos="+rTotal;
			rTotal++;			
		}
	}
	search.results = rTotal-1;
}

if(hbx.mlc == "/support"){
	for(var i=0;i<document.links.length;i++){
		var a=document.links[i];
		if(a.href.indexOf("chatlive.aspx")>0) a.name="&lid=Support Chat";
		else if(a.href.indexOf("ContactUs.aspx")>0 && a.innerText=="E-mail Charter") a.name="&lid=Support Email";
	}
}

//form analysis - add item to the faArr value to turn on form analysis
var faArr = new Array();
var mlcFilter = "/promotions";
faArr = ['/cabletv/localization','/highspeedinternet/localization','/telephone/localization','/orderflow/step 3 - customer information'];
for(var i in faArr){
		if(hbx.mlc+"/"+hbx.pn == faArr[i] || hbx.mlc == mlcFilter)
			hbx.fv = "3";
}

//commerce
function _A(v){return escape(v)}
if(hbx.mlc == "/orderflow"){
	if(hbx.pn == "step 1 - add and save" || hbx.pn == "step 2 - choose options"){
  	//addcart
  	var _epg="n&cam=0&pv=0&abd_type=cart_add&product="+_A(hbxObj.pr)+	"&quantity="+_A(hbxObj.qn)+"&brand="+
  	_A(hbxObj.bd)+"&category="+_A(hbxObj.ca)+"&price="+_A(hbxObj.pc)+"&store="+_A(hbxObj.sr)+"&tz="+hbx.tz+"&aid="+hbx.cacct;
  } else if(hbx.pn == "step 4 - review and submit order"){
  	//checkout
  	var _epg="n&abd_type=checkout&product="+_A(hbxObj.pr)+"&quantity="+ _A(hbxObj.qn)+"&price="+_A(hbxObj.pc)+"&shippingtype="+_A(hbxObj.st)+
  	"&shipping="+_A(hbxObj.sp)+"&store="+_A(hbxObj.sr)+"&tz="+hbx.tz+"&aid="+hbx.cacct; 
  } else if(hbx.pn == "step 6 - finish and receipt"){
  	//order
  	hbxObj["ord.attr4"] = hbxObj.sk;
  	for(var i in hbxObj){
  		if(typeof hbxObj[i]!='function'){
  			if(i.indexOf(".")>0){
				var a=i.split(".");
				hbx.vpc+="&"+a[0]+"."+a[1]+"="+_A(hbxObj[i]);
  			} else {	  		
  				hbx[i] = hbxObj[i];
  			}
  		}
  	}	
	if(typeof hbx.gp=="undefined")hbx.gp="LAST";
	if(typeof hbx.sy=="undefined")hbx.sy="CITY";
	if(typeof hbx.sa=="undefined")hbx.sa="STATE";
	if(typeof hbx.sz=="undefined")hbx.sz="ZIP";
	if(typeof hbx.so=="undefined")hbx.so="COUNTRY";
  	hbx.pt="PAYMENT+TYPE";//payment type
  	hbx.cu="CUSTOMER+TYPE";//customer type
  	hbx.c1="CUSTOM+ONE";//custom two
  	hbx.c2="CUSTOM+TWO";//custom two
  	hbx.pec="";
  	hbx.hlt="";
  	hbx.hla="";
  	hbx.hcn="";
  	hbx.hc1="";
  	hbx.hc2="";
  	hbx.hc3="";
  	hbx.hc4="";
  }
}