function submenuOver(id){
	document.getElementById(id).style.display = "block";
}
function submenuOut(id){
	document.getElementById(id).style.display = "none";
}

function limpar_news(id){
	if(id == 'nome_news'){
		val1 = document.getElementById(id).value;
		if(val1 == 'Nome' || val1 == 'Nombre' || val1 == 'Name'){
			document.getElementById(id).value = "";
		}
	}
	else{
		val2 = document.getElementById(id).value;
		if(val2 == 'E-mail'){
			document.getElementById(id).value = "";
		}
	}
	
}

function limpar_busca(){
		val1 = document.formBusca.busca.value;
		if(val1 == 'Que produto está buscando?' || val1 == '¿Qué producto es?' || val1 == 'Products search'){
			document.formBusca.busca.value = "";
		}
}

function limpar_busca2(){
		val1 = document.formBusca2.busca.value;
		if(val1 == 'Que produto está buscando?' || val1 == '¿Qué producto es?' || val1 == 'Products search'){
			document.formBusca2.busca.value = "";
		}
}

function ver_dica(id,total){
	var t = total;
	for(x=1;x<=t;x++){
		document.getElementById('dica_receita_'+x).style.display = 'none';
	}
	document.getElementById(id).style.display = 'block';
}

function foto_legenda(img,legenda){
	document.getElementById('foto_ampliada').src = img+"&w=493&h=493";
	document.getElementById('foto_ampliada').alt = legenda;
	document.getElementById('legenda_ampliada').innerHTML = legenda;
	document.getElementById('link_ampliada').href = img+"&w=800&h=600";
	document.getElementById('link_ampliada').title = legenda;
}

function ver_faq(id,id2,total){
	var t = total;
	for(x=1;x<=t;x++){
		document.getElementById('txtresposta'+x).style.display = 'none';
		document.getElementById('resposta'+x).style.display = 'none';
	}
	document.getElementById(id).style.display = 'block';
	document.getElementById(id2).style.display = 'block';
}

function ver_down(total,id){
	var t = total;
	for(x=1;x<=t;x++){
		document.getElementById('lista_downloads'+x).style.display = 'none';
	}
	document.getElementById(id).style.display = 'block';
}

function ver_manual1(total,id){
	var t = total;
	for(x=1;x<=t;x++){
		document.getElementById('lista_manuais'+x).style.display = 'none';
	}
	document.getElementById(id).style.display = 'block';
}

function ver_manual2(total,id){
	var t = total;
	for(x=1;x<=t;x++){
		document.getElementById('lista_manuais_prods'+x).style.display = 'none';
	}
	document.getElementById(id).style.display = 'block';
}

function ver_manual3(total,id,id2){
	var t = total;
	for(x=1;x<=t;x++){
		document.getElementById('lista_manuais_manual'+x).style.display = 'none';
		document.getElementById('li_prod_man'+x).style.background = 'url(../../images/icon_mais.gif) 10px 5px no-repeat';
	}
	document.getElementById(id).style.display = 'block';
	document.getElementById(id2).style.background = 'url(../../images/icon_menos.gif) 10px 5px no-repeat';

}

function aparecer(div){
	document.getElementById(div).style.display = 'block';
}

function retira_acentos(palavra) {  
    com_acento = 'áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÖÔÚÙÛÜÇ';  
    sem_acento = 'aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC';  
    nova='';  
    for(i=0;i<palavra.length;i++) {  
   		 if (com_acento.search(palavra.substr(i,1))>=0) {  
   		 nova+=sem_acento.substr(com_acento.search(palavra.substr(i,1)),1);  
   		 }  
   		 else {  
   			nova+=palavra.substr(i,1);  
 	     }  
   }  
  return nova;  
}  


