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="HBX0250u";hbx.gn="ehg-verizon.hitbox.com";

var cv16 = "";
var cv17 = "";
var cv5 = "";
var cv19 = "";
var cv13 = "";

var domain=document.location.hostname
//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
//MULTI-LEVEL CONTENT CATEGORY

if(domain.indexOf("www22")==0 || domain.indexOf('espanol.verizon.com')==0 )  
   hbx.acct="DM550928B8DM;DM560507I8NC";//ACCOUNT NUMBER(S)
else
   hbx.acct="DM560412PISS;DM560507L6WN";

var currentUrlB = window.location.href.toLowerCase();


if (currentUrlB.indexOf('residential/highspeedinternet/upgrade') != -1 || currentUrlB.indexOf('residential/highspeedinternet/choices') != -1)
{   
	hbx.pn=document.getElementById("Template_Wrapper_Begin1:HdnPageName").value;//PAGE NAME(S)
    hbx.mlc=document.getElementById("Template_Wrapper_Begin1:HdnPageUrl").value;//MultiLevel Content
    hbx.pndef=document.getElementById("Template_Wrapper_Begin1:HdnPageTitle").value;//DEFAULT PAGE NAME

}
else if (currentUrlB.indexOf('/content/contactus') != -1 || currentUrlB.indexOf('/content/contactus/') != -1 )
{
   hbx.pn=document.getElementById("ctl00_Template_Wrapper_Begin1_HdnPageName").value;//PAGE NAME(S)
   hbx.mlc=document.getElementById("ctl00_Template_Wrapper_Begin1_HdnPageUrl").value;//MultiLevel Content
   hbx.pndef=document.getElementById("ctl00_Template_Wrapper_Begin1_HdnPageTitle").value;//DEFAULT PAGE NAME	
}
 else {
    hbx.pn=document.getElementById("_ctl0_Template_Wrapper_Begin1_HdnPageName").value;//PAGE NAME(S)
    hbx.mlc=document.getElementById("_ctl0_Template_Wrapper_Begin1_HdnPageUrl").value;//MultiLevel Content
    hbx.pndef=document.getElementById("_ctl0_Template_Wrapper_Begin1_HdnPageTitle").value;//DEFAULT PAGE NAME
    }
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY
hbx.lc="y"; //force lower case page names 

//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="manual";//LINK TRACKING

if(document.getElementById('hdnPersonalization') != null && document.getElementById('hdnPersonalization') != undefined)
{
    if(document.getElementById('hdnPersonalization').value == 'Y')
    {
        hbx.lt="manual";
    }
}
//alert(hbx.lt);

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="";//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
hbx.hc1="";//CUSTOM 1
hbx.hc2="";//CUSTOM 2
hbx.hc3="";//CUSTOM 3
hbx.hc4="";//CUSTOM 4
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES

//INSERT CUSTOM EVENTS

if(domain.indexOf('espanol')==0)
   hbx.hc4="spanish";
else
   hbx.hc4="";

//END EDITABLE SECTION

var cv = _hbEvent("cv");

//alert(document.cookie);
var hbxIsVisited = getCookie("IsVisited");
var hbxInitialVisit = getCookie("InitialVisit");
var hbxLQ     = getSubCookie("VzLQPro","LQ");
var CReload = getSubCookie("CReload","Y");
var hbxIsPersonal = getSubCookie("VzGlobal_p","Personal");
var hbxPreviousLocation = getCookie("PreviousLocation");
var hbxTraceLocation = getCookie("TraceLocation");
var hbxPQSPreviousLocation = getCookie("PQSPreviousLocation");
var hbxxpid = getCookie("XPID");

var strPresentLocation = '';
var expdate=new Date();
expdate.setDate(expdate.getDate()+30);


if(getSubCookie("vzpers","adr1") !=null)
	strPresentLocation = getSubCookie("vzpers","adr1");
if(getSubCookie("vzpres","STATE")!=null)
	strPresentLocation = strPresentLocation + getSubCookie("vzpers","STATE");
if(getSubCookie("vzpres","CITY")!=null)
	strPresentLocation = strPresentLocation + getSubCookie("vzpers","CITY");
if(getSubCookie("vzpres","ZIPCODE")!=null)
	strPresentLocation = strPresentLocation + getSubCookie("vzpers","ZIPCODE");
	
try{
cv16 =document.getElementById('hdCVC16Val').value;
if(cv16 !=null && cv16 !='')
{
	if(hbxxpid !=null)
        cv.c16 = document.getElementById('hdCVC16Val').value +'|'+ hbxxpid.replace('|','').replace(' ','');
	else
        cv.c16 = document.getElementById('hdCVC16Val').value;
}

cv17 =document.getElementById('hdCVC17Val').value;
if(cv17 !=null && cv17 !='')
{
    if(hbxxpid !=null)
        cv.c17 = document.getElementById('hdCVC17Val').value +'|'+ hbxxpid.replace('|','').replace(' ','');
    else
        cv.c17 = document.getElementById('hdCVC17Val').value;
}


if(hbxxpid !=null)
{
    var arrxpid = hbxxpid.split("|");
}
else
{
    var arrxpid = ""
}

if(cv17 !=null && cv17 !='')
	{
		//if(cv17 == "PostQualReturn")
		//{
		    //alert('PQR');
			var firststring = "";
			cv5 = document.getElementById("hdCVC5Val").value;
			if(cv5 != null)
			{
				//var cv5value = document.getElementById("hdCVC5Val").value;
				if(cv5 != "") {
					var array = cv5.split("|");
					array[0] = array[0].replace("initial","pqr");
					//cv.c5 = array[0] + "|" + "PostQualReturn_" + document.getElementById("Xp1VisID").value + "_" + document.getElementById("xp1ProfileId").value;
					//cv.c5 = array[0] + "|" + "PostQualReturn_" + hbxxpid.replace('|','').replace(' ','');
                    if(hbxxpid !=null)
                    {
                        //cv.c5 = array[0] + "|" + "PostQualReturn_" + hbxxpid.replace('|','').replace(' ','');
                        cv.c5 = array[0];
                        }
                    else
                    {
                        //cv.c5 = array[0] + "|" + "PostQualReturn"
                        cv.c5 = array[0];
                        }
				} else {
					cv.c5 = cv5;
				}
			}   
			if(document.getElementById("hdCVC13Val") != null)
			{
				var cv13value = document.getElementById("hdCVC13Val").value;
				if (cv13value != "") {
					var array = cv13value.split("|");
					array[0] = array[0].replace("initial","pqr");
					if(array.length > 1)
					{
						var array2 = array[1].split(" ");
						//cv.c13 = array[0] + "|" + array2[0] + "+" + document.getElementById("xp1ProfileId").value;
						if(hbxxpid !=null)
						{
                            //cv.c13 = array[0] + "|" + array2[0] + "+" + arrxpid[1];
                            cv.c13 = array[0];
                        }
                        else
                        {
                            //cv.c13 = array[0] + "|" + array2[0];
                            cv.c13 = array[0];
                        }
					}
				} else {
					cv.c13 = cv13value;
				}
			}
			if(document.getElementById("hdCVC19Val") != null)
			{
				var cv19value = document.getElementById("hdCVC19Val").value;
				if (cv19value != "") {
					var array = cv19value.split("|");
					array[0] = array[0].replace("initial","pqr");
					//cv.c19 = array[0] + "|" + document.getElementById("xp1ProfileId").value;
					if(hbxxpid !=null)
					{
                        //cv.c19 = array[0] + "|" + arrxpid[1];
                        cv.c19 = array[0];
                    }
                    else
                    {
                        //cv.c19 = array[0] + "|";
                        cv.c19 = array[0];
                    }
					
				} else {
					cv.c19 = cv19value;
				}			
			}
		//}
	}


} catch(e){}

//debugger;
//if(hbxIsVisited != null && hbxInitialVisit == null)
//  {
//   	if(hbxLQ==null || hbxLQ=="")
//    	{
//      		cv.c17 = "PostQualPublic";
//    	}
//    	else
//    	{
//		if(hbxTraceLocation !=null)
//		{
//			if(hbxPreviousLocation !=null)
//			{
//				if(hbxPreviousLocation != strPresentLocation)
//				{
//					cv.c17 = "PostQualChange";
//				}
//				else
//				{
//				    if(hbxIsPersonal == 'Y')
//				    {
//				        cv.c17 = "PostQualReturn";
//				    }
//				    else
//				    {
//				        cv.c17 = "PostQualPublic";
//				    }
//					
//				}	
//			}
//			else
//			{
//				if(hbxPQSPreviousLocation == null)
//				{
//					cv.c17 = "PostQualSession";//cv.c17 = "PostQualReturn";//cv.c16 = "PostQual";
//					document.cookie="PQSPreviousLocation="+ strPresentLocation +";path=/;domain=.verizon.com;";
//                }
//                else
//                {
//				    if(hbxPQSPreviousLocation != strPresentLocation)
//				    {
//					    cv.c17 = "PostQualChange";
//					}
//				    else
//				    {
//					    cv.c17 = "PostQualSession";
//					}
//                }

//     				
//			}
//		}
//		else
//		{
//     			if(hbxIsPersonal == 'Y')
//			    {
//			        cv.c17 = "PostQualReturn";
//			    }
//			    else
//			    {
//			        cv.c17 = "PostQualPublic";
//			    }
//			document.cookie="PreviousLocation="+ strPresentLocation +";path=/;domain=.verizon.com;expires="+expdate.toGMTString();
//		}
//    	}
//  }
//  else  // initial visit
//  {
//	if(hbxLQ==null || hbxLQ=="")
//    	{
//      		cv.c16 = "PreQual";
//    	}
//    	else
//    	{
//		if(hbxPreviousLocation !=null)
//		{
//			if(hbxPreviousLocation != strPresentLocation)
//			{
//				cv.c16 = "PostQualChange";
//			}
//			else
//			{
//			    if(hbxIsPersonal == 'Y')
//			    {
//			        cv.c16 = "PostQual";
//			    }
//			    else
//			    {
//			        cv.c16 = "PostQualPublic";
//			    }
//				
//			}	
//		}
//		else
//		{
//		        if(hbxIsPersonal == 'Y')
//			    {
//			        cv.c16 = "PostQual";
//			    }
//			    else
//			    {
//			        cv.c16 = "PostQualPublic";
//			    }
//			document.cookie="PreviousLocation="+ strPresentLocation +";path=/;domain=.verizon.com;expires="+expdate.toGMTString(); 
//		}
//    	}
//	
//	document.cookie="IsVisited=Y;path=/;domain=.verizon.com;expires="+expdate.toGMTString(); 
//        document.cookie="InitialVisit=Y;path=/;domain=.verizon.com;";
//  }
//document.cookie="TraceLocation=Y;path=/;domain=.verizon.com;";



 

if (currentUrlB.indexOf('residential/highspeedinternet/upgrade') != -1 || currentUrlB.indexOf('residential/highspeedinternet/choices') != -1)
{   	

}


else if (currentUrlB.indexOf('/content/contactus') != -1 || currentUrlB.indexOf('/content/contactus/') != -1 )
{
   hbx.pn=document.getElementById("ctl00_Template_Wrapper_Begin1_HdnPageName").value;//PAGE NAME(S)
   hbx.mlc=document.getElementById("ctl00_Template_Wrapper_Begin1_HdnPageUrl").value;//MultiLevel Content
   hbx.pndef=document.getElementById("ctl00_Template_Wrapper_Begin1_HdnPageTitle").value;//DEFAULT PAGE NAME	
}
else {
    if((document.getElementById("_ctl0_Template_Wrapper_Begin1_HdnABTestVersion").value != '') && (document.getElementById("_ctl0_Template_Wrapper_Begin1_HdnABTestVersion").value != null))
    {
	    var hdnABTestVersionValue = document.getElementById("_ctl0_Template_Wrapper_Begin1_HdnABTestVersion").value;
    	
	    if((hdnABTestVersionValue !='') && (hdnABTestVersionValue != null))
	    {
		    cv.c9 = hbx.mlc + "/" + hbx.pn + "|" + hdnABTestVersionValue;
	    } 
    }
}

function hbxMediaPlay(hbxFileName,hbxCurrentPos,hbxEndPos,hbxFlashVersion)
{
	_hbSet('m.f',hbxFileName);
	_hbSet('m.cp',hbxCurrentPos);
	_hbSet('m.ep',hbxEndPos);
	_hbSet('m.s','play');
	_hbSet('m.cl','Flash Player');
	_hbSet('m.cv',hbxFlashVersion);
	_hbSet('m.tt','e');
	_hbSend();
}

function hbxMediaPause(hbxFileName,hbxCurrentPos,hbxEndPos,hbxFlashVersion)
{
	_hbSet('m.f',hbxFileName);
	_hbSet('m.cp',hbxCurrentPos);
	_hbSet('m.ep',hbxEndPos);
	_hbSet('m.s','pause');
	_hbSet('m.cl','Flash Player');
	_hbSet('m.cv',hbxFlashVersion);
	_hbSet('m.tt','e');_hbSend();
}

function hbxMediaStop(hbxFileName,hbxCurrentPos,hbxEndPos,hbxFlashVersion)
{
	_hbSet('m.f',hbxFileName);
	_hbSet('m.cp',hbxCurrentPos);
	_hbSet('m.ep',hbxEndPos);
	_hbSet('m.s','stop');
	_hbSet('m.cl','Flash Player');
	_hbSet('m.cv',hbxFlashVersion);
	_hbSet('m.tt','e');_hbSend();
}

function hbxMediaPlayProgress(hbxFileName,hbxCurrentPos,hbxEndPos,hbxFlashVersion)
{
	_hbSet('m.f',hbxFileName);
	_hbSet('m.cp',hbxCurrentPos);
	_hbSet('m.ep',hbxEndPos);
	_hbSet('m.s','playp');
	_hbSet('m.cl','Flash Player');
	_hbSet('m.cv',hbxFlashVersion);
	_hbSet('m.tt','e');_hbSend();
}


function getSubCookie(c_name, sub_key) { if (document.cookie.length > 0) { c_start = document.cookie.indexOf(c_name + "="); if (c_start != -1) { c_start = c_start + c_name.length + 1; c_end = document.cookie.indexOf(";", c_start); if (c_end == -1) { c_end = document.cookie.length; } var subCookie = unescape(document.cookie.substring(c_start, c_end)); s_start = subCookie.indexOf(sub_key + "="); if (s_start != -1) { s_start = s_start + sub_key.length + 1; s_end = subCookie.indexOf("&", s_start); if (s_end == -1) { s_end = subCookie.length; } return subCookie.substring(s_start, s_end); } } return null; } var x = unescape(dc.substring(begin + prefix.length, end)); return unescape(dc.substring(begin + prefix.length, end)); }

<!--END Omniture HBX CODE-->
