//================================= CLASS CONSTRUCTOR ========================================
function EMAttachListDlg()
{
//MEMBER VARIABLES
//JSPs that currently use this mediator ...
 this.page = null;
 this.attachFrm = null;
 this.previewFrm = null;
 this.toolbarFrm = null;

 this.initialize();
}

//====================================== STATIC ==============================================
//CONSTANTS

//====================================== MEMBERS =============================================
EMAttachListDlg.prototype.setDefaults = function()
{
 this.page = null;
 this.attachFrm = null;
 this.previewFrm = null;
 this.toolbarFrm = null;
}

EMAttachListDlg.prototype.initialize = function()
{
 this.setDefaults();
}

EMAttachListDlg.prototype.registerPage = function(ipage)
{
 this.page = ipage;
}

EMAttachListDlg.prototype.registerAttachFrm = function(iattachFrm)
{
 this.attachFrm = iattachFrm;
}

EMAttachListDlg.prototype.registerPreviewFrm = function(ipreviewFrm)
{
 this.previewFrm = ipreviewFrm;
}

EMAttachListDlg.prototype.registerToolbarFrm = function(itoolbarFrm)
{
 this.toolbarFrm = itoolbarFrm;
}

//================================================== PAGE.JSP ==========================================================
EMAttachListDlg.prototype.canGetDocumentId = function()
{
 if (this.page == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onGetDocumentId = function()
{
 if (this.canGetDocumentId() == false)
  return null;
 return this.page.mGetDocumentId();
}

EMAttachListDlg.prototype.canGetAttachments = function()
{
 if (this.page == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onGetAttachments = function()
{
 if (this.canGetAttachments() == false)
  return null;
 return this.page.mGetAttachments();
}

EMAttachListDlg.prototype.canClose = function()
{
 if (this.page == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onClose = function()
{
 if (this.canClose() == false)
  return null;
 this.page.vClose();
 return true;
}

EMAttachListDlg.prototype.canSlide = function()
{
 if (this.page == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onSlide = function(iid)
{
 if (this.canSlide() == false)
  return null;
 this.page.vSlide(iid);
 return true;
}

//============================================= PREVIEWFRM.JSP =========================================================
EMAttachListDlg.prototype.canShowAttachment = function()
{
 if (this.previewFrm == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onShowAttachment = function(imPath,att)
{
 if (this.canShowAttachment() == false)
  return null;
 return this.previewFrm.showAttachment(imPath,att);
}

EMAttachListDlg.prototype.canWait = function()
{
 if (this.previewFrm == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onWait = function()
{
 if (this.canWait() == false)
  return null;
 return this.previewFrm.wait();
}

EMAttachListDlg.prototype.canSetDefaultPreview = function()
{
 if (this.previewFrm == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onSetDefaultPreview = function()
{
 if (this.canSetDefaultPreview() == false)
  return null;
 return this.previewFrm.setDefaultPreview();
}

//============================================== ATTACHFRM.JSP =========================================================
EMAttachListDlg.prototype.canDeleteSelectedAttachment = function()
{
 if (this.attachFrm == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onDeleteSelectedAttachment = function()
{
 if (this.canDeleteSelectedAttachment() == false)
  return null;
 this.attachFrm.deleteSelectedAttachment();
 return true;
}

EMAttachListDlg.prototype.canShowSelectedAttachment = function()
{
 if (this.attachFrm == null)
  return false;
 return true;
}

EMAttachListDlg.prototype.onShowSelectedAttachment = function()
{
 if (this.canShowSelectedAttachment() == false)
  return null;
 this.attachFrm.showSelectedAttachment();
 return true;
}

EMAttachListDlg.prototype.onSaveSelectedAttachment = function()
{
 if (this.canShowSelectedAttachment() == false)
  return null;
 this.attachFrm.saveSelectedAttachment();
 return true;
}

EMAttachListDlg.prototype.finalize = function()
{
 this.setDefaults();
}
