
comentario=function()
{var MSG_WAIT_TITLE='Info';var MSG_WAIT='Enviando mail...';return{send:function(datasource,title,mailtitle,captcha)
{var form=new Ext.form.FormPanel
({baseCls:'x-plain',labelWidth:90,defaults:{width:230},defaultType:'textfield',items:[{fieldLabel:'Nombre y Apellido',name:'nombre',allowBlank:false},{fieldLabel:'Empresa',name:'empresa'},{fieldLabel:'Telefono',name:'telefono'},{fieldLabel:'E-mail',name:'email',vtype:'email',allowBlank:false},{fieldLabel:'Mensaje',xtype:'textarea',name:'mensaje'}],buttons:[{text:'Enviar',iconCls:alerta.css.Icon_Enviar,handler:function()
{if(form.getForm().isValid())
{form.form.submit
({url:datasource+'?titulo='+mailtitle,method:'POST',timeout:1000,waitTitle:MSG_WAIT_TITLE,waitMsg:MSG_WAIT,success:function(form,action)
{alerta.MessageBox.mail(action.result);windowMail.destroy();},failure:function(form,action){alerta.MessageBox.mail_error();}});}}},{text:'Cancelar',iconCls:alerta.css.Icon_Cancelar,handler:function()
{windowMail.destroy();}}]});var windowMail=new Ext.Window
({title:title,width:400,height:260,minWidth:300,minHeight:200,layout:'fit',plain:true,bodyStyle:'padding:5px;',buttonAlign:'center',items:form});if(captcha==true)
{form.add({fieldLabel:'Pregunta de Seguridad',name:'human',xtype:'botfield',errorText:"Ingrese el <b>número</b> que satisface la ecuación: <br/>"});windowMail.height=290;}
Ext.QuickTips.init();Ext.form.Field.prototype.msgTarget='side';windowMail.show();}}}();
