function alterar_foto(caminho,larg,alt){ //altera as fotos na galeria dos produtos
    alert(larg+' - '+alt);
	document.getElementById('fotoAmpliada').src = caminho;
	document.getElementById('fotoAmpliada').width = larg;
	document.getElementById('fotoAmpliada').height = alt;
}

function atendimento(url){
    window.open(url,"Atendimento","width=505,height=515");
}

function abreVideo(){
    window.open("video.php","Vídeo","width=500,height=405");
}

function alteraValue(id,valor){
    if (valor == id.value) id.value = "";
       else if (id.value == '') id.value = valor;
}

function preencheEndereco(endereco,cidade,estado,bairro){
   // alert(dados);
    document.getElementById('endereco').value=endereco;
    document.getElementById('cidade').value=cidade;
    document.getElementById('estado').value=estado;
    document.getElementById('bairro').value=bairro;
    
    document.getElementById('carregando').style.visibility="hidden";
}

function mostraMenu(){
    if (document.getElementById('todosDeptos').style.visibility=='visible'){
        document.getElementById('todosDeptos').style.visibility='hidden';
    } else {
        document.getElementById('todosDeptos').style.visibility='visible';
    }
}

function mostracategorias(id){
	if($("#"+id).css('display') == "none"){
		$("#"+id).show();
		$("#categoriaMenu"+id).removeClass('categoriaMenu').addClass('categoriaMenu2');
	} else {
		$("#"+id).hide();
		$("#categoriaMenu"+id).removeClass('categoriaMenu2').addClass('categoriaMenu');
	}
}


