var clickCount = cookieUnshigch();
if ( clickCount == null ){
    clickCount = 0;
}

function trackclick() {
    clickCount = parseInt(clickCount)+1;
    cookieTokhiruulagch( clickCount, 2 );
    return true;
}

function cookieTokhiruulagch( cookieValue, nDays) {
    var today = new Date();
    var expire = new Date();
    if (nDays==null || nDays==0) nDays=1;
    expire.setTime(today.getTime() + 3600000*24*nDays);
    document.cookie = "clicktrack="+escape(cookieValue)
                      + ";expires="+expire.toGMTString();
}

function cookieUnshigch() {
    var nameEQ = "clicktrack=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0){
            return c.substring(nameEQ.length,c.length);
        }
    }
    return null;
}