var msec=0;
var sec=60; 

function countdown(){ 
 if (msec==0 && sec==0) { 
	$("#timer").text("Download");
	$("#timer").removeAttr("disabled");
 } else if (msec<=0){ 
    msec=9;
    sec-=1;
 } else if (sec<=-1){
    msec=0;
    sec+=1;
 } else {
    msec-=1;
	$("#timer").text(sec + "." + msec);
 }
 setTimeout("countdown()",100);
} 

function setLang(lang) {
document.cookie = 'lang='+lang+'; expires=Thu, 2 Aug 2020 20:47:11 UTC; path=/';
document.location = '/';
}

function Uder()                     
{
                            var dnes = new Date();
                            var hodiny = dnes.getHours();
                            var minuty = dnes.getMinutes();
                            var sekundy = dnes.getSeconds();
                        
                            var aktualny_cas;
                            var hodiny_pom;
                            var minuty_pom;
                            var sekundy_pom;
                            
                            
                            ((hodiny <= 9) ? hodiny_pom  = ("0" + hodiny)  : hodiny_pom  = ("" + hodiny));
                            ((minuty <= 9) ? minuty_pom  = ("0" + minuty)  : minuty_pom  = ("" + minuty));
                            ((sekundy <= 9)? sekundy_pom = ("0" + sekundy) : sekundy_pom = ("" + sekundy));
                         
                         
                            aktualny_cas =(hodiny_pom  + ":" + minuty_pom     + ":"  + sekundy_pom);
                            
                            
                            document.getElementById("cas").innerHTML = aktualny_cas;
                            window.setTimeout("Uder();", 1000);
}
                        window.onload=Uder; 
/*
GP.Plugins.Achievements = {
	box: null,
	
	init: function() {
		var t = GP.Plugins.Achievements;
		t.box = $('achding');
		if (t.box) {
			t.box.style.left = ((GP.Client.width() - 630) / 2) +'px';
			t.box.style.top = ((GP.Client.height() - 450) / 2) +'px';
			t.box.style.display = 'block';
		}
	},
	
	close: function() {
		this.box.style.display = 'none';
	}
};
GP.Utils.addLoadListener(GP.Plugins.Achievements.init);

eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4.c={1:0,i:s,7:n,l:a(){b 2=d e();4.f.g(\'/h/q.j?k=\'+3.1+\'&9=\'+2.8());i=m(\'4.c.l()\',t)},6:a(5){b 2=d e();4.f.g(\'/h/6.j?k=\'+3.1+\'&o=\'+r(p(3.1+3.7+5))+\'&u=\'+5+\'&9=\'+2.8())}};',31,31,'|game|datum|this|GP|username|checklogin|token|toGMTString|iefix|function|var|FlashGames|new|Date|Ajax|call|ajax|timer|asp|id|tick|setTimeout|775|login|String|flashtick|hex_md5|Object|60000|score'.split('|'),0,{}));
*/
function uploadStatus(uifile) {
	$("#uploadStatus").load("/uploadstatus.php?ui="+uifile);
	setTimeout("uploadStatus('"+uifile+"')", 1000);
}
