// START of accelSurround.js
var adid, surroundTag;

function accelSetCookie(ckN,ckV,nD)
{   var today = new Date();
    var expire = new Date();

    if (nD==null || nD==0)
        nD=1;
    expire.setTime(today.getTime() + 3600000*24*nD);
    document.cookie = ckN+"="+escape(ckV) + ";expires="+expire.toGMTString();
}

function setSurround()
{
    if ((surroundTag == null)&&(adid != ""))
        {
            surroundTag="srnd="+adid+";";
            accelSetCookie("surroundId",adid,0);
        }
}

function getSurround() 
{
        var cookieName = "surroundId";
        var theCookie=""+document.cookie;
        var ind=theCookie.indexOf(cookieName);
        if (ind==-1 || cookieName=="")
            return "";

        var ind1=theCookie.indexOf(';',ind);

        if (ind1==-1)
            ind1=theCookie.length;

        surroundTag = unescape(theCookie.substring(ind+cookieName.length+1,ind1));

        if((surroundTag == null) || (surroundTag == ""))
            {
                surroundTag="";
            }
        else
            {
                surroundTag="srnd="+surroundTag+";";
            }
}

getSurround();
// End of accelSurround.js
