function validate_forgot() {var message="";if( document.getElementById('forgot_email') != 'undefined' && (isEmpty(document.getElementById('forgot_email').value) == true)) {alert("Digite o seu endereço de e-mail");document.getElementById('forgot_email').focus();return false;}if(document.getElementById('forgot_email').value!=""){if(isEmail(document.getElementById('forgot_email').value) == false){alert("Endereço de email válido") document.getElementById('forgot_email').focus();return false;}}}function validate_login(){var message="";if( document.getElementById('login_email') != 'undefined' && (isEmpty(document.getElementById('login_email').value) == true)){message=message+"Digite o seu endereço de e-mail\n";}if(document.getElementById('login_email').value!=""){if(isEmail(document.getElementById('login_email').value) == false){message=message+"Endereço de email válido\n";}}if( document.getElementById('login_password') != 'undefined' && (isEmpty(document.getElementById('login_password').value) == true)){message=message+"Digite sua senha\n";}if(message!=""){alert(message);return false;}}function inner_validate_login() {var message="";if( document.getElementById('inner_login_email') != 'undefined' && (isEmpty(document.getElementById('inner_login_email').value) == true)){message=message+"Digite o seu endereço de e-mail\n";}if(document.getElementById('inner_login_email').value!=""){if(isEmail(document.getElementById('inner_login_email').value) == false){message=message+"Endereço de email válido\n";}}if( document.getElementById('inner_login_password') != 'undefined' && (isEmpty(document.getElementById('inner_login_password').value) == true)){message=message+"Digite sua senha\n";}if(message!=""){alert(message);return false;}}function isEmpty(s){s=trim(s);return ((s == null) || (s.length == 0))}function isEmail(s){var regex = /(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i;var regex = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return regex.test(s);}function checkEmailAddress(val,path){var str1 = val.value;xmlHttp=GetXmlHttpObject(); if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=path;url=url+"?value="+str1;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=stateChanged;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChanged(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("email_message").innerHTML=xmlHttp.responseText;} }function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();} catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function loginEmailAddress(val,path){var str1 = val.value;xmlHttp=GetXmlHttpObject();if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=path;url=url+"?value="+str1;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=stateChangedlogin;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChangedlogin(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("password_message").innerHTML="";document.getElementById("login_message").innerHTML=xmlHttp.responseText;}}function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function loginEmailAddressthree(val,path){var str1 = val.value;xmlHttp=GetXmlHttpObject(); if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=path;url=url+"?value="+str1;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=stateChangedlogin2;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChangedlogin2(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("password_message_inner").innerHTML="";document.getElementById("login_message_inner").innerHTML=xmlHttp.responseText;}}function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function checkEmailPass(path){var str1 = document.getElementById('login_email').value;var str2 = document.getElementById('login_password').value;xmlHttp=GetXmlHttpObject();if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=path;url=url+"?email="+str1;url=url+"&password="+str2;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=stateChangedcheck;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChangedcheck(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("login_message").innerHTML="";document.getElementById("password_message").innerHTML=xmlHttp.responseText } }function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function checkEmailPass_in(path){var str1 = document.getElementById('inner_login_email').value;var str2 = document.getElementById('inner_login_password').value;xmlHttp=GetXmlHttpObject(); if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=path;url=url+"?email="+str1;url=url+"&password="+str2;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=stateChangedcheckin;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChangedcheckin(){if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("login_message_inner").innerHTML="";document.getElementById("password_message_inner").innerHTML=xmlHttp.responseText;}}function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function forgotEmailAddress(val,path){var str1 = val.value;xmlHttp=GetXmlHttpObject();if (xmlHttp==null){alert ("Your browser does not support AJAX!");return;}var url=path;url=url+"?value="+str1;url=url+"&sid="+Math.random();xmlHttp.onreadystatechange=stateChangedforgot;xmlHttp.open("GET",url,true);xmlHttp.send(null);}function stateChangedforgot(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("forgot_message").innerHTML=xmlHttp.responseText;}}function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function changeCountry(){document.getElementById('idCountry').style.display = "block";document.getElementById('idBack').style.display = "block";document.getElementById('idLocation').style.display = "none";document.getElementById('idNocountry').style.display = "none";document.getElementById('cityExample').style.display = "none"; document.getElementById('checkLocation').value="10";document.getElementById('location').value="";}function hideCountry(){document.getElementById('idCountry').style.display = "none";document.getElementById('idBack').style.display = "none";document.getElementById('idLocation').style.display = "block";document.getElementById('idNocountry').style.display = "block";document.getElementById('cityExample').style.display = "block";document.getElementById('checkLocation').value="1";document.getElementById('location').value="";}function chimg(str){document.getElementById(str).src="https://media.agenteimovel.com.br/site/design/busca_hover.png";}function chimg2(str){document.getElementById(str).src="https://media.agenteimovel.com.br/site/design/busca_btn.png";}function tab2chng(){document.getElementById('tab_partimg').style.background="url('https://media.agenteimovel.com.br/site/design/tab_bg.jpg')";document.getElementById('tabc').style.width="630px";document.getElementById('maphide').style.display = 'block';$("ul.tabs li").removeClass("active1");}function tab1chng(){document.getElementById('tab_partimg').style.background="url('https://media.agenteimovel.com.br/site/design/tab_bg.jpg')";document.getElementById('tabc').style.width="630px";$("ul.tabs li").removeClass("active1");document.getElementById('maphide').style.display = 'block';}function chgback(){document.getElementById('tab_partimg').style.background="url('https://media.agenteimovel.com.br/site/design/tab_bg_03.jpg')";document.getElementById('tabc').style.width="940px";document.getElementById('tab3').style.padding="0px";document.getElementById('maphide').style.display = 'none';$("ul.tabs li").removeClass("active");$("ul.tabs li:last").addClass("active1");}function region(nu) {document.getElementById('tst').src = window['Image'+nu].src; return true;}function showMenu(){document.getElementById('catdropm1001').style.display = 'block';}function hideMenu(){document.getElementById('catdropm1001').style.display = 'none';} $(document).ready(function() {$(".tab_content").hide();$("ul.tabs li:first").addClass("active").show();$(".tab_content:first").show();$("ul.tabs li").click(function() {$("ul.tabs li").removeClass("active"); $(this).addClass("active"); $(".tab_content").hide(); var activeTab = $(this).find("a").attr("href");$(activeTab).fadeIn(); return false;}); if($("#subNav1 li").size() == 0) { $("#subNav1").hide(); } if($("#subNav2 li").size() == 0) { $("#subNav2").hide(); } if($("#subNav3 li").size() == 0) { $("#subNav3").hide(); } });