//version 1.2, added CustomerIndicator var

if (typeof(tagVars)=="undefined")
	tagVars = "";
	
if (typeof(lpUASorderTotal)!="undefined" && lpUASorderTotal!=""){
	tagVars = tagVars + '&PAGEVAR!OrderTotal=' + escape(lpUASorderTotal);
	tagVars = tagVars + '&PAGEVAR!' + lpUASunit + '_OrderTotal=' + escape(lpUASorderTotal);
	tagVars = tagVars + '&SESSIONVAR!Conversion=1';
}

if (typeof(lpUASapp_orderTotalGAO)!="undefined")
	tagVars = tagVars + '&PAGEVAR!appCompletedGAO=' + escape(lpUASapp_orderTotalGAO);

if (typeof(lpUASapp_orderTotal)!="undefined")
	tagVars = tagVars + '&PAGEVAR!appCompletedBank=' + escape(lpUASapp_orderTotal);

if (typeof(lpUASerrorCode)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!errorCode=' + escape(lpUASerrorCode);

if (typeof(lpUASerrorCounter)!="undefined")
	tagVars = tagVars + '&PAGEVAR!errorCounter=' + escape(lpUASerrorCounter);

if (typeof(lpUASvisitorID)!="undefined")
	tagVars = tagVars + '&VISITORVAR!sessionID=' + escape(lpUASvisitorID);

if (typeof(lpUAScustomerID)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!sessionIDCustomer=' + escape(lpUAScustomerID);
	
if (typeof(lpUASatID)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!sessionIDAT=' + escape(lpUASatID);

if (typeof(lpUASsection)!="undefined")
	tagVars = tagVars + '&PAGEVAR!section=' + escape(lpUASsection);
	
if (typeof(lpUASdesiredZip)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!desiredZip=' + escape(lpUASdesiredZip);
	
if (typeof(lpUASconversionStage)!="undefined")
	tagVars = tagVars + '&PAGEVAR!pageName=' + escape(lpUASconversionStage);

if (typeof(lpUASsegmentDetails)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!segment=' + escape(lpUASsegmentDetails);
	
if (typeof(lpUAScustomerIndicator)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!CustomerIndicator=' + escape(lpUAScustomerIndicator);
	
if (typeof(lpUASaccountType)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!accountType=' + escape(lpUASaccountType);
	
if(typeof(lpUASliquidNetWorth)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!LiquidNetWorth=' + escape(lpUASliquidNetWorth);

if (typeof(lpUASapplicationStartsGAO)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!appStartsGAO=' + escape(lpUASapplicationStartsGAO);

if (typeof(lpUASapplicationSavedGAO)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!appSavedGAO=' + escape(lpUASapplicationSavedGAO);
	
if (typeof(lpUASprimaryApplicantGAO)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!primaryApplicantGAO=' + escape(lpUASprimaryApplicantGAO);
	
if (typeof(lpUASsecondaryApplicantGAO)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!secondaryApplicantGAO=' + escape(lpUASsecondaryApplicantGAO);
	
if (typeof(lpUASorderDetailsBank)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!orderDetailsBank=' + escape(lpUASorderDetailsBank);
if (typeof(lpUASapplicationStartsBank)!="undefined")
	
	tagVars = tagVars + '&SESSIONVAR!appStartsBank=' + escape(lpUASapplicationStartsBank);

if (typeof(lpUASapplicationSavedBank)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!appSavedBank=' + escape(lpUASapplicationSavedBank);

if (typeof(lpUASaccountRegistrationTypeBank)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!accountRegistrationTypeBank=' + escape(lpUASaccountRegistrationTypeBank);

if (typeof(lpUASprimaryApplicantBank)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!primaryApplicantBank=' + escape(lpUASprimaryApplicantBank);

if (typeof(lpUASsecondaryApplicantBank)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!secondaryApplicantBank=' + escape(lpUASsecondaryApplicantBank);

if (typeof(lpUASpreApproved)!="undefined")
	tagVars = tagVars + '&PAGEVAR!preApproved=' + escape(lpUASpreApproved);

if (typeof(lpUASreserveFund)!="undefined")
	tagVars = tagVars + '&PAGEVAR!reserveFund=' + escape(lpUASreserveFund);
	
if (typeof(lpUASunit)!="undefined")
	tagVars = tagVars + '&PAGEVAR!unit=' + escape(lpUASunit);

if (typeof(lpUASwebsite)!="undefined" && typeof(lpUASunit)!="undefined")
	tagVars = tagVars + '&PAGEVAR!UASwebsiteUnit=' + escape(lpUASwebsite+":"+lpUASunit);

var INITIAL_MAX_SIZE = 300;
var MAX_TAGVARSURL_SIZE = 1600;
var INITIAL_STRING = document.location.toString() + document.title;
var STRING_MAX_SIZE = INITIAL_STRING.length + INITIAL_MAX_SIZE;

if ((typeof(tagVars) == "undefined") || (tagVars == null))
	tagVars = "";
while ((tagVars.length + STRING_MAX_SIZE > MAX_TAGVARSURL_SIZE) && (tagVars.length > 0)) {
	var idx = tagVars.lastIndexOf("&");
	if (idx > 0)
		tagVars = tagVars.substring(0, idx);
	else
		tagVars = "";
}