var novekszik;
var max;
var div;
function div_meretez(id,maximum){
   div=document.getElementById(id);
   max=maximum;  
   var curr_width =parseInt(div.style.height) ;
   var defw=document.defaultView;
    
   if (defw!=null){
   var actualstyle=defw.getComputedStyle(div, "");
   //alert(actualstyle.height);
     if (parseInt(actualstyle.height)==1) {
      up();
     }else{ 
      down();
     } 
   }else{
    var obj,style;
     if(document.getElementById && (obj = document.getElementById(id)) && (style = obj.style))
     if (style.height=='1px') {
      //alert(style.height);
      upexplorer();      
     }else{
     //alert(style.height); 
      downexplorer();
      
     }
  
   }  
}

function up(){
   
   var actualstyle=document.defaultView.getComputedStyle(div, ""); 
   if (actualstyle==null) actualstyze=div.style;
   var meret=parseInt(actualstyle.height);
   //alert(actualstyle.height);
   //var meret=parseInt(div.style.height);
   if (meret<max){
   div.style.height=meret+5;
   window.setTimeout ("up() ; ",5);
   }else{
   //div.style.diplay="none";
   }
}

function down(){
  //alert('okdown');
   //div.style.diplay="block";
   if (parseInt(div.style.height)>1){
   div.style.height=parseInt(div.style.height)-5;
   window.setTimeout ("down() ; ",5);
   }
}

function upexplorer(){
   //alert("upexplorer");
   var meret=parseInt(div.style.height);
   if (meret<max){
   div.style.height=meret+5;
   window.setTimeout ("upexplorer() ; ",5);
   }else{
   //div.style.diplay="none";
   }
}

function downexplorer(){
  //alert('okdown');
   //div.style.diplay="block";
   //alert("downexplorer");
   if (parseInt(div.style.height)>1){
   div.style.height=parseInt(div.style.height)-5;
   window.setTimeout ("downexplorer();",5);
   }
}


