

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

var zp=new Array();
zp['mysx']=0;
zp['mysy']=0;

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;
	}

function checkframe() {

	try {

		if (parent.location.href!=location.href)
			parent.location.href='http://rychlost.cz/?res=11&url='+parent.location.href;
		}
	catch(e) {
	
		}
	}
checkframe();

function body_onload() {

	wbp_adsstats();
	}

function change_isp() {

	if (window.document.getElementById('changeisp').checked==1) {

		window.document.getElementById('ispselect').style.display='none';
		window.document.getElementById('ispinput').style.display='inline';
		}
	else {

		window.document.getElementById('ispinput').style.display='none';
		window.document.getElementById('ispselect').style.display='inline';
		}
	}


var alertblik=0;

function openokres(okres) {

	for (var i=1;i<12;i++)
	if (i!=okres) {
		
		try {
		
			document.getElementById('subokres-'+i).style.display='none';
			}
		catch(e) {
		
			}
		}
		
	try {
		
		document.getElementById('subokres-'+okres).style.display='block';
		}
	catch(e) {
		
		}
	
	}

function wopen(id) {

	window.open('/_data/clscripts/statsisp.php?id='+id,'','');
	}

function rewriteispurl(id) {

	try {

		document.getElementById('ispwww').href='/_data/clscripts/statsisp.php?id='+id;
		}
	catch(e) {

		}
	}

function ispstats(id) {

	load_script('/_data/clscripts/statsispimp.php?id='+id);
	}

var sel;
var sel2;
var sel3;
var sel4;

function tupdateisp(pripojeni) {

	sel=document.getElementById("t_isp");
	sel2=document.getElementById("t_tarif");
	sel3=document.getElementById("t_obec");
	sel4=document.getElementById("t_okres");
	helper.location.href='/sys/t-update-isp/'+pripojeni+'/';	
	sel4.selectedIndex=0;
	}

function tupdateokres(okres) {

	var pripojeni=document.getElementById("t_pripojeni").value;

	sel=document.getElementById("t_obec");
	sel2=document.getElementById("t_isp");
	sel3=document.getElementById("t_tarif");
	helper.location.href='/sys/t-update-obec/'+pripojeni+'/'+okres+'/';
	}

function tupdateobec(obec) {

	var pripojeni=document.getElementById("t_pripojeni").value;
	var okres=document.getElementById("t_okres").value;

	sel=document.getElementById("t_isp");
	sel2=document.getElementById("t_tarif");
	helper.location.href='/sys/t-update-isp/'+pripojeni+'/'+okres+'/'+obec+'/';	
	}

function tupdatetarif(isp) {

	var pripojeni=document.getElementById("t_pripojeni").value;

	sel=document.getElementById("t_tarif");
	helper.location.href='/sys/t-update-tarif/'+isp+'/'+pripojeni+'/';
	}

function tupdateokres2(okres,isp,pripojeni) {

	sel=document.getElementById("t_obec");
	helper.location.href='/sys/t-update-obec2/'+pripojeni+'/'+okres+'/'+isp+'/';	
	}

function tupdateisp3(isppripojeni) {

	sel=document.getElementById("t_okres");
	sel2=document.getElementById("t_tarif");
	sel3=document.getElementById("t_obec");
	helper.location.href='/sys/t-update-okrestarif3/'+isppripojeni+'/';	
	}
function tupdateokres3(okres) {

	var isppripojeni=document.getElementById("t_isppripojeni").value;

	sel=document.getElementById("t_obec");
	helper.location.href='/sys/t-update-obec3/'+isppripojeni+'/'+okres+'/';
	}

function tclearselect() {

	while (sel.options.length) sel.remove(0);
	}

function titemadd(id,nazev,style) {

	var it=document.createElement("OPTION");

	sel.options.add(it);
	it.value=id;
	it.innerHTML=nazev;

	if (style==0) it.className='o-neurceno';
	}

function tclearselect2() {

	while (sel2.options.length) sel2.remove(0);
	}

function titemadd2(id,nazev,style) {

	var it=document.createElement("OPTION");

	sel2.options.add(it);
	it.value=id;
	it.innerHTML=nazev;

	if (style==0) it.className='o-neurceno';
	}

function tclearselect3() {

	while (sel3.options.length) sel3.remove(0);
	}

function titemadd3(id,nazev,style) {

	var it=document.createElement("OPTION");

	sel3.options.add(it);
	it.value=id;
	it.innerHTML=nazev;

	if (style==0) it.className='o-neurceno';
	}

function tclearselect4() {

	while (sel4.options.length) sel4.remove(0);
	}

function titemadd4(id,nazev,style) {

	var it=document.createElement("OPTION");

	sel4.options.add(it);
	it.value=id;
	it.innerHTML=nazev;

	if (style==0) it.className='o-neurceno';
	}


/*

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

document.onmousemove=hlidej_mys;

var tempX = 0;
var tempY = 0;

var nahledoknoa=0;
var nahledhtml='';

function hlidej_mys(e) {

	nahledokno=document.getElementById('altwindow');

	if (nahledoknoa==1) {
	
		if (IE) {
		
			if (document.body.scrollTop==0)
				tempY = event.clientY + document.documentElement.scrollTop;
			else
				tempY = event.clientY + document.body.scrollTop;
			
			if (document.body.scrollTop==0)
				tempX = event.clientX + document.documentElement.scrollLeft;
			else
				tempX = event.clientX + document.body.scrollLeft;
			
		} else {
			tempX = e.pageX;
			tempY = e.pageY;
			}  
  
		if (tempX < 0){tempX = 0}
		if (tempY < 0){tempY = 0}  

		nahledokno.style.left=(tempX+10)+'px';
		nahledokno.style.top=(tempY+10)+'px';
		}

	return true
	}

function z_ac(html) {

	setTimeout('z_act()',150);
	nahledhtml=html;

	nahledoknoa=1;
	}
	
function z_act() {

	if (nahledoknoa==1) {

		nahledokno.innerHTML=nahledhtml;
		
		nahledokno=document.getElementById('altwindow');
		nahledokno.style.visibility='visible';
		}
	}

function z_de() {

	nahledokno=document.getElementById('altwindow');
	nahledokno.style.visibility='hidden';

	nahledokno.innerHTML='';
	
	nahledoknoa=0;
	}
*/


var menulock2=Array();
var menusize2=Array();
var menuall2=Array('statistika','specialy','informace','pripojeni-internetu','forum','poskytovatele-pripojeni','pripojeni-v');
/*
var menuall2=Array('statistika','specialy','clanky','informace','pripojeni-internetu','forum','poskytovatele-pripojeni','pripojeni-v');
*/
function menu_open2(submenu) {

	if (menulock2[submenu]!=1) {

		menulock2[submenu]=1;
		window.setTimeout('menu_pohyb2(\''+submenu+'\',0)',10);
		}

	return false;
	}

function menu_pohyb2(submenu,smer) {

	subid=document.getElementById('submenu-'+submenu);
	seznam=subid.childNodes;
	pocet=0;

	for(i=0;i<seznam.length;i++) {

		pol=seznam[i];

		if (pol.nodeName=='li' || pol.nodeName=='LI') {

			pocet++;
			}
		}

	if (smer==0) {

		if (subid.style.display!='block') {

			for (i=0;i<menuall2.length;i++) {

				if (menuall2[i]!=submenu && menulock2[menuall2[i]]==0 && menusize2[menuall2[i]]>0) {

					menulock2[menuall2[i]]=1;
					window.setTimeout('menu_pohyb2(\''+menuall2[i]+'\',-1)',40);
					}
				}

			subid.style.display='block';

			smer=1;
			menusize2[submenu]=0;
			}
		else {
			smer=-1;
/*			menusize2[submenu]=pocet;*/
			}
		}

	seznam=subid.childNodes;

	if (smer==1) {

		menusize2[submenu]++;
		if (menusize2[submenu]>=pocet || menusize2[submenu]>=15) menulock2[submenu]=0;
		}
	else {

		menusize2[submenu]--;
		if (menusize2[submenu]<=0) {
			menulock2[submenu]=0;
			subid.style.display='none';
			}
		}

	j=0;
	for(i=0;i<seznam.length;i++) {

		pol=seznam[i];

		if (pol.nodeName=='li' || pol.nodeName=='LI') {

			j++;
			if (j<=menusize2[submenu]) {

				pol.style.display='block';
				}
			else {

				pol.style.display='none';
				}
			}
		}

	if (menulock2[submenu]==1) {

		if (smer>0)
			window.setTimeout('menu_pohyb2(\''+submenu+'\','+smer+')',40);
		else
			window.setTimeout('menu_pohyb2(\''+submenu+'\','+smer+')',20);
		}
	}



function ird(is) {

	window.open('/sys/ird/'+is+'/');
	}




function hlasuj(odpoved,has) {

	location.href='./?action=hlasuj&odpoved='+odpoved+'&has='+has;
}


function settestserver(testserver) {
/*
	switch(testserver) {
	case 0:

		document.getElementById('testf').action='http://test.rychlost.cz/';

	break;
	case 1:

		document.getElementById('testf').action='http://test0.rychlost.cz/';

	break;
	case 2:

		document.getElementById('testf').action='http://test0.rychlost.cz/';

	break;
	}*/
}

function pouzestarytest() {

	document.getElementById('tserver-0').checked=true;

	settestserver(0);
	document.getElementById('tserver-1').disabled=true;
/*	document.getElementById('tserver-2').disabled=true;*/
	document.write('<b>Pro Váš webový prohlížec je možná pouze stará verze testu.</b>');
}




function vlozintropot() {

	document.write('<iframe src="/_data/clscripts/potupc.html" scrolling="no" style="border:none;width:250px;height:250px;margin:0;padding:0"></iframe>');
	}

function vlozpotx1() {

	document.write('<iframe src="/_data/clscripts/potupc1.html" scrolling="no" style="border:none;width:640px;height:20px;margin:0;padding:0"></iframe>');
	}

function vlozpotx2() {


	}

function vlozpotx3() {

	document.write('<iframe src="/_data/clscripts/potupc3.html" scrolling="no" style="border:none;width:450px;height:20px;margin:0;padding:0;position:absolute;margin-left:70px"></iframe>');
	}

function vlozlforum() {

	document.write('<iframe scrolling="no" class="frm" src="http://www.pcforum.cz/last-default.php" width="220" height="320" frameborder="0" border="0"></iframe>');

	}

function vlozlforumside() {

	document.write('<iframe scrolling="no" class="frm2" src="http://www.pcforum.cz/last-defaultside.php" width="190" height="275" frameborder="0" border="0"></iframe>');

	}

var r_xmlre='';
var r_xmlreq=null;

try {
	r_xmlreq=new ActiveXObject("Msxml2.XMLHTTP");
	}
catch(e) {

	}


/*
function getObj (obj) {
  try { return new ActiveXObject(obj); }
  catch(e) { return null; }
}

if (!r_xmlreq) r_xmlreq=getObj("Microsoft.XMLHTTP");
if (!r_xmlreq)
	if (typeof XMLHttpRequest!="undefined")
		r_xmlreq=new XMLHttpRequest();


function r_xmlzpracuj() {

	if (r_xmlreq.readyState==4 && r_xmlreq.responseText) {

		if (r_xmlre=='diskuse') {

			clanekdiskuseret(r_xmlreq.responseText);
			}

		r_xmlre='';
		}
	}

function r_xmlsend(url,xmlre,adata) {

	if (r_xmlre=='') {

		r_xmlre=xmlre;
		r_xmlreq.open("POST",url,true);
		r_xmlreq.onreadystatechange=r_xmlzpracuj;
  	r_xmlreq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=windows-1250');
		r_xmlreq.send(adata);
		}
	else {

		alert('Chyba: pozadavek nelze v tomto okamziku odeslat');
		return false;
		}
	}

var clanekdiskuseprispel=0;

function clanekdiskuse() {

	diskuse_idclanek=document.getElementById('diskuse_idclanek').value;
	diskuse_jmeno=document.getElementById('diskuse_jmeno').value;
	diskuse_nadpis=document.getElementById('diskuse_nadpis').value;
	diskuse_text=document.getElementById('diskuse_text').value;

	var adata='';
	adata+='idclanek='+escape(diskuse_idclanek);
	adata+='&jmeno='+escape(diskuse_jmeno);
	adata+='&nadpis='+escape(diskuse_nadpis);
	adata+='&text='+escape(diskuse_text);

	r_xmlsend('/_data/clscripts/diskuse.php','diskuse',adata);

	return false;
	}

function clanekdiskuseret(hodnota) {

	diskuse_idclanek=document.getElementById('diskuse_idclanek').value;
	diskuse_jmeno=document.getElementById('diskuse_jmeno').value;
	diskuse_nadpis=document.getElementById('diskuse_nadpis').value;
	diskuse_text=document.getElementById('diskuse_text').value;

	if (hodnota==1) {

		document.getElementById('diskuseokno').style.display='none';
		document.getElementById('diskuseokno2').style.display='block';

		var novyprispevek='';

		document.getElementById('novyprispevek').innerHTML=novyprispevek;

		clanekdiskuseprispel=1;
		}
	else {

		if (hodnota==2) 
			alert('Komentář lze přidat jednou za minutu.');
		else
			alert('Nebylo mozno pridat prispevek. Pokud si myslite ze je to chyba piste na info@rychlost.cz');
		}

	return false;
	}
*/




function clanekdiskuse() {

	document.getElementById('pomocny_idclanek').value=document.getElementById('diskuse_idclanek').value;
	document.getElementById('pomocny_jmeno').value=document.getElementById('diskuse_jmeno').value;
	document.getElementById('pomocny_nadpis').value=document.getElementById('diskuse_nadpis').value;
	document.getElementById('pomocny_text').value=document.getElementById('diskuse_text').value;
	document.getElementById('pomocny_form').submit();

	diskuse_idclanek=document.getElementById('diskuse_idclanek').value;
	diskuse_jmeno=document.getElementById('diskuse_jmeno').value;
	diskuse_nadpis=document.getElementById('diskuse_nadpis').value;
	diskuse_text=document.getElementById('diskuse_text').value;

	return false;
	}


function vlozlinkovace(odkaz,nadpis) {

	document.write('<a href="http://linkuj.cz/?id=linkuj&amp;url='+odkaz+'&amp;title='+escape(nadpis)+'" target="_blank"><img src="/_data/linkovace/linkuj.png" alt="Linkuj" /></a> ');
	document.write('<a href="http://www.jagg.cz/bookmarks.php?action=add&amp;address=&amp;url='+odkaz+'&amp;title='+escape(nadpis)+'" target="_blank"><img src="/_data/linkovace/jagg.png" alt="Linkuj" />Jagg</a> ');

	}

function clotevrifoto(clanek,foto) {

	window.open('/_data/clanky/'+clanek+'/'+foto+'.jpg','');
	}

function zobrazrespng(rri,rrip) {

	var bf='';

	bf+='<h2>Přímé url na výsledek testu</h2>';

	bf+='<div class="resultintro rintrosir">';
	bf+='<table>';
	bf+='<colgroup><col width="125" /><col /></colgroup>';
	bf+='<tr><th colspan="2">Verze 350x19 px bez IP - userbar</th></tr>';
	bf+='<tr><th>Link pro fóra:</th><td><input type="text" class="reslinki" value="[URL=http://rychlost.cz][IMG]http://rychlost.cz/rs/u'+rri+'.png[/IMG][/URL]"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>HTML:</th><td><input type="text" class="reslinki" value="&lt;a href=&quot;http://rychlost.cz&quot;&gt;&lt;img src=&quot;http://rychlost.cz/rs/u'+rri+'.png&quot;&gt;&lt;/a&gt;" onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>Pouze obrázek:</th><td><input type="text" class="reslinki" value="http://rychlost.cz/rs/u'+rri+'.png"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><td>&nbsp;</td><td><img src="http://rychlost.cz/rs/u'+rri+'.png" alt=""></td></tr>';
	bf+='</table>';
	bf+='</div>';

	bf+='<div class="resultintro rintrosir">';
	bf+='<table>';
	bf+='<colgroup><col width="125" /><col /></colgroup>';
	bf+='<tr><th colspan="2">Verze 350x165 px bez IP</th></tr>';
	bf+='<tr><th>Link pro fóra:</th><td><input type="text" class="reslinki" value="[URL=http://rychlost.cz][IMG]http://rychlost.cz/rs/'+rri+'.png[/IMG][/URL]"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>HTML:</th><td><input type="text" class="reslinki" value="&lt;a href=&quot;http://rychlost.cz&quot;&gt;&lt;img src=&quot;http://rychlost.cz/rs/'+rri+'.png&quot;&gt;&lt;/a&gt;" onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>Pouze obrázek:</th><td><input type="text" class="reslinki" value="http://rychlost.cz/rs/'+rri+'.png"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><td>&nbsp;</td><td><img src="http://rychlost.cz/rs/'+rri+'.png" alt=""></td></tr>';
	bf+='</table>';
	bf+='</div>';

	bf+='<div class="resultintro rintrosir">';
	bf+='<table>';
	bf+='<colgroup><col width="125" /><col /></colgroup>';
	bf+='<tr><th colspan="2">Verze 350x165 px s IP</th></tr>';
	bf+='<tr><th>Link pro fóra:</th><td><input type="text" class="reslinki" value="[URL=http://rychlost.cz][IMG]http://rychlost.cz/rs/'+rrip+'.png[/IMG][/URL]"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>HTML:</th><td><input type="text" class="reslinki" value="&lt;a href=&quot;http://rychlost.cz&quot;&gt;&lt;img src=&quot;http://rychlost.cz/rs/'+rrip+'.png&quot;&gt;&lt;/a&gt;" onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>Pouze obrázek:</th><td><input type="text" class="reslinki" value="http://rychlost.cz/rs/'+rrip+'.png"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><td>&nbsp;</td><td><img src="http://rychlost.cz/rs/'+rrip+'.png" alt=""></td></tr>';
	bf+='</table>';
	bf+='</div>';

	bf+='<div class="resultintro rintrosir">';
	bf+='<table>';
	bf+='<colgroup><col width="125" /><col /></colgroup>';
	bf+='<tr><th colspan="2">Další</th></tr>';
	bf+='<tr><th>HTML bez IP:</th><td><input type="text" class="reslinki" value="http://rychlost.cz/rh/'+rri+'.html"  onfocus="javascript:this.select();"></td></tr>';
	bf+='<tr><th>HTML s IP:</th><td><input type="text" class="reslinki" value="http://rychlost.cz/rh/'+rrip+'.html"  onfocus="javascript:this.select();"></td></tr>';
	bf+='</table>';
	bf+='</div>';

	document.getElementById('respngokno').innerHTML=bf;
	location.href='#respngokno';
	}



function vlozabr(verze) {
/*
	document.write('<div class="abrban"><a href="/_data/clscripts/abradio.php"><img src="/_data/img/rychlost_'+verze+'.png" width="354" height="49" alt="" /></a></div>');
*/
	}

function vlozbhs(hhs) {

	document.write('<div class="tban"><a href="/_data/clscripts/hst.php?i='+hhs+'"><img src="/_data/img/host'+hhs+'.gif" width="468" height="60" alt="" /></a></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));
	}

var nontestid=0;
var nonteststart=0;
var nontests=0;
var nontestsfinished=0;
var nontestsunfinished=0;
var nonspusteno=0;
var nonvelikost=0;
var noncounter=0;
var r_down_cas_start;
var r_down_cas_end;
var r_down_cas;
var r_serverid='';
var r_server='';
var r_rand_code=1;
var r_test_code='';
var r_speed=0;
var nonstoptimer;

function nonstoptesttimer() {

	nontests++;
	document.getElementById('nontests').innerHTML=nontests;
	}
function nonstoptestp() {

	noncounter++;
	if (nonteststart==1) {

		nontestsunfinished++;
		document.getElementById('nontestsunfinished').innerHTML=nontestsunfinished;
		}

	nonteststart=1;
	nonstoptesttimer();

	r_down(nonvelikost);
	}


function nonstoptest() {
/*
	if (nonspusteno==1) {

		alert('Test je již spuštěn.');
		return false;
		}
*/

	if (nonspusteno==1) {

		window.clearInterval(nonstoptimer);
		nonspusteno=0;

		location.href='/uzivatel/nonstop/'+nontestid+'/';

		return false;
		}

	nonspusteno=1;
	nonvelikost=document.getElementById('nonvelikost').value;

	try {

		if (document.getElementById('tserver-4').checked)
			r_serverid=4;
		}
	catch (e) { }

	try {

		if (document.getElementById('tserver-5').checked)
			r_serverid=5;
		}
	catch (e) { }

	try {

		if (document.getElementById('tserver-6').checked)
			r_serverid=6;
		}
	catch (e) { }

	if (r_serverid==0) return false;

	load_script('/_data/clscripts/testnonstopstart.php?server='+r_serverid+'&downsize='+document.getElementById('downsize').value);
	}

function nonstoptestx() {
/*
	if (nonspusteno==1) {

		alert('Test je již spuštěn');
		return false;
		}
*/
	nonspusteno=1;

	nonstoptimer=window.setInterval('nonstoptestp()',150000);
	nonstoptestp();
	}

function nonstoptestres() {

	nontestsfinished++;
	document.getElementById('nontestsfinished').innerHTML=nontests;
	}

function r_get_time() {

	time=new Date();
	return time.getTime();
	}

function r_down(velikost) {

	var tmp0,tmp1,tmp2;

	r_rand_code++;
	r_down_velikost=velikost;

	var maxsize=0;

	var lastv=0;

	tmp0=document.getElementById('data1');

	try {

		tmp2=document.getElementById('down_data');

		var tmp1=tmp2.parentNode;
		tmp1.removeChild(tmp2);
		}
	catch (e) {

		}

	try {
	
		var tmp1=document.getElementById('down_data');
		var tmp2=document.getElementById('data1');
		tmp2.removeChild(tmp1);
		}
	catch (e) { }

	tmp1=document.createElement('img');

	tmp1.id='down_data';
	tmp1.onload=new Function('r_down_end()');
	tmp1.src='http://'+r_server+'/data/'+r_test_code+'/'+r_rand_code+'-'+r_down_velikost+'.png';

	r_down_cas_start=r_get_time();
	tmp0.appendChild(tmp1);
	}

function r_down_end() {

	nonteststart=0;
	if (nonspusteno==1) {

		r_down_cas_end=r_get_time();
		r_down_cas=r_down_cas_end-r_down_cas_start;
	
		r_speed=(r_down_velikost/r_down_cas)*1000;
/*
		var tmp2=document.getElementById('data1').innerHTML+=r_speed+' kB/s<br />';
*/
		load_script('/_data/clscripts/testnonstop.php?id='+nontestid+'&c='+noncounter+'&s='+escape(r_speed)+'&ts='+escape(r_down_cas_start)+'&te='+escape(r_down_cas_end));

		try {
		
			var tmp1=document.getElementById('down_data');
			var tmp2=document.getElementById('data1');
			tmp2.removeChild(tmp1);
			}
		catch (e) { }

		nonstoptestres();
		}
	}


var stylzap=new Array();

function editsetstyle(styl) {
	
	var textp=document.getElementById('i-text');

	switch(styl) {
		case "tucne":

			if (stylzap[0]==1) stylzap[0]=0;
			else stylzap[0]=1;

			if (stylzap[0]==1) textp.value+='[tucne]';
			else textp.value+='[/tucne]';

		break;
		case "naklonene":

			if (stylzap[1]==1) stylzap[1]=0;
			else stylzap[1]=1;

			if (stylzap[1]==1) textp.value+='[naklonene]';
			else textp.value+='[/naklonene]';

		break;
		case "podtrzene":

			if (stylzap[2]==1) stylzap[2]=0;
			else stylzap[2]=1;

			if (stylzap[2]==1) textp.value+='[podtrzene]';
			else textp.value+='[/podtrzene]';

		break;
		case "kod":

			if (stylzap[3]==1) stylzap[3]=0;
			else stylzap[3]=1;

			if (stylzap[3]==1) textp.value+='[kod]';
			else textp.value+='[/kod]';

		break;
		case "podtrzene":

			if (stylzap[4]==1) stylzap[0]=0;
			else stylzap[4]=1;

			if (stylzap[4]==1) textp.value+='[podtrzene]';
			else textp.value+='[/podtrzene]';

		break;
		case "barva-red":

			if (stylzap[5]==1) stylzap[5]=0;
			else stylzap[5]=1;

			if (stylzap[5]==1) textp.value+='[barva=red]';
			else textp.value+='[/barva]';

		break;
		case "barva-green":

			if (stylzap[5]==1) stylzap[5]=0;
			else stylzap[5]=1;

			if (stylzap[5]==1) textp.value+='[barva=green]';
			else textp.value+='[/barva]';

		break;
		case "barva-blue":

			if (stylzap[5]==1) stylzap[5]=0;
			else stylzap[5]=1;

			if (stylzap[5]==1) textp.value+='[barva=blue]';
			else textp.value+='[/barva]';

		break;
		}
	textp.focus();
	}

function forumskoktema(idtema) {

	if (idtema>0) {

		location.href='/forum/tema/'+idtema+'/';
		}
	}

function preklapvyvoj(idprovider,idpripojeni,idtarif,idserver,typ) {

	document.getElementById('grvyvoj').src='/_data/clscripts/gr-vyvoj.php?&idserver='+idserver+'&idprovider='+idprovider+'&idpripojeni='+idpripojeni+'&idtarif='+idtarif+'&typ='+typ;

	document.getElementById('grvyvoj-d').className='';
	document.getElementById('grvyvoj-u').className='';
	document.getElementById('grvyvoj-p').className='';
	document.getElementById('grvyvoj-q').className='';
	document.getElementById('grvyvoj-c').className='';

	document.getElementById('grvyvoj-'+typ).className='sel';
	}



function setsleduj(iditem,iduser,mhash,mset) {

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



var fxhodno=0;
function fhodno(znamka) {

	if (znamka==0) znamka=fxhodno;
	for (var i=1;i<=5;i++) { 

		if (i<=znamka)
			document.getElementById('xfhodn'+i).src='/_data/styles/img/hodn-star-on.png';
		else
			document.getElementById('xfhodn'+i).src='/_data/styles/img/hodn-star-off.png';
		}
	}

function fhodn(znamka,inzerat) {

	load_script('/_data/clscripts/sethodnocenifast.php?id='+inzerat+'&znamka='+znamka);
	}

function vlozjbs() {

	document.write('<iframe src="/_data/clscripts/jbs.php" scrolling="no" style="border:none;width:190px;height:200px;margin:5px 0;padding:0" frameborder="0"></iframe>');
	}

function vlozrban() {
/* ?t='+Math.random()+' */

	document.write('<iframe src="/_data/clscripts/rban.php" width="196" height="115" frameborder="0" border="0" scrolling="no"></iframe>');
	}

function vloz468pcf() {

	document.write('<a href="http://www.pcforum.cz/"><img src="/_data/pcf468x60.png" width="468" height="60" border="0" alt=""></a>');
	}

function vloz468stred() {

	document.write('<iframe src="/_data/clscripts/ban468stred.php?t='+Math.random()+'" width="468" height="60" frameborder="0" border="0" scrolling="no"></iframe>');
	}

function vlozxtop() {

	document.write('<im'+'g src="http://topl'+'ist.cz/count.asp?id=153529" alt="" width="1" height="1" style="border:none" onload="vlozxtop2()" />');
	}
	
function vlozxtopi(hodnota) {

	if (hodnota==1)
		document.write('<im'+'g src="http://topl'+'ist.cz/count.asp?id=153529" alt="" width="1" height="1" style="border:none" onload="vlozxtop2()" />');
	else
		document.write('<im'+'g src="http://topl'+'ist.cz/count.asp?id=153529" alt="" width="1" height="1" style="border:none" />');
	}
	
function vlozxtop2() {

	try {
		tmp=document.getElementById('xtopx');
		tmp2=document.createElement('img');
		tmp2.src='http://topl'+'ist.cz/count.asp?id=118'+'9220';
		tmp2.id='xtopxx';
		tmp2.width='1';
		tmp2.height='1';
		tmp2.style.border='none';
		tmp2.style.width='1px';
		tmp2.style.height='1px';
		tmp2.onload=new Function("vlozxtopx()");

		tmp.appendChild(tmp2);
		}
	catch(e) {

		}

	}

function vlozxtopx() {

	try {

		tmp=document.getElementById('xtopx');
		tmp2=document.getElementById('xtopxx');

		tmp.removeChild(tmp2);
		}
	catch(e) {

		}

	}

function xvlzupc() {

	}

function vlozrghtetar(url) {

	document.write('<script type="text/javascript" src="/_data/clscripts/n_right.php?url='+escape(url)+'"></script>');
	
	}

function vlozbbmedia() {

	try {
//		document.getElementById('bbmediaplacer').innerHTML=

//		document.write('<div class="xxbb">');
	document.write('<iframe src="/_data/clscripts/bbmedia.php" frameborder="no" scrolling="no" style="border:none !important;width:196px;height:206px;margin:0;padding:0"></iframe>');
//	document.write('<iframe src="/_data/clscripts/bbmedia.php" frameborder="no" scrolling="no" style="border:none !important;width:196px;height:300px;margin:0;padding:0"></iframe>');

//		document.write("\n<!-- StartKód: go.cz.bbelements.com 3.1 Rychlost.cz(2329) / Uvodni stranka + stranka vysledku(1) / 196x300(3) / nestandard(27) -->\n<scr"+"ipt type='text/javascript'>\n/* <![CDATA[ */\nvar bbs=screen,bbn=navigator,bbh;bbh='&ubl='+bbn.browserLanguage+'&ucc='+bbn.cpuClass+'&ucd='+bbs.colorDepth+'&uce='+bbn.cookieEnabled+'&udx='+bbs.deviceXDPI+'&udy='+bbs.deviceYDPI+'&usl='+bbn.systemLanguage+'&uje='+bbn.javaEnabled()+'&uah='+bbs.availHeight+'&uaw='+bbs.availWidth+'&ubd='+bbs.bufferDepth+'&uhe='+bbs.height+'&ulx='+bbs.logicalXDPI+'&uly='+bbs.logicalYDPI+'&use='+bbs.fontSmoothingEnabled+'&uto='+(new Date()).getTimezoneOffset()+'&uti='+(new Date()).getTime()+'&uui='+bbs.updateInterval+'&uul='+bbn.userLanguage+'&uwi='+bbs.width;\nif(typeof(bburlparam)=='string') { bbh+='&'+bburlparam; }\nif(typeof(bbkeywords)=='string') { bbh+='&keywords='+escape(bbkeywords); }\ndocument.write(\"<scr\"+\"ipt type='text/javascript' src='http://go.cz.bbelements.com/please/showit/2329/1/3/27/?typkodu=js\"+bbh+\"&alttext=0&border=0&bust=\"+Math.random()+\"&target=_top'><\"+\"\\/scr\"+\"ipt>\");\n/* ]]> */\n<"+"/scr"+"ipt>\n<noscript>\n<a href=\"http://go.cz.bbelements.com/please/redirect/2329/1/3/27/\" target=\"_top\"><img src=\"http://go.cz.bbelements.com/please/showit/2329/1/3/27/?typkodu=img\" border='0' alt='' /></a>\n</noscript>\n<!-- KonecKód: go.cz.bbelements.com 3.1 -->\n");
//	document.write('</div>');

		}
	catch(e) {

		}
	}

function isetppi(ppi) {

	document.getElementById('t_isppripojeni').value=ppi;
	}



function wbp_adsstats() {

	tmp=0;
	try {

		tmp=document.getElementById('google_ads_frame2').offsetHeight;
		}
	catch(e) {

		}

	load_script('/_data/clscripts/statsads.php?tmp='+tmp);
	}

function ptt_cs1() {

	tmp='';

	tmp+='<a href="htt';
	tmp+='p://www.cesk';
	tmp+='y-hosting.cz/?d=24490"><img src="/_data/ch196.gif" width="196" height="600" alt="Webhosting Český hosting" />';
	tmp+='</a>';

	document.write(tmp);
	}

function rkl_chcete() {

	tmp='';

	tmp+='<a href="http://public.stats.cz/?i=8"><img src="/_data/chcete.png" width="196" height="15" alt="Chcete zde mít reklamu?" />';
	tmp+='</a>';

	document.write(tmp);
	}

function rchl_vlozdost() {

	document.write('<div class="document-dostupnost"><a href="http://www.irokez.cz/profil/webprovider/rychlost.cz/" title="Dostupnost Rychlost.cz"><img src="http://www.irokez.cz/_data/clscripts/pbsicon.php?i=2&t=2" width="88" height="31" alt="Dostupnost" style="border:1px solid #888" /></a></div>');
	}

function main468stred(typ) {

	if (typ==0) {
		document.write('<a href="http://www.dpbolvw.net/click-5501010-10924375" target="_top"><img src="http://www.ftjcfx.com/image-5501010-10924375" width="468" height="60" alt="" border="0"/></a>');
		}
	else {
		document.write('<a href="http://www.dpbolvw.net/click-5501010-10924385" target="_top"><img src="http://www.lduhtrp.net/image-5501010-10924385" width="468" height="60" alt="" border="0"/></a>');
		}
	}


function mn_isp_delhodnoceni(id) {

	load_script('/_data/clscripts/mod_isp_delhodnoceni.php?id='+id);

	try {

		document.getElementById('hodnoceni-'+id).style.display='none';
		}
	catch(e) {

		}
	}

function mn_forum_delreak(id,typ) {

	load_script('/_data/clscripts/mod_forum_delreak.php?id='+id+'&typ='+typ);

	try {

		document.getElementById('reakce-'+id).style.display='none';
		}
	catch(e) {

		}
	}

function mn_napoveda_close(typ) {

	load_script('/_data/clscripts/napovedaclose.php?typ='+typ);

	try {

		document.getElementById('dnapoveda').style.display='none';
		}
	catch(e) {

		}
	}

function mn_forum_zavadne(iddotaz,idreakce,set) {

	load_script('/_data/clscripts/forumzavadne.php?iddotaz='+iddotaz+'&idreakce='+idreakce+'&set='+set);
	}


function mn_forum_nadpisedit(iddotaz) {

	location.href='/forum/upravit/?id='+iddotaz;
	}

function mn_forum_textedit(iddotaz,idreakce) {

	location.href='/forum/upravit/?idreakce='+idreakce;
	}



function mn_sledujglobal_do() {

	load_script('/_data/clscripts/sledujglobal.php');
//	load_script('/_data/clscripts/sledujglobal.php?neprecteno='+sledujglobal_var['neprecteno']+'&nevzajemne='+sledujglobal_var['nevzajemne']);
	}

function mn_sledujglobal() {

	window.setInterval('mn_sledujglobal_do()',10000);
	}


var mn_sledujglobal_pole=new Array();
mn_sledujglobal_pole['vzkazy']=0;
mn_sledujglobal_pole['sledovano']=0;

var mn_sledujglobal_cycle=new Array();
mn_sledujglobal_cycle['vzkazy']=0;
mn_sledujglobal_cycle['sledovano']=0;

function mn_sledujglobal_set(klic,hodnota) {

	tmp=document.getElementById('tw-item-'+klic);

	if (hodnota==-1) {

		tmp.style.display='block';
		tmp.innerHTML='POZOR - NEJSTE PŘIHLÁŠEN !!!';
		mn_meta_title_init();

		return true;
		}

	if (hodnota>0)
		tmp.style.display='block';
	else
		tmp.style.display='none';

	try {

		tmp.getElementsByTagName('span')[0].innerHTML=hodnota;
		}
	catch(e) {

		}

	if (klic=='nevzajemne' || klic=='vzkazy' || klic=='sledovano') {

		try {

			if (mn_sledujglobal_pole[klic]!=hodnota && hodnota>0) {

				if (mn_sledujglobal_cycle[klic]==0) {

					try {

						tmp=document.getElementById('tw-item-'+klic+'-a').innerHTML;

						document.getElementById('tw-item-'+klic+'-a').innerHTML=tmp+' +';
						}
					catch(e) {

						}

					mn_sledujglobal_cycle[klic]=1;
					}

				mn_meta_title_init();
				mn_sledujglobal_pole[klic]=hodnota;
				}

			}
		catch(e) {

			}
		}
	}





var itkats_id=0;
var itkats_oldid=0;
var itkats_oldv=0;
var itkats_val=0;
var itkats_rval=0;
var itkats_hash='';
var itkats_iduser=0;
var itkats_typzob='';

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';
*/
			tmp=document.getElementById('ihelper');
			tmp.style.display='none';
			}
		else {
/*
			tmp=document.getElementById('hodn-helper');
			tmp.style.display='block';
			tmp.style.left=(zp['mysx']-tmp.offsetWidth+100)+'px';
			tmp.style.top=(zp['mysy']-tmp.offsetHeight-15)+'px';
*/	
			hdn=Math.round(((itkats_val-10)/75)*100);
			if (hdn>100)
				hdn=100;
			else if (hdn<0)
				hdn=0;
	
			itkats_rval=hdn;

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

			tmp2='';
			try {
				tmp2=document.getElementById('title-'+itkats_id).innerHTML+' ';
				}
			catch(e) {
				}
/*
			tmp.style.display='block';
			tmp.innerHTML='<p><strong>Hodnotit '+tmp2+'<b>'+hdn+'%</b> procenty</strong><br />klikněte pro potvrzení hodnocení<br /><b>0% = nejhorší, 100% = nejlepší</b></p>';
			tmpw=el.offsetWidth+8;
			tmpx=zp_offtopx(el)+tmpw;
			tmpwx=(910-tmpx);

			if (tmpwx<200) {

				tmpwx=200;
				tmpx=910-tmpwx;
				}

			tmp.style.width=tmpwx+'px';
			tmp.style.top=zp_offtopy(el)+'px';
			tmp.style.left=tmpx+'px';
*/


/*
			tmp2='';
			try {
				tmp2=document.getElementById('title-'+itkats_id).innerHTML+' ';
				}
			catch(e) {
				}

			tmp.innerHTML='Hodnotit '+tmp2+'<b>'+hdn+'%</b> procenty<br />klikněte pro potvrzení hodnocení - <b>0% = nejhorší, 100% = nejlepší</b>';
*/
			}

		itkats_oldid=itkats_id;
		}
	}

function itkats_over(id) {

	itkats_blkh=1;

	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_clickset(el) {

	try {

		document.getElementById(el).value=itkats_rval;

		itkats_oldv=Math.round((itkats_rval*0.75)+10);
		if (itkats_rval==100)
			itkats_oldv=95;

		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';

		}
	catch(e) {

		}
	}

function i_u_infow(el,txt,txtbad) {

	try {
/*
		tmp=document.getElementById('ihelper');
		if (txt!='') {
	
			tmp.style.display='block';
			tmp.innerHTML='';
			tmp.innerHTML+='<p>'+txt+'</p>';
			tmpw=el.parentNode.offsetWidth;
			tmpx=zp_offtopx(el)+tmpw;
			tmpwx=(910-tmpx);

			if (tmpwx<200) {

				tmpwx=200;
				tmpx=910-tmpwx;
				}

			tmp.style.width=tmpwx+'px';
			tmp.style.top=zp_offtopy(el)+'px';
			tmp.style.left=tmpx+'px';
			}
		else {
	
			tmp.style.display='none';
			}
*/
		}
	catch(e) {

		}

	}

function mn_forum_palec(id,typ) {

	load_script('/_data/clscripts/user_forum_palec.php?id='+id+'&typ='+typ);

	try {

		document.getElementById('palec-'+id).style.display='none';
		}
	catch(e) {

		}
	}

