/**
 * @author Sascha
 */
var hotvoiceDialogClass = Class.create(tricos.ui.dialog, {
   
   url:'/ajax/dialog.php?d=generic',
   name:'generic',
   
   init:function()
   {
       
   },
   
   onLoad:function()
   {
       
       // submitCallback
       var frm = this.containerEl.down('form');
      // console.log(frm);
       if (frm != null) {
           frm.observe('submit', this.handleSubmit.bindAsEventListener(this));
           var okBt = frm.down('button.okBt');
           var cancelBt = frm.down('button.cancelBt');
                  
           if (okBt != null) {
               okBt.observe('click', this.handleSubmit.bindAsEventListener(this));
           }
           
           if (cancelBt != null) {
               cancelBt.observe('click', this.handleClose.bindAsEventListener(this));
           }
       }
       
   },
   
   handleSubmit:function(e)
   {
       Event.stop(e);
       if (this.submitCallback != null) {
           this.submitCallback();
       }
   },
   
   handleClose:function(e)
   {
       Event.stop(e);
//       alert('Cancel');
        this.hide();
        tricos.ui.hidePane();
   }
});
