<!--
cy = new Object();

cy.documentdomain=window.document.domain;
cy.locationpathname=window.location.pathname;
cy.documentreferrer=window.document.referrer;
cy.CustomerCode='1920052367';

function cy_getCookie(c_name, suffix_allowed)
{
    // Search case-insensitive
    if (document.cookie.length>0)
    {
        if (suffix_allowed == false)
        {
            // Look for a complete word match
            c_start = document.cookie.toLowerCase().indexOf(c_name.toLowerCase() + "=");
        }
        else
        {
            // Look for a partial word match
            regexp = c_name.toLowerCase() + "(.*)=";
            c_start = document.cookie.toLowerCase().search(regexp);
        }
        
        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;
            }
            
            return decodeURIComponent(document.cookie.substring(c_start, c_end));
        } 
    }
    
    return "";
}

function cy_getImageSrc()
{
    var protocol;
    var port;
    var swd='abandonment.saas.seewhy.com';
    //var swd='seefarer';
    var path='/abandonment/WE/seewhy.gif';
    var ssl = window.location.protocol.toLowerCase().indexOf('https') >= 0;
    if (ssl)
    {
        protocol='https';
        port=8443;
    }
    else
    {
        protocol='http';
        port=8080;
    }
    var swi = protocol+'://'+swd+':'+port+path;
    var rn = Math.random();

    if (cy.SessionID == null)
    {
        var sessionId = cy_getCookie("JSESSIONID", false);
        if (sessionId == "")
        {
            sessionId = cy_getCookie("ASPSESSIONID", true);
        }
        if (sessionId == "")
        {
            sessionId = cy_getCookie("PHPSESSID", false);
        }
        if (sessionId == "")
        {
            sessionId = cy_getCookie("ASP.NET_SessionId", false);
        }
        if (sessionId == "")
        {
            sessionId = cy_getCookie("sid", false);
        }
    }
    else
    {
        sessionId = cy.SessionID;
    }

    var queryString="?Event=WebEvent"+
            "&CustomerCode=" +cy.CustomerCode+
            "&Server=" +cy.documentdomain+
            "&DefaultPageName=" +cy.locationpathname+
            "&Referrer=" +cy.documentreferrer+
            "&SessionID=" +sessionId+
            "&FunnelLevel=" +cy.FunnelLevel+
            "&Section=" +cy.Section+
            "&UserId=" +cy.UserId+
            "&Product=" +cy.Product+
            "&Quantity=" +cy.Quantity+
            "&Value=" +cy.Value+
            "&Custom1=" +cy.Custom1+
            "&Custom2=" +cy.Custom2+
            "&Custom3=" +cy.Custom3+
            "&Custom4=" +cy.Custom4+
            "&PageName=" +cy.PageName;

    src = swi+"/"+rn+queryString;

    document.getElementById("cy_image").src=src;
}
//-->