/* 
Rogério Adriano da Silva
Efeito opacidade fundo e carregando.
*/
on_efeito = function(){
		on_fundo();
		$('#IMAGEM').fadeIn();
		$('#IMAGEM .msg').html('');
		setTimeout('ms_efeito1()', 8000);
}
of_efeito = function(){
		of_fundo();
		$('#IMAGEM').fadeOut();
		$('#IMAGEM .msg').html('');
}
on_mensagem = function(){
		on_fundo();
		$('#MENSAGEM').css('visibility','visible');
		$('#MENSAGEM').fadeIn();
}
of_mensagem = function(){
		of_fundo();
		$('#MENSAGEM').fadeOut();	
}
er_efeito = function(){
		on_fundo();
		$('#IMAGEM').fadeIn();
		$('#IMAGEM').html('<span style="color:#ff0000;font-size:15px;">Erro!</span><br><img src="images/erro.png"><br><span style="color:#ff0000;font-size:10px;">Tente Novamente</span>');
		$('#IMAGEM .msg').html('');
}
on_fundo = function(){
		$('#CARREGANDO').css({
			opacity:			0.8,
			width:				$(window).width(),
			height:				$(document).height()
		}).fadeIn();
}
of_fundo = function(){
		$('#CARREGANDO').css({
			opacity:			0.8,
			width:				$(window).width(),
			height:				$(document).height()
		}).fadeOut();
}
ms_efeito1 = function(){
	  $('#IMAGEM .msg').html('Fechar');
}
atributos = function() {
	$('body').append('<div id="CARREGANDO">&nbsp;</div><div id="MENSAGEM"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="2%" id="Mtopoleft">&nbsp;</td><td width="95%" id="Mtopo">&nbsp;</td><td width="3%" id="Mtoporight">&nbsp;</td></tr><tr><td id="Mleft">&nbsp;</td><td id="ViewMENSAGEM" valign="top">&nbsp;</td><td id="Mright">&nbsp;</td></tr><tr><td id="Mbottomleft">&nbsp;</td><td id="Mbottom">&nbsp;</td><td id="Mbottonright">&nbsp;</td></tr></table></div><div id="IMAGEM"><img src="js/efeito/ico-loading.gif"><br>Carregando<div class="msg" style="color:#f00; font-size:10px;"></div></div>');
	$('#IMAGEM').click(function() { of_efeito(); }); on_efeito();
	$('#CloseMensagem').click(function() { of_mensagem(); });
}
