function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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 sendPropostaHTM() {

	if (document.frmProposta.nome.value=="")
	{
		alert("Digite seu Nome!");
		document.frmProposta.nome.focus();
		errors="1";
		return false;
	}
	
	if (document.frmProposta.email.value=="")
	{
		alert("Digite seu Email!");
		document.frmProposta.email.focus();
		errors="1";
		return false;
	}
	
	if (document.frmProposta.fone.value=="")
	{
		alert("Digite seu Telefone!");
		document.frmProposta.fone.focus();
		errors="1";
		return false;
	}
	
	if (document.frmProposta.proposta.value=="")
	{
		alert("Digite sua Proposta!");
		document.frmProposta.proposta.focus();
		errors="1";
		return false;
	}
	
	document.MM_returnValue = (errors = '');
	if (errors == 0) {
	sendProposta();
	}
}

function sendAnuncio() {

	if (document.frmAnuncio.nome.value=="")
	{
		alert("Digite seu Nome!");
		document.frmAnuncio.nome.focus();
		errors="1";
		return false;
	}
	
	if (document.frmAnuncio.telefone.value=="")
	{
		alert("Digite seu Telefone!");
		document.frmAnuncio.telefone.focus();
		errors="1";
		return false;
	}
	
	if (document.frmAnuncio.email.value=="")
	{
		alert("Digite seu Email!");
		document.frmAnuncio.email.focus();
		errors="1";
		return false;
	}
	
	if (document.frmAnuncio.info.value=="")
	{
		alert("Digite as Informações do Imóvel!");
		document.frmAnuncio.info.focus();
		errors="1";
		return false;
	}
	
	document.MM_returnValue = (errors = '');
	if (errors == 0) {
	sendAnuncioHtm();
	}
}

function sendContato() {

	if (document.frmContato.nome.value=="")
	{
		alert("Digite seu Nome!");
		document.frmContato.nome.focus();
		errors="1";
		return false;
	}
	
	if (document.frmContato.telefone.value=="")
	{
		alert("Digite seu Telefone!");
		document.frmContato.telefone.focus();
		errors="1";
		return false;
	}
	
	if (document.frmContato.email.value=="")
	{
		alert("Digite seu Email!");
		document.frmContato.email.focus();
		errors="1";
		return false;
	}
	
	if (document.frmContato.assunto.value=="")
	{
		alert("Escreva o Assunto da Mensagem!");
		document.frmContato.assunto.focus();
		errors="1";
		return false;
	}
	
	if (document.frmContato.info.value=="")
	{
		alert("Digite as Informações do Imóvel!");
		document.frmContato.info.focus();
		errors="1";
		return false;
	}
	
	document.MM_returnValue = (errors = '');
	if (errors == 0) {
	sendContatoHtm();
	}
}

