cadastraEmailBoletim = function(){
	var err = '';
	if(!$('base.email').value.isMail()){
		
		err += 'Preencha seu email corretamente.<br>';
	}
	
	if(err!=''){
		SA.open('Alerta!', err, null, 1, 1);	
	}else{
		
		juris = 0;
		dicas = 0;
		legs = 0;
		pets = 0;
		conts = 0;
		nots = 0;
		arts = 0;
		cursos = 0;
	
		form = 'base';
		
		if($(form+'.juris').checked==true){
			juris = 1;
		}
		if($(form+'.dicas').checked==true){
			dicas = 1;
		}
		if($(form+'.legs').checked==true){
			legs = 1;
		}
		if($(form+'.pets').checked==true){
			pets = 1;
		}
		if($(form+'.conts').checked==true){
			conts = 1;
		}
		if($(form+'.nots').checked==true){
			nots = 1;
		}
		if($(form+'.arts').checked==true){
			arts = 1;
		}
	
		
		var xml = new xmlConnection();
		if (xml.create()){
			xml.setURL('/boletimgratuito/addboletimsite/');
			xml.setMethod('POST');
			xml.addParameters('nocache',nocache());
			xml.addParameters('email',$('base.email').value);		
			xml.addParameters('juris',juris);	
			xml.addParameters('dicas',dicas);	
			xml.addParameters('legs',legs);	
			xml.addParameters('pets',pets);	
			xml.addParameters('conts',conts);	
			xml.addParameters('nots',nots);	
			xml.addParameters('arts',arts);		
			xml.addParameters('cursos',cursos);		
			
		}
		xml.onComplete = function() {
			SAWait.close();
			this.setChildName('return');
			if(this.getAttByName('return',0)==1){
				SA.open('Sucesso!', 'Seu email foi cadastrado em nosso sistema.', null, 1, 1);	
			}else{
				SA.open('Erro!', 'Ocorreu um erro ao cadastrar seu email. Favor tente novamente mais tarde.', null, 1, 1);
			}
		}
		xml.execute();	
	}	
}