<!--
function trocar_foto(ssl,pro_mini,pro_id,fot_id,largura,altura){
	document.getElementById("pro_mini").innerHTML = "<a href=\"javascript: xWindowFoto('1','"+ssl+"iframe_produto_fotos.php?pro_id="+pro_id+"&fot_id="+fot_id+"','"+largura+"','"+altura+"');\"><img src='img/produtos/" + pro_mini + "' border=\"0\"></a>";
	document.getElementById("pro_full").href = "javascript: xWindowFoto('1','"+ssl+"iframe_produto_fotos.php?pro_id="+pro_id+"&fot_id="+fot_id+"','"+largura+"','"+altura+"');";
}

function ver_foto(caminho,largura,altura){
	alert("Função Desativada");
	/*
	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 xWindowFoto(status,pagina,largura,altura){
	if(status){
		var browser=navigator.appName;
		if(browser == "Microsoft Internet Explorer"){
			scrollTop = document.documentElement.scrollTop;
		} else { 
			scrollTop = window.pageYOffset;
		}
		
		// Jogar onScroll
		window.onscroll = function(){
			if(browser == "Microsoft Internet Explorer"){
				scrollTop = document.documentElement.scrollTop;
			} else { 
				scrollTop = window.pageYOffset;
			}
			
			document.getElementById('estCarregandoConteudo').style.marginTop = (scrollTop-(parseInt(altura)/2))+"px";
			document.getElementById('estCarregandoBg').style.top = scrollTop+"px";
		}
		
		document.getElementById('estCarregandoBg').style.display = 'block';
		document.getElementById('estCarregandoConteudo').style.display = 'block';
		document.getElementById('estCarregandoConteudo').style.width = largura+'px';
		document.getElementById('estCarregandoConteudo').style.height = altura+'px';
	 
		document.getElementById('estCarregandoConteudo').style.marginTop = (scrollTop-(parseInt(altura)/2))+"px";
		document.getElementById('estCarregandoConteudo').style.marginLeft = "-"+(parseInt(largura)/2)+"px";
		document.getElementById('estCarregandoBg').style.top = scrollTop+"px";
		
		document.getElementById('xWindowIframe').src = pagina;
		document.getElementById('xWindowIframe').width = largura;
		document.getElementById('xWindowIframe').height = altura;
	} else {
		document.getElementById('estCarregandoBg').style.display='none';
		document.getElementById('estCarregandoConteudo').style.display='none';
	}
}

function xWindowFotoResize(largura,altura){
	var browser=navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		scrollTop = document.documentElement.scrollTop;
	} else { 
		scrollTop = window.pageYOffset;
	}
	
	// Jogar onScroll
	window.onscroll = function(){
		if(browser == "Microsoft Internet Explorer"){
			scrollTop = document.documentElement.scrollTop;
		} else { 
			scrollTop = window.pageYOffset;
		}
		
		document.getElementById('estCarregandoConteudo').style.marginTop = (scrollTop-(parseInt(altura)/2))+"px";
		document.getElementById('estCarregandoBg').style.top = scrollTop+"px";
	}
	
	document.getElementById('estCarregandoConteudo').style.width = largura+'px';
	document.getElementById('estCarregandoConteudo').style.height = altura+'px';
 
	document.getElementById('estCarregandoConteudo').style.marginTop = (scrollTop-(parseInt(altura)/2))+"px";
	document.getElementById('estCarregandoConteudo').style.marginLeft = "-"+(parseInt(largura)/2)+"px";
	document.getElementById('estCarregandoBg').style.top = scrollTop+"px";
	
	document.getElementById('xWindowIframe').width = largura;
	document.getElementById('xWindowIframe').height = 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();
	}
}

function valida_mem_esqueceu_senha(){
	with(document.mem_esqueceu_senha){
		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(email == 'erro'){
			alert("Os campos em vermelho são de preenchimento obrigatório!");
			return false
		}
	}
}

// JavaScript Document
function openAjax() {
	var ajax;
	try {
		ajax = new XMLHttpRequest();
	} catch(ee) {
		try {
			ajax = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				ajax = new ActiveXObject("Microsoft.XMLHTTP");
				alert("asa");
			} catch(E) {
				ajax = false;
				
			}
		}
	}
	return ajax;
}

function gE(ID) {
	return document.getElementById(ID);
}

function gEs(tag) {
	return document.getElementsByTagName(tag);
}

function cPost(dados){
	dados = dados.replace(/[&]/g,'%26');
	dados = escape(dados);
	return dados;
}
-->