/**
 *
 * @access public
 * @return void
 **/
function $E(id){
	return document.getElementById(id);
}

function getValueVoto(){
	var valor = 0;
	for (var i=0; i < document.formEnquete.voto.length; i++){
   		if (document.formEnquete.voto[i].checked){
   	   		var valor = document.formEnquete.voto[i].value;
   		}
	}
	return valor;
}


/**
 *
 * @access public
 * @return void
 **/
function mudaFotoDestaque(idf){
	$('#fotoDestaque').fadeOut('fast', function(){

		$E('fotoDestaque').src = 'image.php?img=' + destaquesFoto[idf] + '&thumb=1&w=356&h=281&razao=1';


		$('#destaquePrincipal').fadeOut('fast', function(){
			 $('#destaquePrincipal').html(destaquesTitulo[idf]);
			 $('#destaquePrincipal').fadeIn('fast');
		});

		$('#dizeresDestaques').fadeOut('fast', function(){
			 $('#dizeresDestaques').html(destaquesDesc[idf]);
			 $('#dizeresDestaques').fadeIn('fast');
		});


		$E('linkDestaque').href = destaquesLink[idf];

		$('#fotoDestaque').fadeIn('fast');
	});
}

function formata(src, mask)
//funcao para formatar qualquer campo.Ex.:cep,cpf,telefone,cnpj.
{
var i = src.value.length;
var saida = '#';
var texto = mask.substring(i)
if (texto.substring(0,1) != saida)
{
src.value += texto.substring(0,1);
}
}








function abrir(pagina, w, h){

random_num = (Math.round((Math.random()*9)+1));
        newWindow=window.open(pagina,random_num,"width=" + w + ",height=" + h)
        if(newWindow)return false
    }
