// File: ccMultiFileUpload.js
// for invoking multiple file upload dialog

/**
 * Popup the dialog for uploading multiple files.
 * Usually is invoked by user clicking on a link or button.
 */
function showMultiFileUploadDialog(ppfx,mf,showMultiple) { //ppfx : transaction key, mf:show MyFiles
    var url = "PageServlet?cx=u&pg=MultiFileUploadDialog&ppfx="+ppfx;
    if ( typeof(mf) != 'undefined' ) {url += "&mf="+mf;}
    var showWin = openNewWin('attachWin',url,550,420, "resizable=yes,scrollbars=yes,status=yes");
    return showWin;
}

/**
 * Externally set the values in the template
 * make use of data(attList) and selection list(attachmentList)
 */
function prepareAttachmentListOnScreen(list,fileList) {
  var selectList = list;
  selectList.length = 0;
  if ( fileList == null ) {
    return;
  }
  var files = fileList.split(";");
  for ( var i=0; i<files.length; i++ ) {
    selectList[i] = new Option(files[i]);
    selectList[i].text = files[i];
    selectList[i].value = files[i];
  }
}


