var ww_CommentLayout = {
  init: function () {
    Ext.QuickTips.init();
    Ext.form.Field.prototype.msgTarget = 'side';
  },
  getForm: function () {
    return new Ext.form.FormPanel({
      baseCls: 'x-plain',
      labelWidth: 55,
      url:'test.asp',
      defaultType: 'textfield',

      items: [{
        fieldLabel: 'Name<font color="red">*</font>&nbsp;',
        name: 'CoSubmitedBy',
        maxLength: 50,
        allowBlank: false,
        anchor:'95%'
      },{
        fieldLabel: 'E-Mail<font color="red">*</font>&nbsp;',
        name: 'CoEmail',
        vtype: 'email',
        allowBlank: false,
        anchor: '95%'
      },{
        xtype: 'label',
        html: 'Comment<font color="red">*</font> :',
        name: 'lblComment',
        anchor: '95%'
      },{
        xtype: 'textarea',
        hideLabel: true,
        fieldLabel: 'Comment<font color="red">*</font> ',
        name: 'CoDescription',
        maxLength: 1000,
        allowBlank: false,
        anchor: '95% -73'  // anchor width by percentage and height by raw adjustment
      }]
    });
  },
  getWindow: function(frmComment) {
    return new Ext.Window({
      title: 'Submit Comment',
      width: 500,
      height:300,
      minWidth: 300,
      minHeight: 200,
      layout: 'fit',
      plain:true,
      bodyStyle:'padding:5px;',
      buttonAlign:'center',
      animateTarget: 'btnCommentSubmit',
      closeAction: 'hide',
      modal: true, 
      items: frmComment,

      buttons: [{
        text: 'Submit',
        handler: function () {
          if (frmComment.getForm().isValidElseAlert()) {
            var params = ww.ajax.prefixParameter(frmComment.getForm().getValues(), {CoReferID: sPGID, CoTypeID: 1, submit: 1});
            ww.ajax.postback(params);
            winComment.hide();
            frmComment.getForm().reset();
          }
        }
      },{
        text: 'Reset',
        handler: function () {
          frmComment.getForm().reset();
        }
      }]
    });
  }
}