//Visualizza area local site
var interval,box,bh;
function slide (elem, to, step, max) {
   if  (step * (to - bh) > 0){
      bh = bh+step;
   } else {
      clearInterval(interval);
      bh = to;
   }
   if(bh < 0){ bh = 0; elem.style.display = 'none'; }
   if (bh > max) {
      bh = max;
   }
   elem.style.height = bh + "px";
}

function workBox(id, maxh,strhtm) {
   box = document.getElementById(id);
   bh = Number(box.style.height.slice(0,-2));
   intvl = 100; //ms between redraws
   to = 0;
   box.style.display = 'block';
   if (bh > 0) {
      to = 0; // closed size
      pps = -1000; // pixels per sec
   }else{
		document.getElementById('localization').innerHTML='<span>'+strhtm+'</span>';
      to = maxh; // opened size
      pps = 34; // pixels per sec
   }
   step = (pps/1000.0) * intvl; // step size per interval
   interval = setInterval("slide(box, " + to + ", " + step + "," + maxh + ")", intvl);
}













