
function textonly() {
	setStyle('textonly');
	return false;
}

function oblibene() {
	setStyle('textonly');
	return false;
}

function log(el,a) { 
	if(document.images){(new Image()).src='http://ad.ck.cz/log.asp?href='+escape(el.href)+(a?'&a='+a:'');} return true;	
}

function searchInfo(sel) {
	var f = sel.form;
	var fr = document.getElementById("pocet");
	var url = '/admin/hledej-pocet.html?z=' + f.z.value + '&d=' + f.d.value + 
		'&c=' + f.c.value + '&l=' + f.l.value + '&a=' + f.a.value;
	var doc;				
	if (fr.contentDocument)
	    doc = fr.contentDocument;
	if (fr.contentWindow)
		doc = fr.contentWindow.document;
	else if (fr.document)
		doc = fr.document;
	
	doc.location.replace(url);
}

function setStyle(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function selectValue(s,value) {
	var sel = 0;
	for (var i=0; i<s.options.length; i++)
		if (s.options[i].value==value) { sel=i; break; }
	s.selectedIndex = sel;
}

	function select_option(sel,opt) {
		if (!sel) return;
		
		for (var i=0; i<sel.options.length; i++) {
			if (sel.options[i].value == opt) {
				sel.selectedIndex = i; break;
			}
		}
	}
    
	function check_radio(radio,value) {
		if (!radio) return;
		
		for (var i=0; i<radio.length; i++) {
			if (radio[i].value == value) {
				radio[i].checked = true; break;
			}
		}
	}
    
