
function vlzuc() {

	document.write('<div class="d-underconstruct">TENTO WEB JE VE VÝSTAVBĚ - OČEKÁVANÉ PLNÉ SPUŠTĚNÍ DO KONCE DUBNA</div>');
}

function load_script(url) {

	var head=document.getElementsByTagName('head').item(0);
	var old=document.getElementById('last_id');
	if (old)head.removeChild(old);
	script=document.createElement('script');
	script.src=url;
	script.type='text/javascript';
	script.defer=true;
	script.id='last_id';
	void(head.appendChild(script));
	}


function resizeokno(sx,sy) {

	var sw=screen.width-40;
	var sh=screen.height-40;

	if (sx>sw) sx=sw;
	if (sy>sh) sy=sh;

	window.resizeTo(sx,sy);
	}

function resizehra(sx,sy,ii) {

	try {

		var tmp1=document.getElementById('obj1');
		tmp1.width=sx;
		tmp1.height=sy;
		}
	catch(e) {

		}

	try {

		var tmp2=document.getElementById('obj2');
		tmp2.width=sx;
		tmp2.height=sy;
		}
	catch(e) {

		}

	try {

		for (i=0;i<=10;i++) {

			if (i==ii)
				document.getElementById('i-'+i).className='sel';
			else
				document.getElementById('i-'+i).className='';
			}
		}
	catch(e) {

		}

	resizeokno(sx+320,sy+150);
	}


function usergames(idgame,iduser,mhash,mset) {

	load_script('/_data/clscripts/usergames.php?id='+idgame+'&iduser='+iduser+'&h='+mhash+'&set='+((mset)?(1):(0)));
	}

function hrahodnot(idgame,iduser,mhash,mset) {

	load_script('/_data/clscripts/hrahodnot.php?id='+idgame+'&iduser='+iduser+'&h='+mhash+'&set='+mset);
	}



var pgz_tu_menu='';

function tu_popupmenu(blok) {

	if (blok==pgz_tu_menu) return true;

	if (pgz_tu_menu!='') {

		document.getElementById('tu-'+pgz_tu_menu).style.visibility='hidden';
		document.getElementById('tu-h'+pgz_tu_menu).style.backgroundColor='';

		pgz_tu_menu='';
		}

	if (blok!='') {

		pgz_tu_menu=blok;

		document.getElementById('tu-'+pgz_tu_menu).style.visibility='visible';
		document.getElementById('tu-h'+pgz_tu_menu).style.backgroundColor='#314B2B';
		}
	}

function tu_searchinput() {

	tmp=document.getElementById('searchinput');

	if (tmp.value.length>0)
		tmp.className='input-active';
	else
		tmp.className='input';

	}

function tu_searchinputfb(set) {

	tmp=document.getElementById('searchinput');
	if (set==1 || tmp.value.length>0)
		tmp.className='input-active';
	else
		tmp.className='input';

	}



var zp=new Array();
var IE=document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE);

document.onmousemove=zp_mousemove;

function zp_mousemove(e) {

	if (IE) {
		
		if (document.body.scrollTop==0)
			zp['mysy']=event.clientY+document.documentElement.scrollTop;
		else
			zp['mysy']=event.clientY+document.body.scrollTop;
		
		if (document.body.scrollTop==0)
			zp['mysx']=event.clientX+document.documentElement.scrollLeft;
		else
			zp['mysx']=event.clientX+document.body.scrollLeft;
		}
	else {
		zp['mysx']=e.pageX;
		zp['mysy']=e.pageY;
		}
  
	if (zp['mysx']<0) { zp['mysx']=0; }
	if (zp['mysy']<0) { zp['mysy']=0; }

	zp['oknoscrolly']=window.scrollY;

	itkats_move();
	}

function zp_offtopx(obj) {

	var otop=0;
	if (obj.offsetParent) {
		
		otop=obj.offsetLeft;
		while (obj=obj.offsetParent)
			otop+=obj.offsetLeft;
		}
	return otop;
	}

function zp_offtopy(obj) {

	var otop=0;
	if (obj.offsetParent) {
		
		otop=obj.offsetTop;
		while (obj=obj.offsetParent)
			otop+=obj.offsetTop;
		}
	return otop;
	}

var itkats_id=0;
var itkats_oldv=0;
var itkats_val=0;
var itkats_hash='';
var itkats_iduser=0;

function itkats_move() {

	if (itkats_id>0) {

		tmp=document.getElementById('itkat-'+itkats_id);

		tmpleft=zp_offtopx(tmp);
		tmptop=zp_offtopy(tmp);
		itkats_val=zp['mysx']-tmpleft;
		tmp.style.width=itkats_val+'px';

		if (itkats_val>95 || itkats_val<0 || (zp['mysy']-tmptop)<0 || (zp['mysy']-tmptop)>25) {

			tmp=document.getElementById('itkat-'+itkats_id);
	
			itkats_id=0;
			tmp.style.width=itkats_oldv+'px';
			itkats_hash='';

			tmp=document.getElementById('hodn-helper');
			tmp.style.display='none';
			}
		else {

			tmp=document.getElementById('hodn-helper');
			tmp.style.display='block';
			tmp.style.left=(zp['mysx']-tmp.offsetWidth+10)+'px';
			tmp.style.top=(zp['mysy']-tmp.offsetHeight-10)+'px';
	
			hdn=Math.round((itkats_val/95)*100);
			if (hdn>100)
				hdn=100;
			else if (hdn<0)
				hdn=0;
	
			tmp2='';
			try {
				tmp2=document.getElementById('title-'+itkats_id).innerHTML+' ';
				}
			catch(e) {
				}

			tmp.innerHTML='Hodnotit '+tmp2+'<b>'+hdn+'%</b> procenty';
			}
		}
	}

function itkats_over(id,xhash) {

	itkats_blkh=1;
	itkats_hash=xhash;

	if (itkats_id==0) {
	
		tmp=document.getElementById('itkat-'+id);
		tmp2=tmp.style.width;
	
		itkats_oldv=tmp2.substring(0,tmp2.indexOf('p'));
		itkats_id=id;
		}
	}

function itkats_click() {

	if (itkats_id>0) {

		load_script('/_data/clscripts/swhodnot.php?id='+itkats_id+'&iduser='+itkats_iduser+'&h='+itkats_hash+'&set='+itkats_val);
		}
	}


function stahnisw(id,h,time) {

	tmp=document.getElementById('stahnisw');
	tmp.style.display='none';

	load_script('/_data/clscripts/swstahuj.php?id='+id+'&h='+h+'&time='+time);
	}


