  var tab_height = "";
  var obj_menu = null;
  var obj_menu_old = null;	
  var scroll_id = null;
  var height = 0;
  
  function openclose(div_to_open, str_style){
	  if (div_to_open!=""){
      var obj_tab = document.getElementById("tab_" + div_to_open); 			 
      obj_menu = document.getElementById("menu_" + div_to_open);
      tab_height = obj_tab.clientHeight
      height = 0;
      if (obj_menu_old!=null){
			  var div_to_open_old = obj_menu_old.id.split("_");
			  document.getElementById("freccia_" + div_to_open_old[1]).src="../img/menu_dw" + str_style + ".gif";
        obj_menu_old.style.height = "1px";
      }
      if (obj_menu_old!=obj_menu){ 
			  document.getElementById("freccia_" + div_to_open).src="../img/menu_up" + str_style + ".gif";
        scroll_id = window.setTimeout("scroll();",25)
  		}
  		else{
    		obj_menu_old = null;
  		}
		}	
  }
	
	function set_menu_old(div_to_open, str_style){
  	obj_menu_old = document.getElementById("menu_" + div_to_open);
	}
	
  function scroll(){
    if (height<tab_height){
    	height = height + 5
  		obj_menu.style.height = height + "px";							
    	scroll_id = window.setTimeout("scroll();",25)
    }
    else{
    	height = 1
      obj_menu_old = obj_menu; 								
    	window.clearTimeout(scroll_id);
    }
	}