(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.setAttribute("signed", "yes");
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-16929591-1']);


function ClickTracker($Domain) {
    window._gaq.push(['_trackEvent', $Domain, 'clickout', 'links list']);
    TrackSave('L3BocC90cmFja2FsbC5waHA/');
    window._gaq.push(['_trackPageview']);
}
function InsideClickTracker() {
    //window._gaq.push(['_trackEvent', $Domain, 'clickout', 'links list']);
    TrackSave('L3BocC90cmFja2FsbC5waHA/');
    window._gaq.push(['_trackPageview']);
}
function TrackSave(url) 
{
    img = new Image(1,1);
    img.src = Base64.decode(url) + REQUEST_URI;
    
}


function TestCookie() 
{

    var d = new Date();

    var tStamp = REMOTE_ADDR + d.getDate().toString() + d.getMonth().toString();
    var cCookie = '';//GetCookie('bko40');

    // first time  
    if (cCookie == '') {
        //SetCookie('bko40', tStamp,180);
    }
    // retun at least next day
    else if (cCookie != tStamp) {
        TrackSave('L3BocC90cmFjay5waHA/');
        //SetCookie('bko40', tStamp, 180);
    }    
     

}


function SetCookie(name, value, days) {
    var expires = '';
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        expires = "; expires=" + date.toGMTString();
    }

    document.cookie = name + "=" + value + expires + "; path=/";
}

function GetCookie(name) {
    var ca;
    var result = '';
    var nameEQ = name + "=";

    try {

        sVal = document.cookie.replace(/\s+/g, '');

        ca = document.cookie.split("=");
        iIndex = ca.length - 1;

        result = ca[iIndex];

    }
    catch (ex) {
    }

    return result;
}

