﻿function initSplashPage(divId, height, width, top, left, borderWidth, padding, bgcolor, duration) {
	var div = $get(divId);

	var windowHeight = 0, windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowHeight = window.innerHeight;
		windowWidth = window.innerWidth;
	} else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		windowHeight = document.documentElement.clientHeight;
		windowWidth = document.documentElement.clientWidth;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		windowHeight = document.body.clientHeight;
		windowWidth = document.body.clientWidth;
	}

	div.style.height = height + 'px';
	div.style.width = width + 'px';
	div.style.top = Math.round((windowHeight / 2) - (height / (100 / (100 - top)))) + 'px';
	div.style.left = Math.round((windowWidth / 2) - (width / (100 / (100 - left)))) + 'px';
	div.style.backgroundColor = bgcolor;
	div.style.padding = padding + 'px';
	div.style.borderWidth = borderWidth + 'px';
	
	toggleDiv(divId, false);
	setTimeout('closeSplashPage()', duration * 1000);
}
