
var ieDiffWidth;
var ieDiffHeight;

function init() {

  var w, h, offW, offH, diffW, diffH;
  var fixedW = 800;
  var fixedH = 600;

  if (document.all) {
    offW = document.body.offsetWidth;
    offH = document.body.offsetHeight;
    window.resizeTo(fixedW, fixedH);
    diffW = document.body.offsetWidth  - offW;
    diffH = document.body.offsetHeight - offH;
    w = fixedW - diffW;
    h = fixedH - diffH;
    ieDiffWidth  = w - offW;
    ieDiffHeight = h - offH;
    window.resizeTo(w, h);
  }
}

function outerWd() {

  if (document.all)
    return document.body.offsetWidth  + ieDiffWidth;
  else
    return window.outerWidth;
}

function outerHt() {

  if (document.all)
    return document.body.offsetHeight  + ieDiffHeight;
  else
    return window.outerHeight;
}

function math(){
	var left = parseInt( (outerWd()-1243)/2 );
	if (left<0){
		left = 0;
	}
	
	var top = parseInt( (outerHt()-1014)/4 );
	if (top<0){
		top = 0;
	}

	var oControl = document.getElementById('dior_crmos');
	
	if (oControl!=null){
		oControl.style.marginTop = top +'px';		
		oControl.style.marginLeft = left +'px';
	}	

}

window.onload = math;
window.onresize = math;