var myWidth = 0, myHeight = 0;

function findSize() {
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;
}
//alertSize();
}

function centerGetObj(name)
{
if (document.getElementById)
{
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all)
{
this.obj = document.all[name];
this.style = document.all[name].style;
}
else if (document.layers)
{
this.obj = document.layers[name];
this.style = document.layers[name];
}
}

function alertSize() {
window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );
}

function centerContent( first ) {
	findSize();
	if( myWidth > 740 || first!="yup" ) {
		if( first=="yup" ) {
			document.write('<style type="text/css"> body#waldorf { margin-left: ' + Math.floor((myWidth - 720)/2) + 'px; } </style>');
		}
		else {
			var bob = new centerGetObj("waldorf");
			if( myWidth > 740 ) xpos = Math.floor((myWidth - 720)/2); else xpos = 10;
			bob.style.marginLeft = xpos + 'px';
		}
	}
}

centerContent("yup");
window.onresize = centerContent;

