function FrontendTemplateFixHeightToMax()
{
	var iMax = -1;
	var oDiv = null;
	for (i=0; i<arguments.length; i++)
	{
		oDiv = document.getElementById(arguments[i]);
		if (oDiv)
		{
			if (oDiv.offsetHeight > iMax) iMax = oDiv.offsetHeight;
		}
	}
	if (iMax != -1)
	{
		for (i=0; i<arguments.length; i++)
		{
			oDiv = document.getElementById(arguments[i]);
			if (oDiv)
			{
				oDiv.style.height = iMax + "px";
			}
		}
	}
}
function FrontendTemplateDisplayDivs()
{
	//if (document.getElementById("divFrontendPageContent")) document.getElementById("divFrontendPageContent").style.display = "inline";
	//if (document.getElementById("divFrontPageLoading")) document.getElementById("divFrontPageLoading").style.display = "none";
}
function JSExecuteBeforeSubmitForm()
{
	//if (document.getElementById("divFrontendPageContent")) document.getElementById("divFrontendPageContent").style.display = "none";
	//if (document.getElementById("divFrontPageLoading")) document.getElementById("divFrontPageLoading").style.display = "inline";
}
function FrontendTemplateInitialize()
{
	if (window.LocateBoxes) LocateBoxes();
	BoxesArrangeBoxes();
	FrontendTemplateFixHeightToMax("divLayoutLeft","divLayoutCenter","divLayoutRight");
	FrontendTemplateDisplayDivs();
}
function FrontendTemplateAddLoadEvent(oFunction)
{
	var oOldOnload = window.onload;
	if (typeof window.onload != 'function')
	{
		window.onload = oFunction;
	}
	else
	{
		window.onload = function()
		{
			oOldOnload();
			oFunction();
		}
	}
}