post = function(){
	
	post.superclass.constructor.call(this, {
		autoCreate: true
	});
	
	var formulario = new Ext.form.Form({
		style: "align: center; margin-left:10px; margin-top:5px; margin-right:10px;",
		labelWidth: 60,
		labelAlign: "top",
		waitTitle: "Espere por favor",
		method: "GET",
		disableCaching: false,
		errorReader: new Ext.data.JsonReader({
			root: "resultado", 
			successProperty: "exito"
		}, ["id", "msg"])
	});
	
	//formulario.column({width: "auto"});
	/*formulario.fieldset({legend: "Mensaje", hideLabels: true},
		new Ext.form.TextField({
			name: "c2",
			emptyText: "Escribe tu mensaje...",
			width: 145
		})
	);*/
	
	formulario.add(
		new Ext.form.TextField({
			fieldLabel: "Mensaje",
			name: "text",
			maxLength: 150,
			emptyText: "Escribe tu mensaje...",
			width: 165
		})
	);

	formulario.addButton({
		text: "Postear", 
		handler: this.votar,
		scope: this
	});
	
	formulario.render(this.getEl());
	
	this.formulario = formulario;
	
};

Ext.extend(post, Ext.ContentPanel, {
	
	/*resetear: function(){
		
		var diag = this.diagrama.child("\img", true);
		diag.src = "images/diagrama/lo1.png";
		
		var esqu = this.esquema.child("\img", true);
		esqu.src = "images/esquema/lo1.png";
		
		this.formulario.reset();
	
	},*/
	
	votar: function(){
		
		//var choice = parseInt(this.formulario.findField("choice").selectRadio().id);
		this.formulario.findField("text").setValue("");
	
	}
		   
});
