// ================================
// Screen detect and centre script
// --------------------------------
// Version: 1.0
// Date: 17 May 2003
// © Copyright Mark Dodwell 2003
// ================================

window.onResize = init();

function forceReload() {
window.location.reload();
}

function init() {
  window.setTimeout("window.onresize = forceReload", 1000);
}

// centre table
var posL;
var posT;
var posT1;
var posL1;
var posT3;

  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }

posL = parseInt(((myWidth - 725) / 2) - 1);
posT = parseInt(((myHeight- 672) / 2) - 1);
posL1 = parseInt(((myWidth - 505) / 2) - 1);
posT1 = parseInt(((myHeight- 245) / 2) - 1);

if (posL < 0) {
	posL = 0;
}
if (posT < 0) {
	posT = 0;
}
if (posL1 < 0) {
	posL1 = 0;
}
if (posT1 < 0) {
	posT1 = 0;
}

document.write ('<style type="text/css">');
document.write ('.CentreTable {');
document.write ('	position: absolute;');
document.write ('	top: ' + posT + 'px;');
document.write ('	left: ' + posL + 'px;');
document.write ('}');
document.write ('.CentreTable2 {');
document.write ('	position: absolute;');
document.write ('	top: ' + posT1 + 'px;');
document.write ('	left: ' + posL1 + 'px;');
document.write ('}');
document.write ('</style>');


