function adjh() {
 
 var h=document.getElementById('mid').offsetHeight;
 var m=2-h%3;
 /*if(m==2) m=0;
 else {
  if(m==0) m=2;
   else {
   if(m==1) m=1;
   }
  }*/ 
 document.getElementById('mid').style.height=(h+m)+'px';
}
window.onload=adjh;
