function blogCounter() {
    var targetDate = new Date(2007, 6 - 1, 9, 0, 0, 0);
    var blogCounterDigit10 = document.getElementById('blogcounterdigit10');
    var blogCounterDigit1 = document.getElementById('blogcounterdigit1');
    if (blogCounterDigit10 && blogCounterDigit1) {
        var timeDiff = Math.ceil((targetDate - new Date()) / (60*60*24*1000));
        blogCounterDigit10.src = 'http://www.blogres.si/blogcounter/' + Math.floor((timeDiff % 100) / 10) + '.gif';
        blogCounterDigit1.src = 'http://www.blogres.si/blogcounter/' + (timeDiff % 10) + '.gif';
    }
}

