function getLoading() {	return $('loading').innerHTML; }
var CURRENT_FONT_SIZE = 10;
function increaseFontSize() {
	if (CURRENT_FONT_SIZE >= 18) { return; }
	CURRENT_FONT_SIZE += 1;
	var iFontSize = (CURRENT_FONT_SIZE / 10) + 'em';
	$('boxColumn_1x2_Content').setStyle({ fontSize : iFontSize });
}
function decreaseFontSize() {
	if (CURRENT_FONT_SIZE <= 6) { return; }
	CURRENT_FONT_SIZE -= 1;
	var iFontSize = (CURRENT_FONT_SIZE / 10) + 'em';
	$('boxColumn_1x2_Content').setStyle({ fontSize : iFontSize });
}
function showFormErrors(formName, errorContent) {
	$('errors').innerHTML = errorContent;
	var dimensions = $('errors').getDimensions();
	if (formName != '')	{
		var oOffset = Position.cumulativeOffset($(formName));
		var leftPos = (oOffset[0] - (dimensions.width + 20));
		var topPos  = oOffset[1] - 20;
		if (leftPos <= 0) { leftPos = 10; }
		if (topPos <= 0) { topPos = 10; }
		$('errors').style.left = leftPos + 'px';
		$('errors').style.top = topPos + 'px';
	} else {
		$('errors').style.top = (100 + document.body.scrollTop) + 'px';
	}
	$('errors').show();
	$('errors').onclick = function() { $(this).hide(); }
}

function showMessage(parentContainer, message) {
	$('infos').innerHTML = message;
	var dimensions = $('infos').getDimensions();
	if (parentContainer != '') {
		var oOffset = Position.cumulativeOffset($(parentContainer));
		var leftPos = (oOffset[0] - (dimensions.width + 20));
		var topPos  = oOffset[1] - 20;
		if (leftPos <= 0) { leftPos = 10; }
		if (topPos <= 0) { topPos = 10; }
		$('infos').style.left = leftPos + 'px';
		$('infos').style.top = topPos + 'px';
	} else {
		$('infos').style.top = (100 + document.body.scrollTop) + 'px';
	}
	$('infos').show();
	$('infos').onclick = function() { $(this).hide(); }
	new PeriodicalExecuter(function(pe)	{
		if ($('infos').visible()) {
			$('infos').hide();
		}
		pe.stop();
	}, 5);
}

function hideMessages() {
	$('infos').hide();
	$('errors').hide();
}