<!--
var MSG_ACTION_DISABLED='Menu Popup bloqueado!'; 

function stopEvent(ev){
	if(document.all){
		ev.cancelBubble=true;
		ev.returnValue=false;
	}else{
		ev.preventDefault();
		ev.stopPropagation();
	}
}
	
function click(e){
	if (document.all){
		if(event.button == 2){
			alert(MSG_ACTION_DISABLED);
			return false;
		}
	}
	
	if(document.layers){
		if(e.which==3){
			alert(MSG_ACTION_DISABLED);
			return false;
		}
	}
}

if(document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=click;
}

// Funções para janela Modal ( Mensagem de Natal )
function open_modal( id ){
	var maskHeight = $(document).height();
	var maskWidth = $(window).width();

	$('#mask').css({'width':maskWidth,'height':maskHeight});

	$('#mask').fadeIn(1000);
	$('#mask').fadeTo("slow",0.8);	

	//Get the window height and width
	var winH = $(window).height();
	var winW = $(window).width();

	$(id).css('top',  winH/2-$(id).height()/2);
	$(id).css('left', winW/2-$(id).width()/2);
	$(id).fadeIn(2000);
};
$(document).ready(function() {	

	$('a[name=modal]').click(function(e) {
		e.preventDefault();
		open_modal( $(this).attr('href') );
	});

	open_modal( '#dialog' );//abrindo o div#modal ao carregar a página

	$('.window .close').click(function (e) {
		e.preventDefault();

		$('#mask').hide();
		$('.window').hide();
	});		

	$('#mask').click(function () {
		$(this).hide();
		$('.window').hide();
	});
});

// Final Mensagem de natal

//-->
