// JavaScript Document

	var Geral = {
		Inicio: function () {
			$('a').click(function (){if ($(this).attr("href") == "#") {return false}});
			$('.voltar').click(function (){history.back(); return false;});
			$('.print').click(function (){window.print(); return false;});
			$('.op').hover(function(){$(this).children("img").stop().fadeTo(250,.7);}, function () {$(this).children("img").stop().fadeTo(250,1);});
			$('.opb').hover(function(){$(this).stop().fadeTo(250,.7);}, function () {$(this).stop().fadeTo(250,1);});
			$('.tr').hover(function(){$(this).children("img").stop().fadeTo(250,.0);}, function () {$(this).children("img").stop().fadeTo(250,1);});
			$("input[type=text], textarea").focus(function(){if ($(this).attr("title") == $(this).val()) {$(this).val("");}});	
			$("input[type=text], textarea").blur(function(){if ($(this).val() == "" && $(this).attr("title")) {var tt = $(this).attr("title");$(this).val(tt);}});	
		} ,		
		BVersion: function() {
			var version = 999; 
			if (navigator.appVersion.indexOf("MSIE") != -1)
			version = parseFloat(navigator.appVersion.split("MSIE")[1]);
			return version;
		}
	}
	
	function constErro (valor) {
		var _body 		= $('body')[0];
		var _h = $(document).height();
		var _w = $(document).width();
		$( _body).append('<div id="takeAll"></div>');
		$( _body).append('<div id="cccjjj"><a href="#" id="closeJan"><img src="img/alertas/fechar.gif" width="38" height="27" /></a></div>');
		$( _body).append('<div id="flttt"><img src="/img/alertas/nenv.gif" width="573" height="187" /></div>');
		$('#takeAll').height(_h).width(_w).css('background',"#000").css('position','absolute').css('z-index',99).css('top',0).css('left',0).css('display','none');
		$('#cccjjj').height(_h).width(_w).css('position','absolute').css('z-index',101).css('top',valor).css('left',"50%").css('width','30px').css('height','30px').css('margin-left','260px');
		$('#flttt').height(_h).width(_w).css('position','absolute').css('z-index',100).css('top',valor).css('left',"50%").css('display','none').css('width','600px').css('height','220px').css('margin-left','-300px').css('background',"#FFF");
		 $('#takeAll').fadeTo(250,.45);
		 $('#flttt').fadeTo(250, 1);
		$('#takeAll,#closeJan').click(function() {
			var _body 		= $('body')[0];
			$("#takeAll").remove();
			$('#flttt').remove();
			$('#cccjjj').remove();
			return false;
		});		
	}

	function constOk () {
		var _body 		= $('body')[0];
		var _h = $(document).height();
		var _w = $(document).width();
		$( _body).append('<div id="takeAll"></div>');
		$( _body).append('<div id="cccjjj"><a href="#" id="closeJan"><img src="img/alertas/fechar.gif" width="38" height="27" /></a></div>');
		$( _body).append('<div id="flttt"><img src="/img/alertas/msgenv.gif" width="576" height="192"  /></div>');
		$('#takeAll').height(_h).width(_w).css('background',"#000").css('position','absolute').css('z-index',99).css('top',0).css('left',0).css('display','none');
		$('#cccjjj').height(_h).width(_w).css('position','absolute').css('z-index',101).css('top',"350px").css('left',"50%").css('width','30px').css('height','30px').css('margin-left','260px');
		$('#flttt').height(_h).width(_w).css('position','absolute').css('z-index',100).css('top',"350px").css('left',"50%").css('display','none').css('width','600px').css('height','220px').css('margin-left','-300px').css('background',"#FFF");
		 $('#takeAll').fadeTo(250,.45);
		 $('#flttt').fadeTo(250, 1);
		$('#takeAll,#closeJan').click(function() {
			var _body 		= $('body')[0];
			$("#takeAll").remove();
			$('#flttt').remove();
			$('#cccjjj').remove();
			return false;
		});		
	}

