<!--
var MAX_XML_SIZE = 1600;
function LPParseOrderInput(input) {
	var xml = "";
	var overallTotalPrice = 0;
	var products = input.split(",");
	var cookielen = document.cookie.length;
	var urllen = document.location.toString().length;
	var tooLong=0;
	for (i = 0; i < products.length; i++) {
		if ((products[i] == null) || (products[i] == "")) continue;
		var product = products[i].split(";");
		var Category = null;
		var ProductName = null;
		var Quantity = null;
		var TotalPrice = null;
		var iTotalPrice = 0;
		if (typeof(product[0]) != "undefined") Category = product[0];
		if (typeof(product[1]) != "undefined") ProductName = product[1];
		if (typeof(product[2]) != "undefined") Quantity = product[2];
		if (typeof(product[3]) != "undefined") TotalPrice = product[3];
		if (TotalPrice != null) {
		 	iTotalPrice = parseFloat(TotalPrice);
			if (! isNaN(iTotalPrice))
				overallTotalPrice += iTotalPrice;
			else
				TotalPrice = null;
		}
		var oneXml = LPFillOrderXML(i + 1, Category, ProductName, Quantity, TotalPrice);
		if (xml.length + oneXml.length + cookielen + urllen + tagVars.length > MAX_XML_SIZE) {
			if (tooLong==0) xml += "<TooLong>";
			tooLong=1;
		} else {
			xml += oneXml;
		}
	}
	var result = new Object();
	result.TotalPrice = overallTotalPrice;
	result.OrderXml = xml;
	return result;
}
function LPFillOrderXML(index, Category, ProductName, Quantity, TotalPrice) {
	var xml = "";
	xml = "<item%20seq=\"" + index + "\"";
	if (Category != null && Category!="") xml += "%20category=\"" + escape(Category) + "\"";
	if (ProductName != null && ProductName!="") xml += "%20name=\"" + escape(ProductName) + "\"";
	if (Quantity != null && Quantity!="") xml += "%20quantity=\"" + escape(Quantity) + "\"";
	if (TotalPrice != null && TotalPrice!="") xml += "%20price=\"" + escape(TotalPrice) + "\"";
	xml += "/>";
	return xml;
}

var lpPosY = 150;
var lpPosX = 100;
var lpInviteTimeout=120;

var tagVars;
if (typeof(tagVars)=="undefined")
tagVars = '';

if (typeof(s_pageName)!="undefined" && s_pageName!=null)
    tagVars = tagVars + '&PAGEVAR!c_PageName=' + escape(s_pageName);
if (typeof(s_channel)!="undefined" && s_channel!=null)
    tagVars = tagVars + '&PAGEVAR!unit=' + escape(s_channel);
if (typeof(s_pageType)!="undefined" && s_pageType!=null)
    tagVars = tagVars + '&PAGEVAR!c_PageType=' + escape(s_pageType);
if (typeof(s_campaign)!="undefined" && s_campaign!=null)
    tagVars = tagVars + '&PAGEVAR!c_Campaign=' + escape(s_campaign);
if (typeof(s_prop1)!="undefined" && s_prop1!=null)
    tagVars = tagVars + '&PAGEVAR!c_Prop1=' + escape(s_prop1);
if (typeof(s_prop2)!="undefined" && s_prop2!=null)
    tagVars = tagVars + '&PAGEVAR!c_Prop2=' + escape(s_prop2);
if (typeof(s_events)!="undefined" && s_events!=null)
    tagVars = tagVars + '&PAGEVAR!orderAction=' + escape(s_events);

if (tagVars.length > 0)
    tagVars = tagVars.substring(1);

if (typeof(s_events)!="undefined") {
    var cvPrefix='';
    if (s_events=="purchase")
    	cvPrefix='order';
    else if (s_events!=null)
    	cvPrefix='action';

    if (cvPrefix!='') {
    	if (typeof(s_products)!="undefined" && s_products!=null) {
    		var lpParseResult = LPParseOrderInput(s_products);
    		tagVars = tagVars + '&PAGEVAR!'+cvPrefix+'Total=' + lpParseResult.TotalPrice;
    		tagVars = tagVars + '&PAGEVAR!'+cvPrefix+'Details=' + lpParseResult.OrderXml.toString();
    	} else {
    		tagVars = tagVars + '&PAGEVAR!'+cvPrefix+'Details=<Missing>';
    	}
    }
}
// -->