Ext.onReady(function(){

    Ext.QuickTips.init();
    var oPingForm = new Ext.FormPanel({
      labelWidth: 75, // label settings here cascade unless overridden
      url:'data/ping.php',
      frame:true,
      title: GetTextInLanguage('PING_FORM_TITLE', selectedLanguage),
      bodyStyle:'padding:5px 5px 0',
      width: 440,
      defaults: {width: 330},
      defaultType: 'textfield',
      items: [{
              fieldLabel: 'Your Blog Url',
              name: 'url',
              value:  'http://',
              msgTarget: 'under',
              vtype:'url',  
              allowBlank:false
          },{
                id: 'cryptInput',
                fieldLabel: GetTextInLanguage('TYPE_THE_CODE_SHOWN_BELOW', selectedLanguage),
                value: '', 
                name: 'cryptInput',
                xtype: 'textfield'
            },{
                xtype:'box'
                ,anchor:''
                ,autoEl:{
                     tag:'div', 
                     style:'margin:8px 0 8px 0px', 
                     children:[{
                        tag:'div'
                        ,style:'margin:0 0 4px 80px'
                        ,html: sCrypt.replace(/&quot;/g,'"')
                    }]
                 }
            
            }
      ],
      errorReader: new Ext.data.JsonReader(
										      {
										      	successProperty: 'success',
										      	root: 'errors'
										      }, 
										      [ 
										         'id', 'msg'
										      ]),
      buttons: [{
          text: 'Ping',
          handler: function(){ 
          	if (oPingForm.getForm().isValid())
              oPingForm.getForm().submit();
          }
      }]
  });

  oPingForm.render('ping_form_container');

  oPingForm.on(
  {
      actioncomplete: function(form, action)
      {
        if(action.type == 'submit')
        {
            Ext.MessageBox.alert(GetTextInLanguage('PING_FORM_SUCCESS', selectedLanguage), form.errorReader.jsonData.errors[0].msg);
        }
      },
      actionfailed: function(form, action)
      {
        if(action.type == 'submit')
        {
           	Ext.MessageBox.alert(GetTextInLanguage('PING_FORM_ERROR', selectedLanguage), form.errorReader.jsonData.errors[0].msg);
      	}
      }
      
  }); 
});
