function time_countdown()
{
var d0,d1,dd, n,d,h,m,s, tt, x,y, url, img;
d0 = new Date();
//d1 = new Date("July 21, 2008");
//d1 = new Date(2008,7-1,21+1);
//d1 = new Date(2014,2-1,28+1);	//28. 2. 2014
//d1 = new Date(2014,3-1,7+1);	//7. 3. 2014
//d1 = new Date(2015,3-1,13+1);	//27. 2. 2015
//d1 = new Date(2016,2-1,29+1);	//27. 2. 2015
//d1 = new Date(2016,4-1,15+1);	//14. 3. 2016
d1 = new Date(2017,2-1,28+1);	//28.2.2017
dd = d1.getTime() - d0.getTime();
var obj_script = document.getElementById("script_terminy");
var obj_banner = document.getElementById("banner_terminy");
if (dd>0)
{
x = 0;		y = 24*60*60*1000;	d = Math.floor((dd-x)/y);
x+= d*y;	y = 60*60*1000;		h = Math.floor((dd-x)/y);
x+= h*y;	y = 60*1000;		m = Math.floor((dd-x)/y);
x+= m*y;	y = 1000;		s = Math.floor((dd-x)/y);
tt = "<div class=\"f0\">"     + d + " " + (d==1?"den":     (d>1 && d<5?"dny"     : "dn&#367;")) + "<\/div>";
tt+= "<div class=\"f1\">" + h + " " + (h==1?"hodina":  (h>1 && h<5?"hodiny"  : "hodin")) + "<\/div>";
tt+= "<div class=\"f2\">" + m + " " + (m==1?"minuta":  (m>1 && m<5?"minuty"  : "minut")) + "<\/div>";
tt+= "<div class=\"f3\">" + s + " " + (s==1?"sekunda": (s>1 && s<5?"sekundy" : "sekund")) + "<\/div>";
t = tt;
obj_script.innerHTML = t;
}
else
{
obj_script.style.display = "none";
//tt = 'baner_fpf_7_3_2014.gif';
//tt = 'baner_fpf_02_04.gif'
img = '800_baner_2017_04.gif';
url = 'http://www.slu.cz/fpf/cz/studijni-oddeleni/prijimaci-rizeni/2017-2018/';
img = 'http://www.slu.cz/fpf/cz/site/banner-prihlaska/'+img;
tt = '<a href="'+url+'"><img src="'+img+'"></a>';
obj_banner.innerHTML = tt;
clearInterval(time_countdown0);
}
}
time_countdown();
var time_countdown0 = setInterval("time_countdown()",1000);
