var zindex;
var width;
var height;

function load(){
  zindex=1;
  resize_window();
  document.getElementById("login").focus();
}

function resize_window() {
  width  = document.body.clientWidth;
  height = document.body.clientHeight;
  var top = 0;
  var left = 0;
  if (width >  300) { left = Math.round(eval((width-300)/2)); }
  if (height > 300) { top  = Math.round(eval((height-300)/2));}  
  document.getElementById("div_login").style.top  = top  + "px";  
  document.getElementById("div_login").style.left = left + "px";  
}

function resize_error() {
  width  = document.body.clientWidth;
  height = document.body.clientHeight;
  var top = 0;
  var left = 0;
  if (width >  550) { left = Math.round(eval((width-500)/2)); }
  if (height > 210) { top  = Math.round(eval((height-170)/2));}  
  document.getElementById("div_error").style.top  = top  + "px";  
  document.getElementById("div_error").style.left = left + "px";  
}
