// e7040fdd78f8abd9abdd7976ce769f28

	hs.graphicsDir = 'http://www.sporttrade.cz/lib/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	wrapperClassName: 'borderless';
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.75;

  hs.lang = {
     loadingText :     'Načítá se...',
     loadingTitle :    'Klikněte pro zrušení',
     focusTitle :      'Klikněte pro přenesení do popředí',
     fullExpandTitle : 'Zvětšit na původní velikost',
     fullExpandText :  'Plná velikost',
     creditsText :     '',
     creditsTitle :    'Přejít na stránky Highslide JS',
     previousText :    'Předchozí',
     previousTitle :   'Předchozí (šipka vlevo)',
     nextText :        'Další',
     nextTitle :       'Další (šipka vpravo)',
     moveTitle :       'Přesunout',
     moveText :        'Přesunout',
     closeText :       'Zavřít',
     closeTitle :      'Zavřít (esc)',
     resizeTitle :     'Změnit velikost',
     playText :        'Přehrát',
     playTitle :       'Přehrát slideshow (mezerník)',
     pauseText :       'Pozastavit',
     pauseTitle :      'Pozastavit slideshow (mezerník)',
     restoreTitle :    'Klikněte pro zavření obrázku, klikněte a táhněte pro jeho přesunutí. Použijte šipky na klávesnici pro přesun na další a předchozí.'
  };
  
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
    slideshowGroup: '3', 
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});


  function showChart(objectId) {
  
    
    
    if (document.getElementById(objectId).style.display == 'block') {
    
     document.getElementById('control'+objectId).innerHTML = '&gt;&gt;';
     document.getElementById(objectId).style.display = 'none';
    
    } else {
    
     document.getElementById('control'+objectId).innerHTML  = '&lt;&lt;';
     document.getElementById(objectId).style.display = 'block';
    
    }
    
  }


  function kvetinace() {
    
    // do not remove!
    window.open('http://www.eshop-kvetinace.cz');
  
  }
  
  function init() {
    self.xml = getObj("Msxml2.XMLHTTP");
    if (!xml) xml = getObj("Microsoft.XMLHTTP");
    if (!xml)
    {
      if (typeof XMLHttpRequest!="undefined")
        xml = new XMLHttpRequest();
    };

    self.encFunc = encodeURIComponent ?
        encodeURIComponent : escape;
        
        
	   document.getElementById("search").setAttribute("autocomplete","off"); 
  }
  
  function getObj (obj) {
    try { return new ActiveXObject(obj); }
    catch(e) { return null; }
  }

  function showsearch() {

	     // show all
      if (document.getElementById("search").value.length >= 3) {
       document.getElementById('searchBox').style.display = "block";
       
       //document.getElementById('searchBox').focus();
      }
      
  }
    
  function hidesearch() {

      var f = function(){
        document.getElementById('searchBox').style.display = "none";
      }
      self.timer = setTimeout(f, 500); 
    
  }
  
  function sendRPCDone(frameEl, searchText, results) {

    var ul = document.getElementById("suggest");
    while (ul.childNodes.length > 0)
      ul.removeChild(ul.childNodes[0]);
    for (var i=0; i < results.length; i++) {
      var li = document.createElement("LI");
      var label = results[i];
      li.innerHTML = label;
      ul.appendChild(li);
      li.onclick = function() {
        document.getElementById("search").value =
          this.innerHTML;   
          changesearch();
      }
    }
      if (results.length < 1) {
        var lix = document.createElement("LI");
        lix.innerHTML = "žádný návrh";
        ul.appendChild(lix);
      }
  }
  
  function checkit() { }
  
  function changesearch() {
  
      var q = document.getElementById("search");
      if (q.value.length < 3) { hidesearch(); }
      
      q.value = q.value.replace("..", "");
      q.value = q.value.replace("<strong>", "");
      q.value = q.value.replace("</strong>", "");
    
      q.value = q.value.replace("<STRONG>", "");
      q.value = q.value.replace("</STRONG>", "");
      
      pole = q.value.split(" - ");
      q.value = pole[0];
             
        if (q.value != self.last) {
          self.last = q.value;
          if (xml) {
            if (xml.readyState != 0) xml.abort();
            
            xml.open ("GET", "http://www.sporttrade.cz/suggest.php?lan=cs&q=" +
                self.encFunc(q.value), true);
            xml.onreadystatechange = function(){
            
              if ((xml.readyState == 4) && (xml.responseText)) {
                showsearch();
                eval(xml.responseText);
              }
            }
            xml.send(null);
          }
        }


  }

