    function thumbnailxxx(ids){

    var xi = document.getElementsByName('thumbnail'+ids)
    var ix ='';
    
    var h=0;
      while(h < xi.length)
      {
        if(xi[h])
        {
          ix = xi[h].title;
          xi[h].target = '';
          xi[h].href = "javascript:setbig"+ids+"('"+ix+"');";
          xi[h].name = "";
        }
      h += 1;
      }
      
    }

    function thumbnail(ids){

    var xi = document.getElementsByTagName('A')
    var ix ='';
    var h=0;
      while(h < xi.length)
      {
        if(xi[h])
        {
          ix = xi[h].title;
          var result1=ix.split(/~/);
          var result2=xi[h].href.search(/javascript/);
          if (result1[0] == 'tn')
          if (result1 != -1){
            if (result2 == -1){
              xi[h].href = "javascript:setbig"+ids+"('"+result1[2]+"');";
            }
          }

        }
      h += 1;
      }
      
    }

    function picuploadxxx(){
    var hrf;
      var xu = document.getElementsByName('viewer')
      
      var k=0;
      while(k < xu.length)
      {
        if(xu[k])
        {
          hrf = xu[k].href;
          xu[k].href = "javascript:picup('"+hrf+"');";
          xu[k].target = "";
          xu[k].name = "";
        }
      k++;
      }
    }
    
    function picupload(){
    var hrf;
      var xu = document.getElementsByTagName('A')
      
      var k=0;
      while(k < xu.length)
      {
        if(xu[k])
        {

          hrf = xu[k].href;
          var result1=hrf.search(/viewer/);
          var result2=hrf.search(/javascript/);
          var result3=xu[k].title.search(/tn~/);
          if (result3 == -1){
            if (result1 != -1){
              if (result2 == -1){
              xu[k].href = "javascript:picup('"+hrf+"');";
              }
            }
          }
        }
      k++;
      }
    }
    
    function picup(link){
      Fokus = window.open(link,'picture','scrollbars=yes,resizable=yes,toolbar=no,status=no,width=300,height=200');
      Fokus.focus()
    }
  
    function mailcode(a){
    var demail;
    var xo = document.getElementsByTagName('dfn')
    var ox ='';
    
      var i=0;
      while(i < xo.length)
      {
        if(xo[i])
        {
            ox = xo[i].getElementsByTagName('img');
            demail = decode(ox[0].alt);
  					xo[i].removeChild(ox[0]);
            var newElem = document.createElement("a");
            newElem.href = "mailto:"+demail+"";
            var newText = document.createTextNode(demail);
            newElem.appendChild(newText);
            
          xo[i].appendChild(newElem);

          xo[i].style.fontStyle = 'normal';
          xo[i].style.visibility = 'visible';
        }
      i++;
      }
    }
    
    function decode(mail){
    
    var mail3 = '';
    var depismenko ='';
    
    var re1=/[,]+/; 
    var mail2=mail.split(re1); 
    
      j=0;
      while(j < mail2.length)
      {
          depismenko = dexode2(mail2[j]);
          mail3 = mail3 + '' + depismenko;
    
      j++;
      }
      var mail4 = '';
        for(var i=mail3.length; i >= 0; i--) {
          mail4 += mail3.substring(i,i-1)
        }
    return mail4;
    }

    function dexode2(x){
    if (x == '#')
    {
      return '@';
    }
    else if (x == '.'){
      return '.';
    }
    else{
      return x;
    }
  
    }
    
    function mail_clear(todle, num)
    {
      if (num == 1) {
        todle.value = '';
        todle.onclick = function () {mail_clear(this, 0);};
      }
    }

function zmena_display_na_opak(id,dp,elsedp,emptydp) {
  var elem = document.getElementById(id);
  if(elem)
  {
    if ((empty(elem.style.display)) && (!empty(emptydp)))
    {
    elem.style.display=emptydp;
    }
    else if (elem.style.display==dp){
    elem.style.display=elsedp;
    }
    else
    {
    elem.style.display=dp;
    }
  }
}
    
function empty(aText){
 if (aText==null) {
   return true;
 }
 else {
  if (aText.length==0) {
   return true;
  }
 }
 return false;
}



function ajax_init(){
  if(!self.xml)
  {
  	self.xml = ajax_getObj("Msxml2.XMLHTTP");
  	if (!xml) xml = ajax_getObj("Microsoft.XMLHTTP");
  	if (!xml)
  	{
  		if (typeof XMLHttpRequest!="undefined")
  			xml = new XMLHttpRequest();
  	};
  	if (!xml) {
  		//alert("Sugestivní návrhy nefungují na vašem prohlížeči.");
  	}
  	self.encFunc = encodeURIComponent ? encodeURIComponent : escape;
  }
}
			
function ajax_getObj (obj) {
	try {
		return new ActiveXObject(obj);
	}
	catch (e) {
		return null;
	}
}

function ajax_go(url, evalIt, statusId, statusText){
	if (xml) {
	  ajax_disp(statusId,statusText);
		if (xml.readyState != 0) xml.abort();
		xml.open ("GET", url, true);
		xml.onreadystatechange = function(){
			if (xml.readyState == 4 && xml.responseText){
			 if(evalIt==1)
			 {
				eval(xml.responseText);
			 }
			}
		}
		xml.send(null);
	}
}

function ajax_disp(statusId,statusText) {
	var ul = document.getElementById(statusId);
	if (ul)
	{
    if(ul.firstChild)
    {
      ul.removeChild(ul.firstChild);
    }
    var newText = document.createTextNode(statusText);
    ul.appendChild(newText);
	}
}

function enUri(url)
{
  //var url2 = encodeURI(url);
  var url2 = escape(url);
  var re=new RegExp("\%","g");
  var url3=url2.replace(re,",");
  return url3;
}

function deUri(url)
{
  var re=new RegExp("\,","g");
  var url2=url.replace(re,"%");
  //var url3 = decodeURI(url2);
  var url3 = unescape(url2);
  return url3;
}

