$(document).ready(function() {

	$('#text div.unit:not(:first)').hide();
	$('#text h2:first').addClass('active');
	
	$('#text h2').click(function() {
		
		if($(this).hasClass('active')) {
			return false;
		}
		else {
			$(this).siblings().removeClass('active');
			$(this).next('div.unit').slideToggle('slow').siblings('div.unit:visible').slideUp('slow');
			$(this).addClass('active');
		}
		
	});

});


function fecharDivRegistro() {
    document.getElementById("ctl00_ContentPlaceHolder1_divValidaRegistro").style.display = "none"
}


function centrar(arquivo, janela, largura, altura) {

    posx = (screen.width / 2) - (largura / 2);
    posy = (screen.height / 2) - (altura / 2);



    features = "',width=" + largura + ", height=" + altura + ", top=" + posy + ", left=" + posx + ", scrollbars,resizable,status,toolbar,menubar'";
    window.open(arquivo, janela, features);
}