// JavaScript Document
var f_h,t_h,area_height,area_name,div_running,opened_area='';
//------------------------------------------

//------------------------------------------
function poen_xx_area(area,table) {
if(div_running!=1){
  h = document.getElementById(area).clientHeight;
  area_height=h;
  area_name=area;
  
	if(document.getElementById(area).style.display != "block"){
	    if(opened_area!=''){
	     document.getElementById(opened_area).style.display = "none";
  	     document.getElementById(opened_area).style.height = "0px";
	     //document.getElementById(opened_area+"_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
         }
	  document.getElementById(area).style.display = "block";
	  h = document.getElementById(table).clientHeight ;
	  document.getElementById(area).style.display = "none";
      area_height=h;
      area_name=area;

	  div_running=1;
      f_h=0;
      t_h=h;
      run_area = setInterval('run_xx_area()',10);
      document.getElementById(area).style.display = "block";
      //document.getElementById(area+"_bt").style.background = "url(image/index/in-mm2.jpg) no-repeat left bottom"; 

	}else{
      div_running=1;
      f_h=h;
      t_h=0;
      run_area = setInterval('run_xx_area()',10);
	}
}
}
//------------------------------------------

//------------------------------------------
function Close_xx_area() {
if(div_running!=1){
	    if(opened_area!=''){
		 //alert(opened_area);
	     document.getElementById(opened_area).style.display = "none";
  	     document.getElementById(opened_area).style.height = "0px";
         }
	}
}
//--------------------------------------------
function run_xx_area() {
 f_h = f_h + (t_h-f_h)/3;
 yL = Math.round(f_h);		
 document.getElementById(area_name).style.height = yL+"px";	

  if(yL>(area_height-1)){
	clearTimeout(run_area);
	div_running=0;
	opened_area=area_name;
  }
  if(yL<1){
	clearTimeout(run_area);
	document.getElementById(area_name).style.display = "none";
	
	div_running=0;
	opened_area='';
  }	
}

//--------------------------------------------
function run_xx_area2() {
 f_h = f_h + (t_h-f_h)/3;
 yL = Math.round(f_h);		
 document.getElementById(area_name).style.height = yL+"px";	

  if(yL>(area_height-1)){
	clearTimeout(run_area);
	div_running=0;
	opened_area=area_name;
  }
  if(yL<1){
	clearTimeout(run_area);
	document.getElementById(area_name).style.display = "none";
	
	div_running=0;
	opened_area='';
  }	
}

//===========================================================================
