function mainElement()
{
	return document.getElementById('main')
}

function mainDoVerticalCenter(e)
{
	var windowWidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth,
		windowHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight;
		
	var elementWidth=e.offsetWidth,
		elementHeight=e.offsetHeight;
	
	e.style.top=(windowHeight-elementHeight)/2+'px';
	e.style.left=(windowWidth-elementWidth)/2+'px'
}

function mainOpenCommercial()
{	
	var content = document.getElementById("mainText");
	content.style.display='none';
	
	var e=mainElement();
	e.style.display='block';
	//mainDoVerticalCenter(e)
}

function mainHideCommercial()
{
	var content = document.getElementById("mainText");
	content.style.display='block';
	mainElement().style.display='none'
}

function onResize()
{
	//mainDoVerticalCenter(mainElement())
}

function onLoad()
{
	mainElement().style.display='none';
}
