var get_age_birth = new Date(1989, 8/*POZOR! 0=Leden,11=Prosinec*/, 10, 12, 31, 0);
function ge_n(n, a, b, c)
{
    if(n == 1) return '01 ' + a;
    if(n >= 2 && n <= 4) return '0' + n + ' ' + b;
    return (n < 10 ? '0' : '') + n + ' ' + c;
}
function get_age()
{
    now = new Date();
    tmpfrom = new Date(get_age_birth);
    tmpfrom.setFullYear(now.getFullYear());
    if(now - tmpfrom < 0) tmpfrom.setFullYear(now.getFullYear() - 1);
    ms = now - tmpfrom;
    years = tmpfrom.getFullYear() - get_age_birth.getFullYear();
    days = Math.floor(ms / 1000 / 3600 / 24); ms -= days * 1000 * 3600 * 24;
    hours = Math.floor(ms / 1000 / 3600); ms -= hours * 1000 * 3600;
    mins = Math.floor(ms / 1000 / 60); ms -= mins * 1000 * 60;
    secs = Math.floor(ms / 1000); ms -= secs * 1000;
    return years + " let, " + ge_n(days, 'den', 'dny', 'dnù') + ", " + ge_n(hours, 'hodina', 'hodiny', 'hodin') + ", " + ge_n(mins, 'minuta', 'minuty', 'minut') + ", " + ge_n(secs, 'sekunda', 'sekundy', 'sekund') + ", " + (ms<10?'0':'')+(ms<100?'0':'')+ms + ' ms';
}
document.write('<span id="agecounter">' + get_age() + '</span>');
setInterval('document.getElementById("agecounter").innerHTML = get_age();', 33);

