<!--
function trocar_foto(pro_mini,caminho,largura,altura){
	document.getElementById("pro_mini").innerHTML = "<img src='img/produtos/" + pro_mini + "'>";
	document.getElementById("pro_full").href = "javascript: ver_foto('"+caminho+"','"+largura+"','"+altura+"');";
}

function ver_foto(caminho,largura,altura){
	foto = window.open(caminho,'foto','height='+altura+',width='+largura+',status=yes,resizable=yes,scrollbars=no,menubar=yes,top=0,left=0');
	foto.focus();
	largura = parseFloat(largura) + 12;
	altura = parseFloat(altura) + 96;
	foto.resizeTo(largura,altura);
}

function abrir_pop(caminho,largura,altura,scrolls){
	abrir = window.open(caminho,'abrir','height='+altura+',width='+largura+',status=yes,resizable=yes,scrollbars='+scrolls+',menubar=no,top=0,left=0');
	abrir.focus();
}

function valida_mem_login(){
	with(document.mem_login){
		cor_erro = '#FFE6E7';
		cor_alert = '#FEFFE6';
		cor_original = '#FFFFFF';
		
		if(mem_email.value == ''){
			mem_email.style.background = cor_erro;
			email = 'erro';
		} else {
			mem_email.style.background = cor_original;
			email = '';
		}
		
		if(mem_senha.value == ''){
			mem_senha.style.background = cor_erro;
			senha = 'erro';
		} else {
			mem_senha.style.background = cor_original;
			senha = '';
		}
		
		if(email == 'erro' || senha == 'erro'){
			alert("Os campos em vermelho são de preenchimento obrigatório!");
			return false
		}
	}
}

function valida_buscar_produto(){
	with(document.buscar_produto){
		cor_erro = '#FFE6E7';
		
		if(campo_busca.value == ''){
			campo_busca.style.background = cor_erro;
			alert("Para efetuar a busca é necessário preencher o campo!");
			return false
		}
	}
}

function avancaCampo(origem,destino){
	if(document.getElementById(origem).value.length == document.getElementById(origem).getAttribute("maxlength")) {
		document.getElementById(destino).focus();
	}
}
-->
