<!-- MENU-LOCATION=NONE -->
<!-- Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->

<HTML>

<HEAD>

<TITLE>Before Save</TITLE>
<SCRIPT LANGUAGE="javascript">

// Don't require syncing the DOM during File Save
function isDOMRequired()
{
  return false;
}

// Function: beforeSave
//
// Description: Generalized _beforeSave command. The command executes every command
//   file ending with "_beforeSave.htm" which exists in the command folder.
//
// Notes: Do not replace this file. Rename any required _beforeSave commands
//   prepending a descriptive name. 
//
function beforeSave() {
  if (!MM.beforeSaveFileList)
  {
	  // Search for all files ending with the _beforeSave name.
	  var filePath = dw.getConfigurationPath()+'/Commands/';
	  var fileFilter = '?*_beforeSave.htm';
	  MM.beforeSaveFileList = DWfile.listFolder(filePath+fileFilter, 'files');
  }
  for (var i = 0; i < MM.beforeSaveFileList.length; i++) {
    // Call each specified command file.
    dw.popupCommand(MM.beforeSaveFileList[i]);
  }
}

</SCRIPT>

</HEAD>

<BODY onLoad="beforeSave()">
</BODY>

</HTML>
