  function hideBody() {
    try {
      var maincontent = document.getElementById('main_l1');
      maincontent.style.cssText = "height:1px;overflow:hidden;";
      var tlac = document.getElementById('showhidercontent');
      tlac.onclick = showBody;   
      receptMesice();
    } catch(e) {      
      }      
  }
  function showBody() {
    try {
      var maincontent = document.getElementById('main_l1');
      maincontent.style.cssText = "height:auto;overflow:hidden;";
      var tlac = document.getElementById('showhidercontent');
      tlac.onclick = hideBody; 
    } catch(e) {      
      }      
  }  
  
  
// JavaScript Document
 function setKolac ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
    {
      var cookie_string = name + "=" + escape ( value );
      path = '/';
      if ( exp_y )
      {
        var expires = new Date ();
        expires.setTime(expires.getTime()  + 24*60*60*1000);
        cookie_string += "; expires=" + expires.toGMTString();
      }
    
      if ( path )
            cookie_string += "; path=" + escape ( path );
    
      if ( domain )
            cookie_string += "; domain=" + escape ( domain );
      
      if ( secure )
            cookie_string += "; secure";
      
      document.cookie = cookie_string;
    }
    
    /** getCookie - načtení cookie
     *
     */ 
    
    function getKolac(c_name)
    {
    if (document.cookie.length>0)
      {
      c_start=document.cookie.indexOf(c_name + "=");
      if (c_start!=-1)
        { 
        c_start=c_start + c_name.length+1; 
        c_end=document.cookie.indexOf(";",c_start);
        if (c_end==-1) c_end=document.cookie.length;
        return unescape(document.cookie.substring(c_start,c_end));
        } 
      }
    return false;
    } 
    
    function doClick(obj) {
      /*try {
      var evt = document.createEvent("MouseEvents");
      evt.initMouseEvent("click", true, true, window,0, 0, 0, 0, 0,
      false, false, false, false, 0, null);
      var canceled = !obj.dispatchEvent(evt);
      if(canceled) {
      // A handler called preventDefault
      } else {
      // None of the handlers called preventDefault
      }
      } catch(er) {
      //obj.click(); //IE
      }   */
    }  

    function receptMesice() {  
      try {  
        if (getKolac('novinka-akce')!='videno') {
          setKolac('novinka-akce','videno','0','0','0');
          var alink = document.getElementById('akceOdkaz');            
          doClick(alink);          
        }
      } catch (e) {
          //setTimeout("receptMesice()", 2000);
        }  
    }
          //Checknem kolacek
    
    //receptMesice();
    //setTimeout("receptMesice()", 2000);
    //document.body.onLoad = "receptMesice();alert('aaa')";
    //window.onload = receptMesice;
 /*   function initOnload()
{var oldOnLoad;
oldOnLoadFce=window.onload;
if(typeof window.onload!='function'){
  window.onload=function(){receptMesice();};
}
  else{
  window.onload=function(){oldOnLoadFce();receptMesice();};}
}
initOnload();*/
