function enter(funcao){
	if(event.keyCode==13)
		eval(funcao+"()")
}

function login(){
	if(document.getElementById('txtEmail').value == ''){
		alert("O Campo Email deve ser Prenchido!");
		document.getElementById('txtEmail').focus();
		return false;
	}
	if(document.getElementById('txtSenha').value == ''){
		alert("O Campo Senha deve ser Prenchido!");
		document.getElementById('txtSenha').focus();
		return false;
	}

	if(validaEmail(document.getElementById('txtEmail')))
		validaLogin();
}

function cadastro(){
	open("cadastro.html", "_top")
}

function validaCadastro(){
	if(document.frmCadastro.txtRazao.value == ""){
		alert("A Razão Social deve ser Prenchida!");
		document.frmCadastro.txtRazao.focus();
		return false;
	}
	if(document.frmCadastro.txtContato.value == ""){
		alert("O Nome para Contato deve ser Prenchido!");
		document.frmCadastro.txtContato.focus();
		return false;
	}
	if(document.frmCadastro.txtCnpj.value == ""){
		alert("O CNPJ da Empresa  deve ser Prenchido!");
		document.frmCadastro.txtCnpj.focus();
		return false;
	}
	if(document.frmCadastro.txtEmail.value == ""){
		alert("O Email para Contato deve ser Prenchido!");
		document.frmCadastro.txtEmail.focus();
		return false;
	}
	if(document.frmCadastro.txtSenha.value == ""){
		alert("A Senha deve ser Prenchida!");
		document.frmCadastro.txtSenha.focus();
		return false;
	}
	if(document.frmCadastro.txtSenhaRepetida.value == ""){
		alert("A Confirmação da Senha deve ser Prenchida!");
		document.frmCadastro.txtSenhaRepetida.focus();
		return false;
	}
	if(document.frmCadastro.txtSenha.value != document.frmCadastro.txtSenhaRepetida.value){
		alert("Aa Senhas Digitadas Não conferem!");
		document.frmCadastro.txtSenhaRepetida.focus();
		return false;
	}

	if(document.frmCadastro.txtEndereco.value == ""){
		alert("O Endereço da Empresa deve ser Prenchido!");
		document.frmCadastro.txtEndereco.focus();
		return false;
	}
	if(document.frmCadastro.txtNumero.value == ""){
		alert("O Número do Endereço da Empresa deve ser Prenchido!");
		document.frmCadastro.txtNumero.focus();
		return false;
	}
	if(document.frmCadastro.txtBairro.value == ""){
		alert("O Bairro do Endereço da Empresa deve ser Prenchido!");
		document.frmCadastro.txtBairro.focus();
		return false;
	}
	if(document.frmCadastro.txtCidade.value == ""){
		alert("A Cidade do Endereço da Empresa deve ser Prenchido!");
		document.frmCadastro.txtCidade.focus();
		return false;
	}
	if(document.frmCadastro.slcUF1.value == ""){
		alert("A UF do Endereço da Empresa deve ser Prenchido!");
		document.frmCadastro.slcUF.focus();
		return false;
	}
	if(document.frmCadastro.txtCep.value == ""){
		alert("O Cep do Endereço da Empresa deve ser Prenchido!");
		document.frmCadastro.txtCep.focus();
		return false;
	}
	if(document.frmCadastro.txtDDDFone.value == ""){
		alert("O DDD do Telefone da Empresa deve ser Prenchido!");
		document.frmCadastro.txtDDDFone.focus();
		return false;
	}
	if(document.frmCadastro.txtFone.value == ""){
		alert("O Telefone da Empresa deve ser Prenchido!");
		document.frmCadastro.txtFone.focus();
		return false;
	}

	if(document.frmCadastro.txtEndereco2.value == ""){
		alert("O Endereço de Entrega deve ser Prenchido!");
		document.frmCadastro.txtEndereco2.focus();
		return false;
	}
	if(document.frmCadastro.txtNumero2.value == ""){
		alert("O Número do Endereço de Entrega deve ser Prenchido!");
		document.frmCadastro.txtNumero2.focus();
		return false;
	}
	if(document.frmCadastro.txtBairro2.value == ""){
		alert("O Bairro do Endereço de Entrega deve ser Prenchido!");
		document.frmCadastro.txtBairro2.focus();
		return false;
	}
	if(document.frmCadastro.txtCidade2.value == ""){
		alert("A Cidade do Endereço de Entrega deve ser Prenchido!");
		document.frmCadastro.txtCidade2.focus();
		return false;
	}
	if(document.frmCadastro.slcUF2.value == ""){
		alert("A UF do Endereço de Entrega deve ser Prenchido!");
		document.frmCadastro.slcUF2.focus();
		return false;
	}
	if(document.frmCadastro.txtCep2.value == ""){
		alert("O Cep do Endereço de Entrega deve ser Prenchido!");
		document.frmCadastro.txtCep2.focus();
		return false;
	}
	if(document.frmCadastro.txtDDDFone2.value == ""){
		alert("O DDD do Telefone de Entrega deve ser Prenchido!");
		document.frmCadastro.txtDDDFone2.focus();
		return false;
	}
	if(document.frmCadastro.txtFone2.value == ""){
		alert("O Telefone de Entrega deve ser Prenchido!");
		document.frmCadastro.txtFone2.focus();
		return false;
	}
	document.frmCadastro.action = "functions/atualizaCadastro.asp";
	document.frmCadastro.method = "post";
	document.frmCadastro.submit();
}


function preencheEndereco(tipo){
	if(tipo==1){
		document.frmCadastro.txtEndereco2.value		= document.frmCadastro.txtEndereco.value;
		document.frmCadastro.txtNumero2.value 		= document.frmCadastro.txtNumero.value;
		document.frmCadastro.txtBairro2.value		= document.frmCadastro.txtBairro.value;
		document.frmCadastro.txtComplemento2.value	= document.frmCadastro.txtComplemento.value;
		document.frmCadastro.txtCidade2.value		= document.frmCadastro.txtCidade.value;
		document.frmCadastro.slcUF2.value		= document.frmCadastro.slcUF1.value;
		document.frmCadastro.txtCep2.value		= document.frmCadastro.txtCep.value;
		document.frmCadastro.txtDDDFone2.value		= document.frmCadastro.txtDDDFone.value;
		document.frmCadastro.txtFone2.value		= document.frmCadastro.txtFone.value;
		document.frmCadastro.txtDDDCel2.value		= document.frmCadastro.txtDDDCel.value;
		document.frmCadastro.txtCelular2.value		= document.frmCadastro.txtCelular.value;
	}else{
		document.frmCadastro.txtEndereco2.value		= "";
		document.frmCadastro.txtNumero2.value 		= "";
		document.frmCadastro.txtComplemento2.value	="";
		document.frmCadastro.txtBairro2.value		= "";
		document.frmCadastro.txtCidade2.value		= "";
		document.frmCadastro.slcUF2.value		= "AC";
		document.frmCadastro.txtCep2.value		= "";
		document.frmCadastro.txtDDDFone2.value		= "";
		document.frmCadastro.txtFone2.value		= "";
		document.frmCadastro.txtDDDCel2.value		= "";
		document.frmCadastro.txtCelular2.value		= "";
	}
}

function detalhes(tipo){
	if(tipo==1){
		document.getElementById('tdDadosTecnicos').style.display = "none"
		document.getElementById('tdDescricao').style.display = "block"
	}else{
		document.getElementById('tdDadosTecnicos').style.display = "block"
		document.getElementById('tdDescricao').style.display = "none"
	}
}

function validaTotal(id){
	quantidadeTotal = 0;
	valorTotal	= 0;

	for(i=1;i<=document.getElementById('txtTotal').value;i++){
		quantidade 	= document.getElementById('txtQuantidade'+i).value;
		if(quantidade!=''&&quantidade!=0){
			valor	= eval(document.getElementById('txtValor'+i).value);
			document.getElementById('tdValorTotal'+i).innerHTML = "R$ "+mascaraMoeda(valor * quantidade)+"&nbsp;&nbsp;";
		}else
			document.getElementById('tdValorTotal'+i).innerHTML = "R$ 0,00"+"&nbsp;&nbsp;";

		valor		= eval(document.getElementById('txtValor'+i).value);
		if(quantidade == '') quantidade = 0;
		quantidadeTotal = eval(quantidadeTotal) + eval(quantidade);
		valorProduto	= eval(valor * quantidade)

		valorTotal 	= eval(valorTotal)+eval(valorProduto)
	}
	document.getElementById('tdQuantidadeTotal').innerHTML = quantidadeTotal;
	document.getElementById('tdValorTotal').innerHTML = "R$ "+mascaraMoeda(valorTotal)+"&nbsp;&nbsp;";
}


function adicionaProdutoCarinho(){
	produtoCarrinho = "";
	for(i=1;i<=document.getElementById('txtTotal').value;i++){
		quantidade = document.getElementById('txtQuantidade'+i).value;
		produtoID  = document.getElementById('tdProduto'+i).value
		if(quantidade=="")quantidade=0;
		produtoCarrinho = produtoCarrinho + produtoID+";"+quantidade+"|";
	}
	atualizaCarrinho(produtoCarrinho,document.getElementById('txtTotal').value);
	alert("Produto Adicionado ao Carrinho!")
}


function mostraImagem(imagemMedia,imagemGrande, titulo){
	document.getElementById('tdImgCentro').innerHTML = "<img src=\""+imagemMedia+"\" border=\"0\" title=\"Visualizar em Tamanho Maior\">";
	document.getElementById('linkPrincipal').href  = imagemGrande
	document.getElementById('linkPrincipal').setAttribute("title",titulo);
}

function verificaCarrinhoProdutoAtualiza(){
	quantidadeTotal = 0;
	valorTotal	= 0;
	for(i=1;i<=parent.document.getElementById('txtTotal').value;i++){
		quantidade 	= parent.document.getElementById('txtQuantidade'+i).value;

		if(quantidade!=''&&quantidade!=0){
			valor	= eval(parent.document.getElementById('txtValor'+i).value);
			parent.document.getElementById('tdValorTotal'+i).innerHTML = "R$ "+mascaraMoeda(valor * quantidade)+"&nbsp;&nbsp;";
		}else
			parent.document.getElementById('tdValorTotal'+i).innerHTML = "R$ 0,00"+"&nbsp;&nbsp;";

		valor		= eval(parent.document.getElementById('txtValor'+1).value);
		if(quantidade == '') quantidade = 0;
		quantidadeTotal = eval(quantidadeTotal) + eval(quantidade);
		valorProduto	= eval(valor * quantidade)
		valorTotal 	= eval(valorTotal)+eval(valorProduto)
	}
	parent.document.getElementById('tdQuantidadeTotal').innerHTML = quantidadeTotal;
	parent.document.getElementById('tdValorTotal').innerHTML = "R$ "+mascaraMoeda(valorTotal)+"&nbsp;&nbsp;";
}

function buscaproduto(){
	if(document.getElementById('txtBusca').value==''){
		alert("O Campo para Busca deve ser Preenchido!!")
		document.getElementById('txtBusca').focus()
		return false;
	}

	this.location = 'loja.html?'+document.getElementById('txtBusca').value+","+document.getElementById('slcCategoria').value;
}

/*******************************************************************/
/*********************                       ***********************/
/********************* Funções de Preload    ***********************/
/*********************                       ***********************/
/*******************************************************************/

function inicialLoja(strProduto){
	verificaLogin();
	menuProdutos();
	bannerLoja();
	buscaProdutoLoja();
	if(strProduto=='c'){
		visualizaCarrinhoIndex(1);
	}else if (strProduto=='p'){
		visualizaPedidoIndex(1);
	}else{
		buscaProdutoLoja();
		localizaProduto(strProduto);
	}
}

function inicialMostraProduto(){
	verificaLogin();
	menuProdutos();
	bannerLoja();
	buscaProdutoLoja();
}



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



/*******************************************************************/
/*********************                       ***********************/
/********************* Funções de Controle   ***********************/
/*********************                       ***********************/
/*******************************************************************/

function mascaraVal(formato, keypress, objeto){
	campo = eval (objeto);
	if((event.keyCode >= 48)&&(event.keyCode <= 57)){
		event.returnValue = true;
	}else{
	  event.returnValue = false;
	}
}
	
function mascaraCampo(formato, keypress, objeto){
    campo = eval (objeto);
	if(((event.keyCode >= 65)&&(event.keyCode <= 90))
	 ||((event.keyCode >= 97)&&(event.keyCode <= 122))
	 ||((event.keyCode >= 192)&&(event.keyCode <= 255))
	 ||((event.keyCode == 127)||(event.keyCode == 64))
	 ||((event.keyCode == 32)||(event.keyCode == 45))
	 ||((event.keyCode == 44)||(event.keyCode == 46))
	 ||((event.keyCode == 47)||(event.keyCode == 58))
	 ||((event.keyCode <= 57)&&(event.keyCode >= 48))
	 ||((event.keyCode >= 44)&&(event.keyCode <= 47))
	 ||((event.keyCode == 13))||((event.keyCode == 38))||((event.keyCode == 95))){
	 		event.returnValue = true;
	 	}else{
	 		event.returnValue = false;}
}

function acertadata(entrada){
  var meses, dias, anos;
  valor = entrada.value;

   if((valor.length==2)||(valor.length==5)){
	    entrada.value = valor + "/";
	    if(valida_data(valor,valor.length)==false){
	       alert('Data inválida');
	       entrada.value = "";
	       return false;
	    }
    }
    if(valor.length==10)
       if(valida_data(valor,valor.length)==false){
           alert('Data inválida');
		   entrada.value = "";
	       return false;
	   }else{
	      idade=(parseInt(anos)-parseInt(valor.substring(6,14)));
	      if((parseInt(6)-parseInt(valor.substring(3,5)))<1)
	         idade = parseInt(idade) - 1;
	      dia=(parseInt(6)-parseInt(valor.substring(0,2)));
	      mes=parseInt(6)-parseInt(valor.substring(3,5));
              mes_dig= parseInt(valor.substring(3,5))
          if((parseInt(6)-parseInt(valor.substring(3,5)))==0)
	       		if(dia > 0)
	       	   idade = parseInt(idade) + 1;
	   }
	   return true;
}

function valida_data(entrada, posicao){
	if(posicao ==2){
	  if(parseInt(entrada.charAt(0))+parseInt(entrada.charAt(1)) < 1)
	    return(false);
      if(parseInt(entrada)>31)
	      return(false);
	}
  if(posicao == 5){
	  if(parseInt(entrada.charAt(4))+parseInt(entrada.charAt(3)) < 1)
	    return(false);
    if(parseInt(entrada.charAt(3)+entrada.charAt(4)) > 12)
      return(false);
    if(parseInt(entrada.charAt(3))+parseInt(entrada.charAt(4))%2==0)
      if((parseInt(entrada.charAt(0))+parseInt(entrada.charAt(1))>30)&&(parseInt(entrada.charAt(3))+parseInt(entrada.charAt(4))!=12))
      	return(false);
      if((parseInt(entrada.charAt(3))+parseInt(entrada.charAt(4))==2))
         if((parseInt(entrada.charAt(0))+parseInt(entrada.charAt(1))>29))
            return(false);
   }
   if(posicao == 10){
      if((parseInt(entrada.charAt(8))+parseInt(entrada.charAt(9)))<0)
        return false;
      if(((parseInt(entrada.charAt(3))==0)&(parseInt(entrada.charAt(4))==2)))
         if(entrada.charAt(0)+entrada.charAt(1)>28)
	        if((parseInt(entrada.charAt(9)+entrada.charAt(9))%4)!=0)
          	return(false);
   }
}

function tamanhoData(campo){
	valor = campo.value;
	if((valor.length<10)&&(valor!="")){
		alert('Data inválida');
		campo.value = "";
		campo.focus();
	}
}

function formataCPF(campo){
	valor = campo.value;
	tamanho = valor.length;

	if(tamanho==3&&event.keyCode!=8)
		campo.value = valor + '.';
	if(tamanho==4&&event.keyCode!=8)
		campo.value = valor.substring(0,3)+'.'+valor.substring(3,5);
	if(tamanho==7&&event.keyCode!=8)
		campo.value = valor.substring(0,3)+'.'+valor.substring(4,7)+'.';
	if(tamanho==8&&event.keyCode!=8)
		campo.value = valor.substring(0,3)+'.'+valor.substring(4,7)+'.'+valor.substring(7,9);
	if(tamanho==11&&event.keyCode!=8)
		campo.value = valor.substring(0,3)+'.'+valor.substring(4,7)+'.'+valor.substring(8,11)+'-';
	if(tamanho==12&&event.keyCode!=8)
		campo.value = valor.substring(0,3)+'.'+valor.substring(4,7)+'.'+valor.substring(8,11)+'-'+valor.substring(11,13);
}

function valida_cpf(entrada,campo){
	if(entrada!=""){
		entrada = valor.substring(0,3)+valor.substring(4,7)+valor.substring(8,11)+valor.substring(12,14);
		soma = 0;
		for (i=0; i < 9; i ++)
			soma += parseInt(entrada.charAt(i)) * (10 - i);
		resto = 11 - (soma % 11);
		if (resto == 10 || resto == 11)
			resto = 0;
		if (resto != parseInt(entrada.charAt(9))){
			alert("Cpf Inválido");
			campo.value='';
			campo.focus();
			return false;
		}
		soma = 0;
		for (i = 0; i < 10; i ++)
			soma += parseInt(entrada.charAt(i)) * (11 - i);
		resto = 11 - (soma % 11);
		if (resto == 10 || resto == 11)
			resto = 0;
		if (resto != parseInt(entrada.charAt(10))){
			alert("Cpf Inválido");
			campo.value='';
			campo.focus();
			return false;
		}
		return true;
	}
}

function validaCNPJ(cgc,campo){
	if(cgc=='')
		return false;
		
	if(cgc == "00000000000000"){
		alert('CNPJ Inválido.');
		campo.value='';
		campo.focus();
		return false;
  	}

	CGC1 = cgc.substring(0,12);
	CGC2 = cgc.substring(12,14);
	controle = "";
	ContIni = 1;
	ContFim = 12;
	K = 0;
	for (j=1;j<=2;j++){
		Soma= 0;
		for (i = ContIni; i <=ContFim; i++){
			Mult = (ContFim + 1 + j - i);
			if(Mult>9) Mult=Mult - 8;
			Soma = Soma + (parseInt(CGC1.substring(i - j, i-K)) * Mult);
		}
		if (j == 2) 
			Soma = Soma + (2 * Digito);
		Digito = (Soma * 10) % 11;
		if (Digito == 10) 
			Digito = 0;
		controle = controle + Digito;
		ContIni = 2;
		K=1;
		ContFim = 13;
	}
	if (controle == CGC2){
		validaCadastroDuplo(cgc)
	  	return true;
	}else{
	  alert('CNPJ Inválido.');
	  campo.value=''
	  campo.focus();
	  return false;
	}
}

function formataValor(campo){ 
  valor = campo.value;
  tamanho =valor.length;
  decimal = tamanho - 2;

  antes= valor.indexOf(",");
  depois = antes+1  
   
  inteiro = valor.substring(0,antes)+valor.substring(tamanho,depois);
  tamanho = inteiro.length;
  
  if(tamanho>=3)
  {
   campo.value = inteiro.substring(0,tamanho-2)+','+inteiro.substring(tamanho-2,tamanho);
  }  

  if(tamanho<3)
  {
   campo.value = inteiro.substring(0,tamanho-2)+inteiro.substring(tamanho-2,tamanho);
  }  

}
	
function acertaDataMes(campo1){
	valor = campo1.value;
 	if(valor.length==2)
  campo1.value = valor.substring(0,2) + "/";
}

function Preenche(campo1,campo2){
  if (campo1.value != '')
    campo2.value = campo1.value;
}

function validaFone(campo){
  valor = campo.value
  prefixo= valor.indexOf("-");
  
  if(valor!= ''){
    if(valor.indexOf("-") < 3){
      alert('Numero de telefone inválido');
      campo.focus;
      campo.value='';
      return false;
    }
  
    if(valor.length < 8){
      alert('Numero de telefone inválido');
      campo.focus;
      campo.value='';
      return false;
    }
  }
}

function validaEmail(email){
  valor = email.value
  Arroba= valor.indexOf("@");
  Ponto= valor.lastIndexOf(".");
  espaco= valor.indexOf(" ");
  if (valor == ''){
    return false;
  }
  if((Arroba != -1) &&(Ponto > Arroba +1) &&(espaco==-1)){
		return true;
  }else{
		alert("E-mail inválido!");
		email.value = "";
		email.focus();
		return false;
	}
}

function validaEmailSR(email){
  valor = email.value
  Arroba= valor.indexOf("@");
  Ponto= valor.lastIndexOf(".");
  espaco= valor.indexOf(" ");
  if (valor == ''){
    return false;
  }
  if((Arroba != -1) &&(Ponto > Arroba +1) &&(espaco==-1)){
		return true;
  }else{
		alert("E-mail inválido!");
		email.value = "";
		return false;
	}
}

function MovePagina(i){
  parent.scroll(1,i)
}


function validaHora(campo){
	valor = campo.value;
	tamanho =valor.length;
	if(valor=='')
	  return false;
	if(valor.length==2){
	  campo.value = valor.substring(0,2) + ":";
  }
  if(tamanho==5){
    hora = valor.substring(0,2);
    min = valor.substring(3,5);
    if(hora>24||hora<=0){
      alert("Horario Inválido.");
      campo.focus();
      campo.value = '';
      return false;
    }
    if(min>59){
      alert("Horario Inválido.");
      campo.focus();
      campo.value = '';
      return false;
    }
  }
}

function formataCEP(campo){
	valor = campo.value;
	tamanho = valor.length;

	if(tamanho==5&&event.keyCode!=8)
		campo.value = valor + '-';
	if(tamanho==6&&event.keyCode!=8)
		campo.value = valor.substring(0,5)+'-'+valor.substring(5,7);
}

function formataTelefone(campo){

	valor = campo.value;
	tamanho = valor.length;

	if(tamanho==1&&event.keyCode!=8)
		campo.value = '(' + valor;
	if(tamanho==3&&event.keyCode!=8)
		campo.value = '('+valor.substring(1,3)+') ';
	if(tamanho==4&&event.keyCode!=8)
		campo.value = '('+valor.substring(1,3)+') '+valor.substring(3,4);
	if(tamanho==5&&event.keyCode!=8)
		campo.value = '('+valor.substring(1,3)+') '+valor.substring(4,5);
	if(tamanho==9&&event.keyCode!=8)
		campo.value = '('+valor.substring(1,3)+') '+valor.substring(5,9)+'-';
	if(tamanho==10&&event.keyCode!=8)
		campo.value = '('+valor.substring(1,3)+') '+valor.substring(5,9)+'-'+valor.substring(9,10);
}


function mascaraMoeda(num) {
   x = 0;
   if(num<0) {
      num = Math.abs(num);
      x = 1;
   }   if(isNaN(num)) num = "0";
      cents = Math.floor((num*100+0.5)%100);

   num = Math.floor((num*100+0.5)/100).toString();

   if(cents < 10) cents = "0" + cents;
      for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
         num = num.substring(0,num.length-(4*i+3))+'.'
               +num.substring(num.length-(4*i+3));   ret = num + ',' + cents;   if (x == 1) ret = ' - ' + ret;return ret;

}

function mostraMapaIndex(){
	texto = "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td width='38'>&nbsp;</td><td>";
	texto = texto + "<iframe width = '765' height= '443' frameborder = '0' scrolling= 'no' marginheight= '0' marginwidth= '0' src='http://maps.google.com.br/maps?f=q&amp;source=s_q&amp;hl=pt-BR&amp;geocode=&amp;q=julio+parigot,+1000&amp;sll=-15.623037,-50.449219&amp;sspn=106.807051,269.824219&amp;ie=UTF8&amp;hq=&amp;hnear=R.+J%C3%BAlio+Parigot,+1000+-+Aricanduva,+S%C3%A3o+Paulo,+03478-007&amp;ll=-23.565246,-46.50547&amp;spn=0.007611,0.009602&amp;z=14&amp;output=embed'></iframe>";
	texto = texto + "</td></tr></table>";

	document.getElementById('tdCentro').innerHTML = texto;
}

function mostraMapaContato(){
	texto = "<table width='100%' border='0' Style='margin-top:15px' cellpadding='0' cellspacing='0'><tr><td width='38'>&nbsp;</td><td>";
	texto = texto + "<iframe width = '950' height= '475' frameborder = '0' scrolling= 'no' marginheight= '0' marginwidth= '0' src='http://maps.google.com.br/maps?f=q&amp;source=s_q&amp;hl=pt-BR&amp;geocode=&amp;q=julio+parigot,+1000&amp;sll=-15.623037,-50.449219&amp;sspn=106.807051,269.824219&amp;ie=UTF8&amp;hq=&amp;hnear=R.+J%C3%BAlio+Parigot,+1000+-+Aricanduva,+S%C3%A3o+Paulo,+03478-007&amp;ll=-23.565246,-46.50547&amp;spn=0.007611,0.009602&amp;z=14&amp;output=embed'></iframe>";
	texto = texto + "</td></tr></table>";

	document.getElementById('tdCentro').innerHTML = texto;
}

function mostraMapaEmpresa(){
	texto = "<table width='100%' border='0' Style='margin-top:15px' cellpadding='0' cellspacing='0'><tr><td width='38'>&nbsp;</td><td>";
	texto = texto + "<iframe width = '950' height= '475' frameborder = '0' scrolling= 'no' marginheight= '0' marginwidth= '0' src='http://maps.google.com.br/maps?f=q&amp;source=s_q&amp;hl=pt-BR&amp;geocode=&amp;q=julio+parigot,+1000&amp;sll=-15.623037,-50.449219&amp;sspn=106.807051,269.824219&amp;ie=UTF8&amp;hq=&amp;hnear=R.+J%C3%BAlio+Parigot,+1000+-+Aricanduva,+S%C3%A3o+Paulo,+03478-007&amp;ll=-23.565246,-46.50547&amp;spn=0.007611,0.009602&amp;z=14&amp;output=embed'></iframe>";
	texto = texto + "</td></tr></table>";

	document.getElementById('tdMapa').innerHTML = texto;
}

