function ConctactarWin(){var id=Ext.id();var formcontact=new Ext.FormPanel({autoHeight:true,autoWidth:true,id:'Contactform',defaultType:'textfield',labelWidth:105,cls:'Contactform',items:[{fieldLabel:'Su email',xtype:'textfield',name:'email',vtype:'email',allowBlank:false,width:300},{fieldLabel:'Escriba su comentario',name:'texto',id:'textodecontacto'+id,xtype:'htmleditor',allowBlank:false,width:300,enableLists:false,enableSourceEdit:false,enableLinks:false,height:170,enableSourceEdit:false,enableAlignments:false,enableColors:false},{fieldLabel:'<span style="width: 80px; height: 21px; display: inline;" ><img border=0 src="'+global_site+'images/indicator_arrows.gif" id="whiting'+id+'"  style="display:inline" ><img onload="document.getElementById(\'whiting'+id+'\').style.display=\'none\';this.style.display=\'inline\';" style="display:none" width=70 height=20 id="imgcode'+id+'" border=0 src="'+global_site+'?cmd_ajax=captcha"></span><img ext:qtip="Refrescar" onclick="document.getElementById(\'whiting'+id+'\').style.display=\'inline\';document.getElementById(\'imgcode'+id+'\').style.display=\'none\';cargacodigo(\'imgcode'+id+'\');" border=0 src="'+global_site+'admin/images/refresh.gif" style="display:inline;cursor:pointer">',labelSeparator:'',width:100,xtype:'textfield',allowBlank:false,enableKeyEvents:true,name:'imgcode',listeners:{'keyup':function(yo,ev){if(yo.getValue().length==5){}}}}]});var w=new Ext.Window({title:'Contactenos!',width:455,height:320,modal:true,plain:true,shadow:false,items:[formcontact],buttons:[{hidden:true,id:'loadin',text:'<img border=0 src="'+global_site+'/images/indicator_arrows.gif'+'">',handler:function(btn){}},{text:'Enviar',handler:function(btn){if(!formcontact.getForm().isValid()||Ext.getCmp('textodecontacto'+id).getValue()==''){Ext.Msg.alert('Amigo!','Debes rellenar correctamente los campos');return false}btn.hide();Ext.getCmp('loadin').show();Ext.Ajax.request({url:global_site+'index.php',success:function(resp){if(resp.responseText!=1){Ext.Msg.alert('Amigo!','El c&oacute;digo que escribiste no es el correcto!');btn.show();Ext.getCmp('loadin').hide();return false}w.hide()},params:{cmd_ajax:'conctacto',data:Ext.encode(Ext.getCmp('Contactform').getForm().getValues())}})}}]});w.show()}function SendPassWind(){var formcontact=new Ext.FormPanel({autoHeight:true,autoWidth:true,id:'sendform',defaultType:'textfield',labelWidth:60,cls:'Contactform',items:[{fieldLabel:'Su email',xtype:'textfield',name:'email',vtype:'email',width:200}]});var w=new Ext.Window({title:'Recuperar Contrase&ntilde;a!',autoHeight:true,width:320,modal:true,plain:true,shadow:false,items:[formcontact],buttons:[{hidden:true,id:'loadin',text:'<img border=0 src="'+global_site+'/images/indicator_arrows.gif'+'">',handler:function(btn){}},{text:'Recuperar',handler:function(btn){btn.hide();Ext.getCmp('loadin').show();Ext.Ajax.request({url:'index.php',success:function(resp){w.hide();var r=Ext.decode(resp.responseText);Ext.Msg.show({title:'',msg:r.msg,minWidth:200,icon:Ext.Msg.INFO,buttons:Ext.Msg.OK})},params:{cmd_ajax:'passrecover',data:Ext.encode(Ext.getCmp('sendform').getForm().getValues())}})}}]});w.show()}function cargacodigo(id){document.getElementById(id).src=''+global_site+'?cmd_ajax=captcha&ref=_'+(Math.random())}