// JavaScript Document
// Zishan Zulfiqar 2008

addEvent(window, 'load', fixLayout);
addEvent(window, 'resize', fixLayout);
function fixLayout () {

	var objHtml, objFlash, intHtmlHeight, intFlashHeight, intHtmlWidth, intFlashWidth;

	objHtml = document.getElementsByTagName("html")[0];
	objFlash = elementById('centerObject');
	
	intHtmlHeight = getSize('window').y - 100; //window.innerHeight ? window.innerHeight : objHtml.offsetHeight;
	intFlashHeight = objFlash.offsetHeight;
	
	intHtmlWidth = getSize('window').x; //window.innerWidth ? window.innerWidth : objHtml.offsetWidth;
	intFlashWidth = objFlash.offsetWidth;
	
	// Verplaatst flash object
		objFlash.style.marginTop = intHtmlHeight>intFlashHeight ? Math.floor((intHtmlHeight-intFlashHeight)/2) + 'px' : 0;
		objFlash.style.marginLeft = intHtmlWidth>intFlashWidth ? Math.floor((intHtmlWidth-intFlashWidth)/2) + 'px' : 0;
		objFlash.style.visibility = 'visible';

}
