var jak = 0;
function show_or_hide()
{
 var idTD = document.getElementById("tdPokus");
 if (idTD.style.display=="none")
 {

  idTD.style.display="block";  
  image_width_plus(0,"trava",181,1); 
 }
 else     //jak = 2, zmensujeme
 {
  image_width_minus(183,"trava",0,2);
 }
    
}

function image_width_minus( img_width, id, min) {   
    timer = null;       
    //objekt z daneho identifikatoru                     
    idImg = document.getElementById(id);
    var idTD = document.getElementById("tdPokus");
    var croos_image = document.getElementById("croos_image");
    
    //podminka pro porovnani velikosti           
    if(img_width > min ) {   
        //v pripade pravdy vytvorime novou velikost       
             
        img_width -= 3;
        //a nastavime nvoou velikost     
        if (img_width < 0) img_width = 0; 
        idImg.style.height = ( img_width ) + "px";        
        idTD.style.height = ( img_width ) + "px";
         //rekurzivne volame funkci pro zmensovani obrazku            
        timer = setTimeout("image_width_minus(" + img_width + ",'" + id + "', " + min + ","+jak+");", 10);   
    } else {   
        //clearTimeout('timer');
        
                
         
          idTD.style.display="none";
          croos_image.style.backgroundImage="url(images/cube_multi.png)";
          createCookie('showImg','1',7);
          
        return true;
           
    }     
}

function image_width_plus( img_width, id, min ) {   

    timer = null;       
    //objekt z daneho identifikatoru                     
    var idImg = document.getElementById(id);
    var idTD = document.getElementById("tdPokus");
    var croos_image = document.getElementById("croos_image");
    
    //podminka pro porovnani velikosti           
    if(img_width<=min) {   
        //v pripade pravdy vytvorime novou velikost       
        img_width += 3;     
        //a nastavime nvoou velikost      
        idImg.style.height = ( img_width ) + "px";        
        idTD.style.height = ( img_width ) + "px";
         //rekurzivne volame funkci pro zmensovani obrazku            
        timer = setTimeout("image_width_plus(" + img_width + ",'" + id + "', " + min + ","+jak+");", 10);   
    } else {   
        //clearTimeout('timer');
                
          croos_image.style.backgroundImage="url(images/cross_multi.png)";
          createCookie('showImg','0',7);        
        return true;
           
    }     
}










function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function cross_change(hop){
  //getElementById('img_cross').style =
}   
