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 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 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" />');
	}



function xvlzupc() {

	document.write('<a href="http://advertures.directtrack.com/z/759/8514/">');
	document.write('UPC Internet - 2 měsíce sleva 50 %');
	document.write('<A TARGET="_blank" HREF="http://adsfac.eu/link.asp?cc=UCA001.14432.0"><IMG WIDTH="1" HEIGHT="1" BORDER="0" SRC="http://adsfac.eu/ag.asp?cc=UCA001.14432.0&ord=[timestamp]"></A>');
	document.write('</a>');
	document.write('<img src="http://advertures.directtrack.com/42/355/759/" border="0" width="1" height="1" />');
	}

function vlozrghtetar(url) {

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

