Index: webfm/webfm-popup.tpl.php
===================================================================
RCS file: webfm/webfm-popup.tpl.php
diff -N webfm/webfm-popup.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ webfm/webfm-popup.tpl.php	18 Dec 2008 07:21:53 -0000
@@ -0,0 +1,14 @@
+<html>
+<head>
+  <title><?php print t('File Browser'); ?></title>
+  <?php print drupal_get_html_head(); ?>
+  <?php print drupal_get_css(); ?>
+  <?php print drupal_get_js('header'); ?>
+</head>
+
+<body class="webfm">
+  <div id="messages"><?php print theme('status_messages'); ?></div>
+  <?php print $content; ?>
+  <?php print drupal_get_js('footer'); ?>
+</body>
+</html>
\ No newline at end of file
Index: webfm/webfm.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webfm/webfm.module,v
retrieving revision 1.30
diff -u -p -r1.30 webfm.module
--- webfm/webfm.module	9 Dec 2008 18:24:58 -0000	1.30
+++ webfm/webfm.module	18 Dec 2008 07:21:54 -0000
@@ -206,6 +206,12 @@ function webfm_menu() {
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
   );
+  $items['webfm_popup'] = array(
+    'title' => 'Web File Manager',
+    'page callback' => 'webfm_popup',
+    'access arguments' =>  array('access webfm'),
+    'type' => MENU_CALLBACK,
+  );
 
   return $items;
 }
@@ -599,6 +605,10 @@ function webfm_theme() {
       //'template' => 'webfm-attachments',
       'arguments' => array('files'),
     ),
+    'webfm_popup' => array(
+      'arguments' => array('content' => ''),
+      'template' => 'webfm-popup',
+    ),
   );
 }
 
@@ -2853,6 +2863,16 @@ function _webfm_dbdelete_attach_fid($fid
   return TRUE;
 }
 
+/**
+ * Show the popup window.
+ */
+function webfm_popup() {
+  $path = drupal_get_path('module', 'webfm');
+  $content = webfm_main();
+  print theme('webfm_popup', $content);
+  exit();
+}
+
 if(module_exists('views')){
   require_once("./".$modulepath."/webfm_views.inc");
 }
