function setWindowToCenter (element) {
  
  var x,y,elementHeight,elementWidth,marginTop,marginLeft;
  
  if (window.innerHeight) // all except Explorer
  {
  	x = window.innerWidth;
  	y = window.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
  	// Explorer 6 Strict Mode
  {
  	x = document.documentElement.clientWidth;
  	y = document.documentElement.clientHeight;
  }
  else if (document.body) // other Explorers
  {
  	x = document.body.clientWidth;
  	y = document.body.clientHeight;
  }
  
  var w=screen.width;
  var h=screen.height;
            
  if (x >= 955 && y >= 600) {
    elementWidth = document.getElementById(element).style.width;          
    elementHeight = document.getElementById(element).style.height;
    
    elementWidth = elementWidth.replace(/px/g, "");
    elementHeight = elementHeight.replace(/px/g, "");
    
    marginTop = (y - elementHeight)/2;
    marginLeft = (x - elementWidth)/2;         
    
    document.getElementById(element).style.marginTop = marginTop + "px";
    document.getElementById(element).style.marginLeft = marginLeft + "px";
    
  } else {

    document.getElementById(element).style.marginTop = "0px";
    document.getElementById(element).style.marginLeft = "0px";

  }
}

