
function vsDoTracking(serverUrl)
{
var vsUrl,
vs,
vsImageString,
vsObj,
vsTrackingParameters,
vsTradeUrl,
vsTradeBool,
vsStrProtocol,
vsCookieVal,
vsCookieEndStr,
vsCugSource,
vsExtraElement;
if (serverUrl === undefined) serverUrl = "";
vsTrackingParameters = new Array();
vs = new Array();
vsUrl= window.location.href;
if (!(window.trackingInfo === undefined))
{
if (trackingInfo !== null)
{
vs = trackingInfo;
}
}
try
{
vsExtraElement = (vs.pageidextra === undefined) ? "" : vs.pageidextra;
vs.hostname = document.nav_form.hostname.value;
vs.protocol = document.nav_form.protocol.value;
vs.audience = document.nav_form.audience.value;
vs.pageid = document.nav_form.pageid.value + vsExtraElement;
vs.logintype = document.nav_form.logintype.value;
vs.scheme = document.nav_form.scheme.value;
vs.tier = document.nav_form.tier.value;
vs.language = document.nav_form.language.value;
vs.country = document.nav_form.country.value;
}
catch (e)
{
}
if (!(window.vsHardCodedName === undefined))
{
if (window.vsHardCodedName !== null)
{
vsIndex = vsHardCodedName.lastIndexOf("/");
vs.hardcodedname = vsHardCodedName.substring(vsIndex + 1, vsHardCodedName.length);
}
}
vs.dt = document.title;
vs.dr = document.referrer;
vs.cb = new Date().getTime();
vs.sw = screen.width;
vs.sh = screen.height;
vs.cd = screen.colorDepth;
if ((vsUrl.indexOf("?") > -1) && (vsUrl.indexOf("?") != (vsUrl.length - 1)))
{
vs = vsSplitParameters(vsUrl, vs);
}
if (!(window.functionalInfo === undefined))
{
if (functionalInfo !== null)
{
vs = vsSplitParameters(functionalInfo, vs);
}
}
vsStrProtocol = window.location.protocol;
vsCookieVal = getCookie("texcookie");
if (vsCookieVal)
{
vsTradeUrl = window.location.href;
vsTradeBool = vsTradeUrl.indexOf("trade");
if (vsTradeBool > 0)
{
vsCookieEndStr = vsCookieVal.indexOf(".");
if (!vsCookieEndStr)
{
vsCookieEndStr = vsCookieVal.length ;
}
vsCookieVal = vsCookieVal.substring(0, vsCookieEndStr);
vsImageString += "&" + "trade_user=" + vsCookieVal;
}
}
if(!(window.cugsource === undefined))
{
if(window.cugsource !== null)
{
vs.cugsource = window.cugsource;
}
}
vsImageString = "<img src=\"" + serverUrl + "/cms/s.gif?Log=1";
for (vsObj in vs)
{
vsImageString = vsImageString + "&" + vsObj + "=" + escape(vs[vsObj]);
vsTrackingParameters[vsObj] = escape(vs[vsObj]);
}
vsImageString += "\" height=\"1\" width=\"1\" alt=\"\" />";
return vsImageString;
}
function vsSplitParameters(vsQueryList, vsNewArray)
{
var vsQueryStart,
vsQueryArray,
vsKeyArray,
vsKey,
vsValue,
vsIndex,
i;
vsQueryStart = vsQueryList.lastIndexOf("?");
if (vsQueryStart > -1)
{
vsQueryList = vsQueryList.substring(vsQueryStart+1,vsQueryList.length);
}
vsQueryArray = vsQueryList.split("&");
for (i = 0; i < vsQueryArray.length; i++)
{
vsKeyArray = vsQueryArray[i].split("=");
vsKey = vsKeyArray[0];
vsValue= vsKeyArray[1];
vsNewArray[vsKey] = vsValue;
}
return vsNewArray;
}