//splashwindow functions

function getSplashWindowSize() {
	return [document.getElementById('splashscreen').clientWidth, document.getElementById('splashscreen').clientHeight];
}

function SplashscreenShow() {
	//get full page size and set splashbackground to this size so it covers everything
	var size = getPageSize();
	document.getElementById('splashscreen_bg').style.width = size[0] + 'px';
	document.getElementById('splashscreen_bg').style.height = size[1] + 'px';
	//check the visible part of the page
	//get scroll offset
	var scrollOffset = getScrollOffsets();
	var scrollOfsWidth = scrollOffset[0];
	var scrollOfsHeight = scrollOffset[1];
	//get visible window size (need to center splash window in this window
	var windowSize = getVisibleWindowSize();
	var windowWidth = windowSize[0];
	var windowHeight = windowSize[1];
	//get splashwindow size
	var splashWindowSize = getSplashWindowSize();
	var splashWindowWidth = splashWindowSize[0];
	var splashWindowHeight = splashWindowSize[1];
	//cemter splash window in visible part of page
	var splashWindowLeft = scrollOfsWidth + (windowWidth - splashWindowWidth)/2;
	var splashWindowTop = scrollOfsHeight + (windowHeight - splashWindowHeight)/2;
	//apply settings to divs
	document.getElementById('splashscreen').style.left = splashWindowLeft + 'px';
	document.getElementById('splashscreen').style.top = splashWindowTop + 'px';
	document.getElementById('splashscreen').style.width = splashWindowWidth + 'px';
	document.getElementById('splashscreen').style.height = splashWindowHeight + 'px';
	//show
	document.getElementById('splashscreen_bg').style.visibility = 'visible';
	//Effect.Appear('splashscreen_bg', { duration: 1.5, from: 0.0, to: 0.65 });
	document.getElementById('splashscreen').style.visibility = 'visible';
	//Effect.Appear('splashscreen', { duration: 1.5, from: 0.0, to: 1.0 });
}

function SplashscreenHide() {
	//hide
	document.getElementById('splashscreen_bg').style.visibility = 'hidden';
	document.getElementById('splashscreen').style.visibility = 'hidden';
}

