// ================================
// 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 posT2;
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 - 768) / 2);
posT = parseInt((myHeight- 428) / 2);

if (posL < 0) {
	posL = 0;
}
if (posT < 0) {
	posT = 0;
}

posT1 = parseInt(posT + 62);
posT2 = parseInt(posT + 62 + 26);
posT3 = parseInt(posT + 62 + 26 + 340);

document.write ('<style type="text/css">');
document.write ('.Table1 {');
document.write ('	position: absolute;');
document.write ('	top: ' + posT + 'px;');
document.write ('	left: ' + posL + 'px;');
document.write ('	border-top-width: 1px;');
document.write ('	border-right-width: 1px;');
document.write ('	border-bottom-width: 1px;');
document.write ('	border-left-width: 1px;');
document.write ('	border-top-style: solid;');
document.write ('	border-right-style: solid;');
document.write ('	border-bottom-style: none;');
document.write ('	border-left-style: solid;');
document.write ('	border-top-color: #7A9DED;');
document.write ('	border-right-color: #7A9DED;');
document.write ('	border-bottom-color: #7A9DED;');
document.write ('	border-left-color: #7A9DED;');
document.write ('}');
document.write ('.Table2 {');
document.write ('	position: absolute;');
document.write ('	top: ' + posT1 + 'px;');
document.write ('	left: ' + posL + 'px;');
document.write ('	border-top-width: 1px;');
document.write ('	border-right-width: 1px;');
document.write ('	border-bottom-width: 1px;');
document.write ('	border-left-width: 1px;');
document.write ('	border-top-style: none;');
document.write ('	border-right-style: solid;');
document.write ('	border-bottom-style: none;');
document.write ('	border-left-style: solid;');
document.write ('	border-top-color: #7A9DED;');
document.write ('	border-right-color: #7A9DED;');
document.write ('	border-bottom-color: #7A9DED;');
document.write ('	border-left-color: #7A9DED;');
document.write ('}');
document.write ('.Table3 {');
document.write ('	position: absolute;');
document.write ('	top: ' + posT2 + 'px;');
document.write ('	left: ' + posL + 'px;');
document.write ('	border-top-width: 1px;');
document.write ('	border-right-width: 1px;');
document.write ('	border-bottom-width: 1px;');
document.write ('	border-left-width: 1px;');
document.write ('	border-top-style: none;');
document.write ('	border-right-style: solid;');
document.write ('	border-bottom-style: solid;');
document.write ('	border-left-style: solid;');
document.write ('	border-top-color: #7A9DED;');
document.write ('	border-right-color: #7A9DED;');
document.write ('	border-bottom-color: #7A9DED;');
document.write ('	border-left-color: #7A9DED;');
document.write ('}');
document.write ('.Table4 {');
document.write ('	position: absolute;');
document.write ('	top: ' + posT3 + 'px;');
document.write ('	left: ' + posL + 'px;');
document.write ('}');
document.write ('</style>');

