function waitPopup(){Ext.getBody().mask('attendere...');}
Ext.override(Ext.form.Field,{setFieldLabel:function(text){var ct=this.el.findParent('div.x-form-item',3,true);var label=ct.first('label.x-form-item-label');label.update(text);}});function _etv(response,tag)
{var value='';var _ASD=response.responseXML;try{value=_ASD.getElementsByTagName(tag)[0].firstChild.nodeValue;}catch(e){}
return value;}
function _rev()
{Ext.Msg.show({title:'avviso',msg:'per inserire un annuncio &egrave; necessario completare '+'la registrazione cliccando sul link che ti abbiamo inviato via email<br/>'+'se hai smarrito la email, clicca sul pulsante qui sotto per ricevere una nuova email di verifica',buttonText:Ext.MessageBox.buttonText.yes='invia mail di verifica',buttonText:Ext.MessageBox.buttonText.no='annulla',buttons:Ext.Msg.YESNO,closable:false,icon:Ext.MessageBox.WARNING,fn:function(btn,text){if(btn=='yes'){Ext.getBody().mask('attendere...');Ext.Ajax.request({url:'?cmd=emailVerifiedRequested',callback:function(){Ext.getBody().unmask();},success:function(response,a){if(_etv(response,'success')==0)
{Ext.Msg.show({title:'avviso',msg:'indirizzo mail non trovato'});}else{Ext.Msg.show({title:'avviso',msg:'abbiamo inviato una mail al tuo indirizzo<br/>clicca sul link contenuto nella mail per completare l\'operazione<br/>'+'dopo la verifica potrai inserire un immobile'});}}});}}});}
function _iPC(){Ext.getBody().mask('attendere...');Ext.Ajax.request({url:'?cmd=checkLogin',success:function(response,a){if(_etv(response,'success')=='0'){Ext.getBody().unmask();Ext.Msg.show({title:'avviso',msg:'per inserire un annuncio &egrave; necessario effettuare prima l\'accesso<br/>clicca sul pulsante <b>accedi</b> in alto a sinistra'});return;}
if(_etv(response,'emailVerified')=='true'){document.location.href="/it/pubblicare-annuncio-immobiliare";}else{_rev();}
Ext.getBody().unmask();}});}
function _gGL(_ede){var _pl=_cLl.getValue();if(_pl.length<4){Ext.Msg.alert('avviso','Nella casella di <b>ricerca</b> &egrave; necessario inserire almeno 4 caratteri');_cLl.focus();return;}
_pl+=", IT";var s="";var _ig=new GClientGeocoder();_ig.getLocations(_pl,function(response){if(response.Status.code==G_GEO_SUCCESS){var _aLL=response.Placemark;extJsStoreAddress.removeAll();if(_aLL.length>1){for(var i=0;i<_aLL.length;i++){createAddressAndPushIntoAddressList(_aLL[i]);}}else{createAddressAndPushIntoAddressList(_aLL[0]);}
_cLl.focus();if(_ede){_cLl.keyNav.down.call(_cLl);}}
else
{Ext.Msg.alert('avviso','Nessun indirizzo trovato!<br/>Prova ad inserire nella casella <b>ricerca</b> il nome della localita\' che stai cercando...');_cLl.focus();}});if(!_ede){_cLl.expand();}}
