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(lpUAScustomerProfile)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!CustomerProfile=' + escape(lpUAScustomerProfile);

if (typeof(lpUASphoneNumber)!="undefined")
	tagVars = tagVars + '&PAGEVAR!PhoneNumber=' + escape(lpUASphoneNumber);

if (typeof(lpUASemail)!="undefined")
	tagVars = tagVars + '&PAGEVAR!Email=' + escape(lpUASemail);

if (typeof(lpUASloginCount)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!LoginCount=' + escape(lpUASloginCount);

if (typeof(lpUASsubExpiration)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!SubExpiration=' + escape(lpUASsubExpiration);

if (typeof(lpUASproductType)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!ProductType=' + escape(lpUASproductType);

if (typeof(lpUAScoaching)!="undefined")
	tagVars = tagVars + '&SESSIONVAR!Coaching=' + escape(lpUAScoaching);

if (typeof(lpUASsection)!="undefined")
	tagVars = tagVars + '&PAGEVAR!Section=' + escape(lpUASsection);	
	
// Checks the length of tagVars and trims tagVars if tagVars exceeds 1600 chars.
var INITIAL_MAX_SIZE = 300;
var MAX_TAGVARSURL_SIZE = 1900;
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 = "";
}
