var v_middle = document.getElementById('v_middle')
var v_middle_height = 0;
var avail_height = 0;
var my_content_height = 500; // This is how big your content is, set it to whatever you need.
var my_content_width = 800;  // This is the width you want your box to be.

function go_deadCenter() {
   if (parseInt(navigator.appVersion)>3) {
      if (navigator.appName.indexOf("Microsoft") >= 0) {
         avail_height = document.body.offsetHeight;
         avail_width = document.body.offsetWidth;
         if (avail_height > my_content_height && avail_width > my_content_width)
            center_vmiddle();
         else
            alert("DeadCenter says: Too small or they're too sneeky. I left it.");
      }
      else if (navigator.appName=="Netscape") {
         avail_height = window.innerHeight;
         avail_width = window.innerWidth;
         if (avail_height > my_content_height && avail_width > my_content_width)
            center_vmiddle();
         else
            alert("DeadCenter says: Too small or they're too sneeky. I left it.");
      }
      else
         alert("DeadCenter says: Too small or they're too sneeky. I left it.");
   }
}
function center_vmiddle() {
   v_middle.style.position = "absolute";
   v_middle.style.top = "50%";
   v_middle.style.left = "50%";
   v_middle.style.width = my_content_width;
   v_middle.style.height = my_content_height;

   half_height = (my_content_height / 2) + 10;
   v_middle.style.marginTop = "-"+half_height+"px";
   half_width = (my_content_width / 2) + 10;
   v_middle.style.marginLeft = "-"+half_width+"px";

alert("DeadCenter says: Done Boss...It was big enough so I ran it.");
}