Ext.onReady(function() {
	Ext.QuickTips.init();
	var odkial = ["Z internetu ","Od kamarata","Z reklamy"];
var simple = new Ext.FormPanel({
 	standardSubmit: true,
	width:	400,
  	height: 390,
  	xtype : "form",
  	frame:true,
  	shadow:true,
  
  

  items : [    {
      xtype : "fieldset",
      autoHeight : true,
      items : [        {
          xtype : "textfield",
          allowBlank:false,
          name : "meno",
          fieldLabel : "Meno",
          msgTarget: 'side',
          blankText: 'Pole musi byt vyplnene'
      },        {
          xtype : "textfield",
          allowBlank:false,
          name : "priezvisko",
          fieldLabel : "Priezvisko",
          msgTarget: 'side',
          blankText: 'Pole musi byt vyplnene', 
          width : 190
      },        {
          xtype : "textfield",
          allowBlank:false,
          name : "ulica",
          msgTarget: 'side',
          fieldLabel : "Ulica/Cislo",
          blankText: 'Pole musi byt vyplnene',
          width : 190
      },        {
          xtype : "textfield",
          allowBlank:false,
          name : "mesto",
          msgTarget: 'side',
          fieldLabel : "Mesto",
          blankText: 'Pole musi byt vyplnene',
          width : 190
      },{
		  xtype: 'textfield',
          inputType: 'hidden',
          id: 'submitbutton',
          name: 'registracia',
          value: 'hiddenvalue'
      },{
          xtype : "textfield",
          allowBlank:false,
          name : "psc",
          msgTarget: 'side',
          fieldLabel : "PSC",
          minLength: 5,
	        minLengthText: 'Minimalna dlzka hesla je 5 znakov',
          blankText: 'Pole musi byt vyplnene',
          width : 79
      }],
      width : 383,
      title : "Adresa"
  },    {
      xtype : "fieldset",
      autoHeight : true,
      width : 383,
      title : "Info",
      items : [        {
          xtype : "textfield",
		  vtype:'email',
		  vtypeText:'Email musi mat tvar moj@mail.sk',
          allowBlank:false,
          name : "email",
          msgTarget: 'side',
          fieldLabel : "Email",
          blankText: 'Pole musi byt vyplnene',
          width : 190
      },{
	          xtype : "numberfield",
	          allowBlank:true,
	          name : "mobil",
	          msgTarget: 'side',
	          fieldLabel : "Mobil",
	          width : 190
	  },{
          xtype : "combo",
          allowBlank:false,
          name : "zkade",
          msgTarget: 'side',
          store : odkial, 
		  emptyText:'Vyber nieco',
          blankText: 'Vyber jednu z moznosti',
          hiddenName : "combo_hodnota",
          allowBlank:false,
          fieldLabel : "Odkial ste sa o nas dozvedeli?",
          width : 97
      }],
      buttons: [{
          text: 'Odoslat',
          handler: function() {
				simple.getForm().getEl().dom.action = 'fzber.pl';
	        	simple.getForm().getEl().dom.method = 'POST';
          		simple.getForm().submit();
          }
      }]
  }],
  title : "Registracia"
});
simple.render('registracia');
});
