function body_width()
{
  if ( typeof(window.innerWidth) == "undefined" ){
    return document.body.clientWidth;
  }
  else
    return parseInt(window.innerWidth);
}
function body_height()
{
  if ( typeof(window.innerHeight) == "undefined" )
    return document.body.clientHeight;
  else
  return parseInt(window.innerHeight);
}
function do_resize()
{
  var hid=document.getElementById("_container_");
  var cont_top=parseInt(hid.style.top);
  var cont_left=parseInt(hid.style.left);
  var cont_width=parseInt(hid.style.width);
  var cont_height=parseInt(hid.style.height);
  var bwidth=body_width();
  var bheight=body_height();
 // alert(cont_top+"|"+cont_left+"|"+cont_width+"|"+cont_height+"|"+bwidth+"|"+bheight);

  var new_left=Math.round(0.5*(bwidth-cont_width));
  var new_top=Math.round(0.5*(bheight-cont_height));

  if ( new_top >= 0 )
    hid.style.top=new_top+"px";
  else
    hid.style.top="0px";
    
  if ( new_left >= 0 )
    hid.style.left=new_left+"px";
  else
    hid.style.left="0px";
}
