var divError = '<div id="div_error" style="display: none; z-index: 1;"></div>';

initError();

function initError()
{
	document.write(divError);
}

function showError(msg)
{
	try {
		document.getElementById('div_error').innerHTML = '<input type="text" id="top" style="width: 1px; height: 1px; border: 0px;">'+ msg +'<div style="width: 100%; text-align: right;"><a href="javascript: hideError();">Esconder Mensagem</a></div>';
		document.getElementById('div_error').style.display = '';
		document.getElementById('top').focus();
	} catch (e) {
		if ( showError )	alert(e.message);
	}
}

function hideError()
{
	document.getElementById('div_error').style.display = 'none';
}
