function erro(){
return true;}
window.onerror=erro;


function mudaDiv() {

        var div = document.getElementById("Layerx");
            div.className = "aparece";
        }
		 function mudaDiv1() {

        var div = document.getElementById("Layerx");
            div.className = "some";

var head = document.getElementsByTagName('head').item(0);
var eScript =  document.createElement('script');
eScript.setAttribute('src','anuncio_sessao.php');
head.appendChild(eScript);			
			
        }

function mostrar_div(div)
{
document.getElementById(div).className = "aparece";
}

function verifica(qualdiv,mantertexto)
{
if(document.getElementById(qualdiv).value==""){document.getElementById(qualdiv).value = mantertexto;}
}



function insere(string)
{document.getElementById("outrascategorias").value=string + document.getElementById("outrascategorias").value;}

function insere2(string)
{document.getElementById("categoria_produtos").value=string + document.getElementById("categoria_produtos").value;}

function insere20(string)
{document.getElementById("categoria_servicos").value=string + document.getElementById("categoria_servicos").value;}

function estar(string)
{document.getElementById("estacionamento").value=string + document.getElementById("estacionamento").value;}

function dinheiro(string)
{document.getElementById("pagamentos").value=string + document.getElementById("pagamentos").value;}


function SomenteNumero(e){
var tecla=(window.event)?event.keyCode:e.which;
if(tecla == 127) return true;
else{ return false;}  }
				
				
function mostrarfoto()
{
document.getElementById("telapreta").className = "some1";
document.getElementById("telafoto").className = "some1";
document.body.style.overflow="hidden";
}

function somefoto()
{
document.getElementById("telapreta").className = "aparece1";
document.getElementById("telafoto").className = "aparece1";
}

function enviarx(){
if(document.formulario.nome.value==""){alert('Por favor digite o nome!!!');return false;}
if(document.formulario.empresa.value==""){alert('Por favor digite o nome da empresa!!!');return false;}
if(document.formulario.email.value==""){alert('Por favor digite seu email!!!');return false;}
if(document.formulario.email.value.indexOf('@',0) == -1){alert('Email incorreto!!!');return false;}
if(document.formulario.telefone.value==""){alert('Por favor digite o telefone!!!');return false;}
if(document.formulario.cidade.value==""){alert('Por favor digite a cidade!!!');return false;}
if(document.formulario.assunto.value==""){alert('Por favor digite um assunto!!!');return false;}
if(document.formulario.comentario.value==""){alert('Favor preecher o campo informações!!!');return false;}
else{return true;}
}
