document.comp_noticiasJaExibidas = new Array();
document.comp_noticiasJaExibidas[0] = '1';
document.comp_noticiasJaExibidas[1] = '2';
document.comp_noticiasJaExibidas[2] = '3';

(function () {

    $(function () { // dom ready
        // cp paginacao
        $('.base-paginacao').find('.bt-pag-back, .bt-pag-next').click(function (e) {
            // desativar botoes anvacar e voltar
            e.preventDefault();
            return false;
        });
        
    });

})(jQuery); // no conflit

function checkMail(mail){
    var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
    if(typeof(mail) == "string"){
            if(er.test(mail)){ return true; }
    }else if(typeof(mail) == "object"){
            if(er.test(mail.value)){ 
                                    return true; 
                            }
    }else{
            return false;
            }
}


//lk 11/07
function CheckForm25(f) {
	if (f.email.value == "" || f.email.value == "Email:") {
		alert("Por favor digite o seu e-mail");
		f.email.focus();
		return false;
	}
	
	if(!checkMail(f.email.value)){
		alert("Digite um e-mail válido");
		f.email.focus();
		return false;
	}
	/*
	//////
	//////	@desc	'é craro', pega resposta e joga no modal. by Jesus
	//////
	cad_newsletter = function(){
		$('#resultado').remove();  
		//var resultado = $("<div id='resultado'><span></span></div>"); 
		var formulario = $('#frmSS25');
		//$("body").prepend('<div id="resultado" style="height:175px; width:400px; background-color:#FFFFFF; display:none;">'
		//		+'<span style="height:175px; width:400px; background-color:#FFFFFF;"></span></div>');

		
		$.post(formulario.attr('action'), formulario.serialize(),
				function(data){
					//var alvo = $('#resultado');
					if (data != 'OK') {	
						//alvo.find('span').text('CADASTRO EFETUADO COM SUCESSO');
						//tb_show("teste","#TB_inline?height=175&amp;width=400&amp;inlineId=resultado", null);		
						//tb_show("Mensagem","/news_ok.html?height=516&width=461", null);		
						alert('Gravado com sucesso');
						setTimeout('tb_remove();', 4000);	
					} else {
						alert('algo acontece');
						alvo.html(data);
					}
	
				}
			);					
		
		//
		return false;
	}
	return cad_newsletter();
	*/
};



