function enviarConsultaWebMaster(){
	Ext.QuickTips.init();
	Ext.form.Field.prototype.msgTarget = 'side';  
	Ext.apply(Ext.form.VTypes,{
		name: function(val, field){	return true;	},
		nameText: 'Obligatorio ingresar el nombre de la persona!', //mensaje de error
		nameMask: /[^0-9]/  //regexp para filtrar los caracteres permitidos
	});
	Ext.apply(Ext.form.VTypes,{
		asunt: function(val, field){	return true;	},
		asuntText: 'Obligatorio ingresar asunto !', //mensaje de error
		asuntMask: /^[a-zA-Z]{1}[a-zA-Z ]{1,}$/  //regexp para filtrar los caracteres permitidos
	});
	Ext.apply(Ext.form.VTypes,{
		asunt: function(val, field){	return true;	},
		asuntText: 'Obligatorio ingresar asunto !', //mensaje de error
		asuntMask: /^[a-zA-Z]{1}[a-zA-Z ]{1,}$/  //regexp para filtrar los caracteres permitidos
	});
	
	this.form = new Ext.form.FormPanel({
		//standardSubmit	: true,					
		url		: 'modulos/webmaster/mail/sendEmail.php',
		border	:false,
		labelWidth: 80,
		defaults: {
			xtype:'textfield',
			width: 180
		},
		items:[
			{xtype:'hidden', 	name:'webmaster', value:webmaster},
			{fieldLabel:'Nombre',	name:'nombre'	, allowBlank:false, vtype:'name'},
			{fieldLabel:'Correo',	name:'correo'	, allowBlank:false, vtype:'email'},
			{fieldLabel:'Asunto',	name:'asunto'	, allowBlank:false },
			{xtype:'htmleditor', 	fieldLabel:'Consulta',	name:'contenido', height: 150,  anchor: '100%'}													
		]
	});
	this.sendData=function(){
		var mask = new Ext.LoadMask(Ext.get('mywin'), {msg:'Enviando. Porfavor espere...'});  
		mask.show();  
		this.form.getForm().submit({
			method: 'POST',
			params: {
				webmaster2: webmaster
			},
			success: function(form,action){
				mask.hide(); 
				Ext.Msg.alert('Exito',action.result.msg);
			},
			failure: function(form,action){
				mask.hide(); 				
				switch (action.failureType) {
					  case Ext.form.Action.CLIENT_INVALID:
						 Ext.Msg.alert('Fallo', 'Los campos del formulario no pueden ser enviados por que tiene valores invalidos');
						 break;
					  case Ext.form.Action.CONNECT_FAILURE:
						 Ext.Msg.alert('Fallo', 'Comunicacion remota fallida');
						 break;
					  case Ext.form.Action.SERVER_INVALID:
						Ext.Msg.alert('Fallo', action.result.msg);
						break;
					  default:
						Ext.Msg.alert('Fallo',action.result.msg);
				  }
			}
		});								
	}
	this.resetData=function(){
		this.form.getForm().reset(); 
	}
	this.win = new Ext.Window({
		id:'mywin',
		title: 'Consultar al webmaster',
		bodyStyle: 'padding:10px;background-color:#fff;',
		width:530,
		height:320,
		items:[this.form],
		buttons: [{text:'Enviar' ,handler:this.sendData,scope:this},{text:'Cancelar',handler:this.resetData,scope:this}]
	});

	this.win.show();
	
}
