// JavaScript Document
var f_h,t_h,area_top,area_name,div_running,upd;
area_top=0;
//===========================================================================

function poen_xx_area(area,h,ud) {
	
if(div_running!=1){		
  upd=ud;
  area_name=area;      
  div_running=1;    
  f_h=area_top; 
  //----------------------------
	if(ud=='d' ){
      t_h=f_h+h;
	}else{
      t_h=f_h-h;
	}
   //----------------------------
   run_area = setInterval('run_xx_area()',10);
}
}

//------------------------------------------
//------------------------------------------
function run_xx_area() {
f_h = f_h + (t_h-f_h)/5;
yL = Math.round(f_h);	
document.getElementById(area_name).style.top = yL+"px";	
area_top=yL;
  //-----------------------------------------------    
  if((yL>(t_h-3)&& upd=='d')||(yL<(t_h+3)&& upd=='u')){
	clearTimeout(run_area);
	div_running=0;
	yL=t_h;
    document.getElementById(area_name).style.top = yL+"px";	
    area_top=yL;
	//-----------------------------------------------
	if(yL<=ytop){
		document.getElementById('up').style.display="none";
		document.getElementById('dn').style.display="block";
    }else if(yL>=0){
 	   	document.getElementById('up').style.display="block";
 		document.getElementById('dn').style.display="none";
    }else{
 	   	document.getElementById('up').style.display="block";
 		document.getElementById('dn').style.display="block";
    }
    //-----------------------------------------------
  }
  //-----------------------------------------------
}



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