<!--
	function formatar_moeda(campo, separador_milhar, separador_decimal, tecla) {
		var sep = 0;
		var key = '';
		var i = j = 0;
		var len = len2 = 0;
		var strCheck = '0123456789';
		var aux = aux2 = '';
		var whichCode = (window.Event) ? tecla.which : tecla.keyCode;
	
		if (whichCode == 13) return true; // Tecla Enter
		if (whichCode == 8) return true; // Tecla Delete
		key = String.fromCharCode(whichCode); // Pegando o valor digitado
		if (strCheck.indexOf(key) == -1) return false; // Valor inválido (não inteiro)
		len = campo.value.length;
		for(i = 0; i < len; i++)
		if ((campo.value.charAt(i) != '0') && (campo.value.charAt(i) != separador_decimal)) break;
		aux = '';
		for(; i < len; i++)
		if (strCheck.indexOf(campo.value.charAt(i))!=-1) aux += campo.value.charAt(i);
		aux += key;
		len = aux.length;
		if (len == 0) campo.value = '';
		if (len == 1) campo.value = '0'+ separador_decimal + '0' + aux;
		if (len == 2) campo.value = '0'+ separador_decimal + aux;
	
		if (len > 2) {
			aux2 = '';
	
			for (j = 0, i = len - 3; i >= 0; i--) {
				if (j == 3) {
					aux2 += separador_milhar;
					j = 0;
				}
				aux2 += aux.charAt(i);
				j++;
			}
	
			campo.value = '';
			len2 = aux2.length;
			for (i = len2 - 1; i >= 0; i--)
			campo.value += aux2.charAt(i);
			campo.value += separador_decimal + aux.substr(len - 2, len);
		}
		return false;
	}

	function numeros(e,src){
		if(window.event) { _TXT = e.keyCode; } 
			else if(e.which) { _TXT = e.which; }
			if(_TXT > 47 && _TXT < 58) { 
				return true;
			} else {
				if (_TXT != 8) { return false; } 
				else { return true; }
		}
	}

	function ajaxInit(){
		var xmlhttp;
		try{ xmlhttp = new XMLHttpRequest(); }
		catch(ee) {
			try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
			catch(e) {
				try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
				catch(E){ xmlhttp = false ;	}
			}
		}
		return xmlhttp;
	}
	
	function carregar(formulario, local){
		ajax = ajaxInit();
		if(ajax){
			ajax.open('POST', 'ajax.php', true);
			ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			ajax.onreadystatechange = function(){
				if(ajax.readyState == 4){
					document.getElementById(local).innerHTML = 'carregando ...';
					if(ajax.status == 200){
						document.getElementById(local).innerHTML = ajax.responseText;
					}
				}
			}
			var params = capturaDados(formulario);
			ajax.send(params);
			document.getElementById(local).innerHTML = '';
			document.getElementById(local).innerHTML = 'carregando ...';
		}
	}

	function capturaDados(formulario){
		var arrayFormulario = document.getElementsByTagName('form');
		var campos = '';
		var navegador = navigator.appName;
		if(navegador == 'Netscape'){
			inicioArray = arrayFormulario[formulario].length;
			i=1;
			for(chaves in arrayFormulario[formulario]){
				if(i <= inicioArray ){
					if(campos!=''){ campos = campos + '&' }
					campos = campos + arrayFormulario[formulario][chaves].name + '=' + arrayFormulario[formulario][chaves].value;
				}i++;
			}
		} else {
			nCampos = arrayFormulario[formulario].length;
			totalArray=1;
			for(chaves in arrayFormulario[formulario]){ totalArray++; }
			inicioArray = totalArray-nCampos;
			i=1;
			for(chaves in arrayFormulario[formulario]){ 
				if(i >= inicioArray ){
					if(campos!=''){ campos = campos + '&' }
					campos = campos + chaves + '=' + arrayFormulario[formulario][chaves].value;
				}i++;
			}
		}
		return campos;
	}

	function formatacaoCampos(e,src,mask){
		if(window.event) { _TXT = e.keyCode; } 
		else if(e.which) { _TXT = e.which; }
		if(_TXT > 47 && _TXT < 58) { 
			var i = src.value.length; var saida = mask.substring(0,1); var texto = mask.substring(i)
			if (texto.substring(0,1) != saida) {
				src.value += texto.substring(0,1);
			} 
			return true;
			} else {
				if (_TXT != 8) { return false; } 
				else { return true; }
		}
	}

	function validacaoContato(){
		var d = document.formContato;
		var frase = " é de preenchimento obrigatório!";
		if(d.nome.value == ''){ alert('O campo "Nome"' + frase); d.nome.focus(); return false; }
		if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(d.email.value))){ alert('Dados inválidos no campo "E-mail"! Favor verificar'); d.email.focus(); return false; }
		if(d.id_marca.value == ''){ alert('O campo "Marca"' + frase); d.id_marca.focus(); return false; }
		if(d.id_modelo.value == ''){ alert('O campo "Modelo"' + frase); d.id_modelo.focus(); return false; }
		if(d.mensagem.value == ''){ alert('O campo "Mensagem"' + frase); d.mensagem.focus(); return false; }
		return true;
	}

	function mudaImageLink(botao, tipo){ document.getElementById('bt_'+botao).src = 'images/menu_btn_'+botao+'_'+tipo+'.png'; }

	function mudaImageLinkInterno(botao, tipo, pg){
		switch(pg){
			case 'sac':
				document.getElementById('btn_consumidor').src = 'images/btn_consumidor_off.png';
				document.getElementById('btn_lojista').src = 'images/btn_lojista_off.png';
			break;

			case 'produtos':
				document.getElementById('btn_dermiwil').src = 'images/btn_dermiwil_off.png';
				document.getElementById('btn_dmw').src = 'images/btn_dmw_off.png';
			break;

			case 'imprensa':
				document.getElementById('btn_newsletter').src = 'images/btn_newsletter_off.png';
				document.getElementById('btn_noticias').src = 'images/btn_noticias_off.png';
			break;
		}
		document.getElementById('btn_'+botao).src = 'images/btn_'+botao+'_'+tipo+'.png';
	}

	function validacaoNewsletter(){
		var d = document.formNewsletter;
		var frase = ' deve ser preenchido!';
		if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(d.email.value))){ alert('O campo "E-mail"' + frase); d.email.focus(); return false; }
		carregar('formNewsletter', 'cadastroNews');
		return false;
	}

	function validacaoSac(t){
		var d = document.formSac;
		var frase = " é de preenchimento obrigatório!";
		d.tipo.value = t;
		if(d.nome.value == ''){ alert('O campo "Nome"' + frase); d.nome.focus(); return false; }
		if(d.dddtel.value == ''){ alert('O campo "DDD" do telefone' + frase); d.dddtel.focus(); return false; }
		if(d.tel.value == ''){ alert('O campo "Telefone"' + frase); d.tel.focus(); return false; }
		if(t == 'lojista'){ if(d.cnpj.value == ''){ alert('O campo "CNPJ"' + frase); d.cnpj.focus(); return false; } }
		if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(d.email.value))){ alert('Dados inválidos no campo "E-mail"! Favor verificar'); d.email.focus(); return false; }
		if(d.endereco.value == ''){ alert('O campo "Endereço"' + frase); d.endereco.focus(); return false; }
		if(d.cep.value == ''){ alert('O campo "CEP"' + frase); d.cep.focus(); return false; }
		if(d.cidade.value == ''){ alert('O campo "Cidade"' + frase); d.cidade.focus(); return false; }
		if(d.uf.value == ''){ alert('O campo "UF"' + frase); d.uf.focus(); return false; }
		if(d.assunto.value == ''){ alert('O campo "Assunto"' + frase); d.assunto.focus(); return false; }
		if(d.mensagem.value == ''){ alert('O campo "Mensagem"' + frase); d.mensagem.focus(); return false; }
		return true;
	}

	function mostraMapa(mapa){
		document.getElementById('mDermiwil').style.display = 'none';
		document.getElementById('mDMW').style.display = 'none';
		document.getElementById(mapa).style.display = 'block';		
	}

	function mostraCategoria(idG){
		var tCat = document.getElementById('tCategorias').value;
		for(i=1;i<=tCat;i++){ document.getElementById('categoria'+i).style.display='none'; }
		document.getElementById('categoria'+idG).style.display='block';
	}

	function fechaModal(){
		document.getElementById('bannerDisneyModal').style.display = 'none';
		document.getElementById('modalDisney').style.display = 'none';
	}
-->
