Index: /trunk/phpgwapi/templates/default/css/azul.css
===================================================================
--- /trunk/phpgwapi/templates/default/css/azul.css	(revision 1704)
+++ /trunk/phpgwapi/templates/default/css/azul.css	(revision 1719)
@@ -397,2 +397,14 @@
 	width: 191px;
 }
+
+.tr_msg_read {
+	color: #3f3f3f;
+	background-color: #ffffff;
+	-moz-user-select: none;
+}
+
+.tr_msg_read2 {
+	color: #3f3f3f;
+	background-color: #f4f8fb;
+	-moz-user-select: none;
+}
Index: /trunk/phpgwapi/templates/default/css/rochas.css
===================================================================
--- /trunk/phpgwapi/templates/default/css/rochas.css	(revision 1704)
+++ /trunk/phpgwapi/templates/default/css/rochas.css	(revision 1719)
@@ -501,2 +501,14 @@
 	background-color:#EEEEE0 !important;
 }
+.tr_msg_read {
+	color: #3f3f3f;
+	background-color: #ffffff;
+	-moz-user-select: none;
+}
+
+.tr_msg_read2 {
+	color: #3f3f3f;
+	background-color: #eeeee0;
+	-moz-user-select: none;
+}
+
Index: /trunk/phpgwapi/templates/default/css/cataratas.css
===================================================================
--- /trunk/phpgwapi/templates/default/css/cataratas.css	(revision 1704)
+++ /trunk/phpgwapi/templates/default/css/cataratas.css	(revision 1719)
@@ -477,2 +477,15 @@
 	background:#98C17F !important;
 }
+
+
+.tr_msg_read {
+	color: #3f3f3f;
+	background-color: #ffffff;
+	-moz-user-select: none;
+}
+
+.tr_msg_read2 {
+	color: #3f3f3f;
+	background-color: #e6f3d9;
+	-moz-user-select: none;
+}
Index: /trunk/expressoMail1_2/templates/default/main.css
===================================================================
--- /trunk/expressoMail1_2/templates/default/main.css	(revision 1514)
+++ /trunk/expressoMail1_2/templates/default/main.css	(revision 1719)
@@ -38,15 +38,4 @@
 .tr_msg_unread {
 	font-weight: bold !important;
-}
-.tr_msg_read {
-	color: #3f3f3f;
-	background-color: #ffffff;
-	-moz-user-select: none;
-}
-
-.tr_msg_read2 {
-	color: #3f3f3f;
-	background-color: #f4f8fb;
-	-moz-user-select: none;
 }
 
Index: /sandbox/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1704)
+++ /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1719)
@@ -20,4 +20,5 @@
 could not move file because no destination directory is given	filemanager	pt-br	Não foi possível mover o arquivo porque não se definiu um diretório de destino
 could not rename %1 to %2	filemanager	pt-br	Não foi possível renomear %1 para %2
+loading	filemanager	pt-br	Carregando
 could not save %1	filemanager	pt-br	Não foi possível salvar %1
 create file	filemanager	pt-br	Criar Arquivo
Index: /sandbox/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1704)
+++ /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1719)
@@ -29,4 +29,6 @@
 			'fileModels'=>True,
 			'getReturnExecuteForm' => True,
+			'dir_ls' => True,
+			'get_permissions' => True,
 			'uploadModel'=>True
 		);
@@ -555,23 +557,100 @@
 			}
 		}
+		function get_permissions(){
+			/* get permissions */
+			if((preg_match('+^'.$this->bo->fakebase.'\/(.*)(\/|$)+U', $this->path, $matches)) && $matches[1] != $this->bo->userinfo['account_lid']) //FIXME matches not defined
+
+			{
+				$this->bo->vfs->working_id = $GLOBALS['phpgw']->accounts->name2id($matches[1]);//FIXME matches not defined
+
+			}
+			else
+			{
+				$this->bo->vfs->working_id = $this->bo->userinfo['username'];
+			}
+
+			# Check available permissions for $this->path, so we can disable unusable operations in user interface
+			$path = explode('/',$this->path);
+			$owner_id = $this->bo->vfs->ownerOf($this->bo->fakebase,$path[2]);
+			$user_id = $GLOBALS['phpgw_info']['user']['account_id'];
+			if ($owner_id == $user_id)
+			{
+				$rights = 31;
+			}else
+			{
+				$acl = CreateObject ('phpgwapi.acl', $owner_id);
+				$acl->account_id = $owner_id;
+				$acl->read_repository();
+				$rights = $acl->get_rights($user_id);
+			}
+			echo $rights;	
+		}
+		function dir_ls()
+		{
+			reset($this->files_array);
+			$this->readFilesInfo();
+
+			for($i = 0; $i != $this->numoffiles; $i++)
+			{
+				$files = $this->files_array[$i];
+
+				if(!$this->prefs['dotfiles'] && ereg("^\.", $files['name']))
+				{
+					continue;
+				}
+				/* small keys to safe bandwidth */
+				$tuple['name'] = $files['name'];
+				$tuple['icon'] = $this->mime_icon($files['mime_type']);
+				$tuple['type'] = $files['type'];
+				if ($files['created'] != ''){
+					$timestamp = $this->vfs_functions->dateString2timeStamp($files['created']);
+					if (time() - $timestamp > 86400) // Older than yesterday
+						$tuple['creatd']=date("Y-m-d",$timestamp);
+					else
+						$tuple['creatd']=date("H:i",$timestamp);
+				}
+				else
+					$tuple['creatd']='';
+				if ($files['modified'] != ''){
+                                        $timestamp = $this->vfs_functions->dateString2timeStamp($files['modified']);
+                                        if (time() - $timestamp > 86400) // Older than yesterday
+                                                $tuple['modifd']=date("Y-m-d",$timestamp);
+                                        else
+                                                $tuple['modifd']=date("H:i",$timestamp);
+                                }
+                                else
+                                        $tuple['modifd']='';
+
+				$tuple['size'] = $files['size'];
+				$tuple['mime'] = $files['mime_type'];
+				$tuple['pub'] = $files['type'];
+				$tuple['creatdby'] = $GLOBALS['phpgw']->accounts->id2name($files['createdby_id']);
+				$tuple['modifdby'] = $files['modifiedby_id']?$GLOBALS['phpgw']->accounts->id2name($files['modifiedby_id']):'';
+				$tuple['owner'] = $GLOBALS['phpgw']->accounts->id2name($files['owner_id']);
+				$tuple['comm'] = $files['comment'];
+				$tuple['vers'] = $files['version'];
+				$output[] = $tuple;
+
+			}
+
+			foreach ($output as $key => $row) {
+				$temp[$key]  = $row[$this->criteria];
+			}
+			if ($this->otype == "1")
+				array_multisort($temp, SORT_ASC, $output);
+			else
+				array_multisort($temp, SORT_DESC, $output);
+
+			echo serialize($output);
+		}
+
 		function fileListing()
 		{
-			$this->t->set_file(array('filemanager_list_t' => 'filelisting.tpl'));
+			$this->t->set_file(array('filemanager_list_t' => 'main.tpl'));
 			$this->t->set_block('filemanager_list_t','filemanager_header','filemanager_header');
-			$this->t->set_block('filemanager_list_t','column','column');
-			$this->t->set_block('filemanager_list_t','row','row');
 			$this->t->set_block('filemanager_list_t','filemanager_footer','filemanager_footer');
 
-			$vars['form_action']=$this->encode_href('/index.php', 'menuaction=filemanager.uifilemanager.index','path='.$this->path);
 			if($this->numoffiles || $this->cwd)
 			{
-				while(list($num, $name) = each($this->prefs))
-				{
-					if($name)
-					{
-						$columns++;
-					}
-				}
-				$columns++;
 				$usedSpace = $this->bo->vfs->get_size(array(
 					'string'        => $this->path,
@@ -586,4 +665,5 @@
 				$vars[path]='<input type="hidden" id="currentPath" value="'.$this->path.'">';
 				$vars[css]='<link rel="stylesheet" type="text/css" href="filemanager/templates/default/main.css">';
+				$vars[preferences]='<input type="hidden" id="userPreferences" value=\''.serialize($_SESSION['phpgw_info']['user']['preferences']['filemanager']).'\'>';
 				$vars[script]='<script>initDrawApi();</script>';
 
@@ -599,4 +679,7 @@
 					$vars[new_button]='';
 
+				// reload button with this url
+				$vars[refresh_button]=$this->toolButton('reload','reload',lang('reload'));
+
 				// go up icon when we're not at the top, dont allow to go outside /home = fakebase
 				if($this->path != '/' && $this->path != $this->bo->fakebase)
@@ -607,45 +690,10 @@
 					$vars[tools_button] = "";
 
-				// go home icon when we're not home already
-				/*if($this->path != $this->bo->homedir)
-				{
-					$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->lesspath);
-
-				$vars[up_button]=$this->toolButton($link,'up',lang('go up'));
-
-				$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->bo->homedir);
-				$toolbar.=$this->toolButton($link,'home',lang('go home'));
-				}*/
-
-				// reload button with this url
-				$vars[refresh_button]=$this->toolButton('reload','reload',lang('reload'));
 
 				// selectbox for change/move/and copy to
 				$dirs=$this->all_other_directories_options();
 				foreach($dirs as $elem)
-					$vars[folders].='<br><span onclick="load(\''.$elem['directory'].$elem['name'].'\')" class="l">'.$elem['name'].'</span>';
+					$vars[folders].='<br><span onclick="load(\''.$elem['directory'].$elem['name'].'\')" class="l" onmouseover="this.style.border=\'1px solid black\'" onmouseout="this.style.border=\'1px solid transparent\'">'.$elem['name'].'</span>';
 				
-				//$this->toolButton('goto','goto',lang('Quick jump to'));
-				// selectbox for change/move/and copy to
-				// submit buttons for
-				// if($this->path != '/' && $this->path != $this->bo->fakebase)
-
-				if($this->can_edit)
-				{
-					// edit text file button
-					$toolbar.=$this->toolButton('edit','edit',lang('edit'));
-				}
-
-				if($this->can_edit)
-				{
-					$toolbar.=$this->toolButton('rename','rename',lang('Rename'));
-				}
-
-				if($this->can_delete)
-				{
-					$toolbar.=$this->toolButton('delete','delete',lang('Delete'));
-				}
-
-
 
 				// copy and move buttons
@@ -660,13 +708,5 @@
 					}
 
-				if (strlen($dirs_options) > 0){
-					 if ($this->can_read)
-						$toolbar.=$this->toolButton('copy_to','copy_to',lang('Copy to'));
-					if ($this->can_delete)
-						$toolbar.=$this->toolButton('move_to','move_to',lang('Move to'));
-				}
 				$toolbar.='<select name="todir" style="visibility:hidden">'.$dirs_options.'</select>';
-
-
 
 				$vars[toolbar1]=$toolbar;
@@ -685,292 +725,4 @@
 				$this->t->set_var($vars);
 				$this->t->pparse('out','filemanager_header');
-
-				###
-				# Start File Table Column Headers
-				# Reads values from $file_attributes array and preferences
-				###
-				$this->t->set_var('actions',lang('select'));
-				$this->t->set_var('mini_bar','&nbsp;');
-
-
-				reset($this->bo->file_attributes);
-
-				if($this->numoffiles>0)
-				{
-					while(list($internal, $displayed) = each($this->bo->file_attributes))
-					{
-						if($this->prefs[$internal])
-						{
-							if ($internal != 'owner')
-								$col_data='<span><a href="'.$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->path.'&sortby='.$internal).'">'.$displayed.'</a></span>';
-							else
-								$col_data='<span>'.$displayed.'</span>';
-							$this->t->set_var('col_data',$col_data);
-							$this->t->parse('columns','column',True);
-						}
-					}
-
-					$this->t->set_var('row_tr_class','message_header');
-					
-					$this->t->parse('rows','row');
-					
-					$this->t->pparse('out','row');
-				}
-				else
-				{
-					$lang_nofiles=lang('No files in this directory.');
-				}
-				$vars[lang_no_files]=$lang_nofiles;
-
-
-				if($this->prefs['dotdot'] && $this->prefs['name'] && $this->path != '/')
-				{
-					$this->t->set_var('actions','');
-
-					$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->lesspath);
-
-					$col_data='<a href="'.$link.'"><img src="'.$GLOBALS['phpgw']->common->image('filemanager','mime16up').' "alt="'.lang('Folder Up').'" /></a>';
-					$col_data.='&nbsp;<a href="'.$link.'">..</a>';
-
-					$this->t->set_var('col_data',$col_data);
-					$this->t->parse('columns','column');
-
-					if($this->prefs['mime_type'])
-					{
-						$col_data=lang('Directory');
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					$this->t->set_var('row_tr_class','');
-					$this->t->parse('rows','row');
-					$this->t->pparse('out','row');
-				}
-
-				# List all of the files, with their attributes
-				@reset($this->files_array);
-				for($i = 0; $i != $this->numoffiles; $i++)
-				{
-					$files = $this->files_array[$i];
-					
-
-					if(!$this->prefs['dotfiles'] && ereg("^\.", $files['name']))
-					{
-						continue;
-					}
-
-					# Checkboxes
-					if($this->path != $this->bo->fakebase && $this->path != '/')
-					{
-						$cbox='<input type="checkbox" name="fileman" value="'.$files['name'].'">';
-						$this->t->set_var('actions',$cbox);
-					}
-					else
-					{
-						$this->t->set_var('actions','');
-					}
-					$minibar_data="";
-					if($this->can_private)
-					{
-						if ($files['type'] == "1")
-						{
-							$image = $GLOBALS['phpgw']->common->image('filemanager','button_lock');
-						}
-						else
-						{
-							$image = $GLOBALS['phpgw']->common->image('filemanager','button_unlock');
-						}
-						$link=$this->encode_href('/index.php','menuaction=filemanager.vfs_functions.setRestricted','file='.$files['name'].'&path='.$this->path);
-						$minibar_data = '<img id="restrict_'.$files['name'].'" onClick="setRestricted(\''.$link.'\')" alt="'.lang("mark as restricted").'" title="'.lang("mark as restricted").'" src="'.$image.'">';
-					}
-
-
-					if ($files['mime_type'] == "text/html")
-					{
-						$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.export','file='.$files['name'].'&path='.$this->path);
-						$image=$GLOBALS['phpgw']->common->image('filemanager','button_export');
-						$minibar_data.='<a href="'.$link.'"><img alt="'.lang("export").'" title="'.lang("export").'" src="'.$image.'"></a>';
-					}
-					else
-						$minibar_data.= "<a>&nbsp;</a>";
-					$this->t->set_var('mini_bar',$minibar_data);
-
-
-					# File name and icon
-					if($files['mime_type'] == 'Directory')
-					{
-						$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->path.$this->dispsep.$files['name']);
-
-						$icon=$this->mime_icon($files['mime_type']);
-
-						$col_data='<a href="'.$link.'">'.$icon.'</a>&nbsp;';
-						$col_data.='<a href="'.$link.'">'.$files['name'].'</a>&nbsp;';
-					}
-					else
-					{
-
-						if($this->prefs['viewonserver'] && isset($this->bo->filesdir) && !$files['link_directory'])
-						{
-							#FIXME
-							$clickview = $this->filesdir.$pwd.'/'.$files['name'];
-
-						}
-						else
-						{
-							$icon=$this->mime_icon($files['mime_type']);
-							$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.view','file='.$files['name'].'&path='.$this->path);
-							//$link=$this->encode_href('inc/download.php','file='.base64_encode($files['name']).'&path='.base64_encode($this->path));
-
-							$col_data='<a href="'.$link.'" target="'.$this->target.'">'.$icon.'</a>&nbsp;'.
-							'<a id="name_'.$files['name'].'" href="'.$link.'" target="'.$this->target.'">'.$files['name'].'</a>';
-						}
-					}
-
-
-					$this->t->set_var('col_data',$col_data);
-					$this->t->parse('columns','column');
-
-					# MIME type
-					if($this->prefs['mime_type'])
-					{
-						$col_data=$files['mime_type'];
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# File size
-					if($this->prefs['size'])
-					{
-						$tmp_arr=array(
-							'string'	=> $files['directory'] . '/' . $files['name'],
-							'relatives'	=> array(RELATIVE_NONE)
-						);
-						if($files['mime_type'] != 'Directory') $tmp_arr['checksubdirs'] = false;
-
-						$size = $this->bo->vfs->get_size($tmp_arr);
-
-						$col_data=$this->bo->borkb($size);
-
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Date created
-					if($this->prefs['created'])
-					{
-						$timestamp = $this->vfs_functions->dateString2timeStamp($files['created']);
-						if (time() - $timestamp > 86400) // Older than yesterday
-							$col_data=date("Y-m-d",$timestamp);
-						else
-							$col_data=date("H:i",$timestamp);
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Date modified
-					if($this->prefs['modified'])
-					{
-						if ($files['modified'] != ''){
-							$timestamp = $this->vfs_functions->dateString2timeStamp($files['modified']);
-							if (time() - $timestamp > 86400) // Older than yesterday
-								$col_data=date("Y-m-d",$timestamp);
-							else
-								$col_data=date("H:i",$timestamp);
-						}
-						else
-							$col_data='';
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Owner name
-					if($this->prefs['owner'])
-					{
-						$this->t->set_var('col_data',$GLOBALS['phpgw']->accounts->id2name($files['owner_id']));
-						$this->t->parse('columns','column',True);
-					}
-
-					# Creator name
-					if($this->prefs['createdby_id'])
-					{
-						$this->html_table_col_begin();
-						if($files['createdby_id'])
-						{
-							$col_data=$GLOBALS['phpgw']->accounts->id2name($files['createdby_id']);
-						}
-						else $col_data='';
-
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Modified by name
-					if($this->prefs['modifiedby_id'])
-					{
-						if($files['modifiedby_id'])
-						{
-							$col_data=$GLOBALS['phpgw']->accounts->id2name($files['modifiedby_id']);
-						}
-						else $col_data='';
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Application
-					if($this->prefs['app'])
-					{
-						$col_data=$files['app'];
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Comment
-					if($this->prefs['comment'])
-					{
-						if (strlen($files['comment']) == 0 )
-							$files['comment'] = "&lt;".lang("no comments")."&gt;";
-						$col_data='<span id="'.$files['name'].'" onClick="setComments(this)">'.$files['comment'].'</span>';
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					# Version
-					if($this->prefs['version'])
-					{
-						$link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.history','file='.$files['name'].'&path='.$this->path);
-						$col_data='<a href="'.$link.'" target="_blank">'.$files['version'].'</a>';
-						$this->t->set_var('col_data',$col_data);
-						$this->t->parse('columns','column',True);
-					}
-
-					$usedspace += $files['size'];
-
-					$this->t->set_var('row_tr_color','');
-					$this->t->parse('rows','row');
-					$this->t->pparse('out','row');
-				}
-			}
-
-			// The file and directory information
-			$vars[lang_files_in_this_dir]=lang('Files in this directory');
-			$vars[files_in_this_dir]=$this->numoffiles;
-
-			$vars[lang_used_space]=lang('Used space');
-			$vars[used_space]=$this->bo->borkb($usedspace, NULL, 1);
-
-			if($this->path == $this->bo->homedir || $this->path == $this->bo->fakebase)
-			{
-				$vars[lang_unused_space]=lang('Unused space');
-				$vars[unused_space]=$this->bo->borkb($this->bo->userinfo['hdspace'] - $usedspace, NULL, 1);
-
-				$tmp_arr=array(
-					'string'	=> $this->path,
-					'relatives'	=> array(RELATIVE_NONE)
-				);
-
-				$ls_array = $this->bo->vfs->ls($tmp_arr);
-
-				$vars[lang_total_files]=lang('Total Files');
-				$vars[total_files]=	count($ls_array);
 			}
 
@@ -1076,5 +828,5 @@
 			else
 			{
-
+ 				$this->to = $this->bo->fakebase.'/'.$this->to;
 				while(list($num, $file) = each($this->fileman))
 				{
@@ -1114,4 +866,5 @@
 			else
 			{
+				$this->to = $this->bo->fakebase.'/'.$this->to;
 				while(list($num, $file) = each($this->fileman))
 				{
@@ -1639,6 +1392,5 @@
 			if(!$img) $img=$GLOBALS['phpgw']->common->image('filemanager','mime'.$size.'_unknown');
 
-			$icon='<img src="'.$img.' "alt="'.lang($mime_type).'" />';
-			return $icon;
+			return $img;
 		}
 
Index: /sandbox/filemanager/js/draw_api.js
===================================================================
--- /sandbox/filemanager/js/draw_api.js	(revision 1704)
+++ /sandbox/filemanager/js/draw_api.js	(revision 1719)
@@ -1,2 +1,47 @@
+
+function getPointer(e) {
+	if (is_ie) {
+		DocX = event.clientX + document.body.scrollLeft;
+		DocY = event.clientY + document.body.scrollTop;
+	} else {
+		DocX = e.pageX;
+		DocY = e.pageY;
+	}
+}
+document.onmousemove = getPointer;
+
+
+function draw_menu(id,elements){
+	var menu = document.getElementById('menu_newFile'+id);
+	if (menu == null){
+		menu = document.createElement('DIV');
+		menu.id = "menu_newFile"+id;
+		menu.style.left = DocX;
+		menu.style.top = DocY;
+		//menu.style.left = left_pos+"px";
+		//menu.style.top = top_pos+"px";
+		for(j in elements)
+		{
+			if (typeof(elements[j]['img']) != 'undefined'){
+				var img = document.createElement( 'IMG' );
+				img.src = elements[j]['img'];
+				menu.appendChild(img);
+			}
+			var link = document.createElement( 'A' );
+			link.href = elements[j]['url'];
+			link.appendChild( document.createTextNode( elements[j]['text'] ) );
+			menu.appendChild(link);
+			menu.appendChild(document.createElement( 'BR' ));
+		}
+
+		menu.onmouseout = function () { menuTimeout = setTimeout("document.getElementById('menu_newFile"+id+"').style.visibility = 'hidden'",50);}
+		menu.onmouseover = function () { clearTimeout(menuTimeout); };
+		menu.className = 'menubox';
+		menu.style.zIndex='1';
+		document.getElementById('divAppboxHeader').appendChild(menu);
+	}
+	menu.style.visibility = 'visible';
+}
+
 function resizeDiv(){
 	defaultHeight = document.body.clientHeight ? document.body.clientHeight : document.body.offsetHeight;
@@ -4,20 +49,4 @@
 	document.getElementById('content_folders').style.height = defaultHeight - (is_ie ? 230 : 215);
 
-}
-function initDrawApi(){
-	cExecute ('/index.php?menuaction=filemanager.user.get_preferences', save_preferences);
-	var quotaSize = document.getElementById('quotaSize').value;
-	var usedSpace = document.getElementById('usedSpace').value;
-	var currentPath = document.getElementById('currentPath').value;
-	document.getElementById('divAppboxHeader').innerHTML = title_app;
-
-
-	if (parseInt(quotaSize) != 0)
-		document.getElementById('content_quota').innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="../phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+(usedSpace/1024/1024).toFixed(1)+'M/'+(quotaSize/1024/1024)+'M)</span></td></tr></tbody></table></td></tr></table>';
-	displayMessages();
-	resizeDiv();
-	window.onresize = resizeDiv;
-	// Disabled for now
-	// document.getElementById('main_table').style.visibility = "";
 }
 var headerMsgLock = false;
@@ -57,6 +86,181 @@
 	}
 }
-var preferences;
-function save_preferences(data){
-	preferences = unserialize(data);
-}
+
+function loadPreferences(){
+	preferencesEl = document.getElementById('userPreferences');
+	preferences = unserialize(preferencesEl.value);
+}
+
+
+function reloadFiles(newCriteria){
+	if (newCriteria == criteria)
+		order_type = (order_type=='1'?'0':'1')
+	else
+		criteria = newCriteria;
+	toolbar_control('reload');
+}
+function selectAll(el){
+	checkBoxes = document.getElementsByName('fileman');
+	if (el.checked)
+		for (i=0; i < checkBoxes.length; i++)
+			checkBoxes[i].checked = true;
+	else
+		for (i=0; i < checkBoxes.length; i++)
+			checkBoxes[i].checked = false;
+
+}
+function borkb(size){
+		kbyte = 1024;
+		mbyte = kbyte*1024;
+		gbyte = mbyte*1024;
+		if (!size)
+			size = 0;
+		if (size < kbyte)
+			return size + 'B';
+		else if (size < mbyte)
+			return parseInt(size/kbyte) + 'KB';
+		else if (size < gbyte)
+			return (size/mbyte).toFixed(1) + 'MB';
+		else
+			return parseInt(size/gbyte).toFixed(1) + 'GB';
+}
+
+function drawFiles(data){
+	var fmFileWindow = document.getElementById('fmFileWindow');
+	var files = unserialize(data);
+	fmFileWindow.innerHTML = "";
+	var newpage;
+	var td_hd = '<td style="padding-left: 2px; padding-right: 2px;" valign="middle">';
+	var sp_hd = '<span name="head" style="cursor: pointer; cursor: hand;" onclick="reloadFiles(\'';
+	var sp_tl = '</span></td>';
+	newpage = '<table cellspacing="0" cellpadding="2"><tbody><tr class="message_header">';
+	newpage += td_hd+'<input onclick="selectAll(this)" type="checkbox"></td><td></td><td></td>';
+	newpage += td_hd+sp_hd+'name\')" id="name">'+get_lang('file name')+sp_tl;
+    	if (preferences.mime_type =='1')
+		newpage += td_hd+sp_hd+'mime\')" id="mime">'+get_lang('mime type')+sp_tl;
+	if (preferences.size =='1')
+		newpage += td_hd+sp_hd+'size\')" id="size">'+get_lang('size')+'</a>'+sp_tl;
+	if (preferences.created =='1')
+		newpage += td_hd+sp_hd+'created\')" id="created">'+get_lang('created')+'</a>'+sp_tl;
+	if (preferences.modified =='1')
+		newpage += td_hd+sp_hd+'modified\')" id="modified">'+get_lang('modified')+'</a>'+sp_tl;
+	if (preferences.owner =='1')
+		newpage += td_hd+sp_hd+'owner\')" id="owner">'+get_lang('owner')+'</a>'+sp_tl;
+	if (preferences.createdby_id =='1')
+		newpage += td_hd+sp_hd+'creatdby\')" id="creatdby">'+get_lang('created by')+'</a>'+sp_tl;
+	if (preferences.modifiedby_id =='1')
+		newpage += td_hd+sp_hd+'modifdby\')" id="modifdby">'+get_lang('modified by')+'</a>'+sp_tl;
+	if (preferences.comment =='1')
+		newpage += td_hd+sp_hd+'comm\')" id="comm">'+get_lang('comment')+'</a>'+sp_tl;
+	if (preferences.version =='1') newpage += td_hd+sp_hd+'vers\')" id="vers">'+get_lang('version')+'</a>'+sp_tl+'</tr>';
+	
+	var classTr = "tr_msg_read";
+	for (var i=0; i < files.length; i++)
+	{
+		newpage += '<tr class="'+classTr+'">'+td_hd;
+		newpage += '<input name="fileman" value="'+files[i].name+'" type="checkbox"></td>';
+		if (permissions['private']) {
+			newpage += '<td><img id="restrict_'+files[i].name+'" onclick="setRestricted(\''+files[i].name+'\')" ';
+			newpage += 'src="'+templatePath+'images/button_'+(files[i].pub == '1'?'lock':'unlock')+'.png"></td>';
+		}
+		else
+			newpage += '<td></td>';
+
+		if (files[i].mime == 'text/html')
+			newpage += '<td><a href="/index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(files[i].name)+';path='+base64_encode(currentPath)+'"><img alt="'+get_lang('export')+'" title="'+get_lang('export')+'" src="'+templatePath+'images/button_export.png"></a></td>';
+		else
+			newpage += '<td></td>';
+		newpage += td_hd+'<img src="'+(files[i].icon)+'">';
+		newpage += '<a id="name_'+files[i].name+'" href="/index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+files[i].name+'</a>&nbsp;</td>';
+		if (preferences.mime_type =='1') newpage += td_hd+files[i].mime+'</td>';
+		if (preferences.size =='1') newpage += td_hd+borkb(files[i].size)+'</td>';
+		if (preferences.created =='1') newpage += td_hd+files[i].creatd+'</td>';
+		if (preferences.modified =='1') newpage += td_hd+files[i].modifd+'</td>';
+		if (preferences.owner =='1') newpage += td_hd+files[i].owner+'</td>';
+		if (preferences.createdby_id =='1') newpage += td_hd+files[i].creatdby+'</td>';
+		if (preferences.modifiedby_id =='1') newpage += td_hd+files[i].modifdby+'</td>';
+		if (files[i].comm == null || files[i].comm.length == 0)
+			files[i].comm = "&lt;"+get_lang("no comments")+"&gt;";
+		if (preferences.comment =='1') newpage += td_hd+'<span id="'+files[i].name+'" onclick="setComments(this)">'+files[i].comm+'</span></td>';
+		if (preferences.version =='1') newpage += td_hd+'<span onclick="loadHistory(\''+files[i].name+'\')">'+files[i].vers+'</span></td></tr>';
+		// /index.php?menuaction=filemanager.uifilemanager.history&amp;file=MDAxMC5lbWw%253D&amp;path=L2hvbWUvem9yZWlh 
+		classTr = (classTr == "tr_msg_read"?"tr_msg_read2":"tr_msg_read");
+
+	}
+	fmFileWindow.innerHTML = newpage;
+	header = document.getElementsByName('head');
+	for (var i=0; i < header.length; i++)
+	{
+		if (header[i].id == criteria){
+			header[i].style.fontWeight = 'bold';
+			arrow = document.createElement('IMG');
+			if (order_type == '1')
+				arrow.src = templatePath+'images/arrow_ascendant.gif';
+			else
+				arrow.src = templatePath+'images/arrow_descendant.gif';
+			header[i].appendChild(arrow);
+		}
+	}
+}
+
+
+function loadToolbar(){
+	if (permissions['read'] == 0)
+		return;
+	var toolbar = document.getElementById('fmMenu');
+	var pageContent = '<table><tbody><tr>';
+	var createButton = function(name) { return '<td name="'+name+'" class="toolButton" onclick="toolbar_control(\''+name+'\');" title="'+name+'"><img src="'+templatePath+'images/button_'+name+'.png" alt="'+name+'"><small>'+get_lang(name.replace('_',' '))+'</small></td>'; }
+
+	if (permissions['edit'] != 0){
+		pageContent += createButton('edit');
+		pageContent += createButton('rename');
+	}
+	if (permissions['delete'] != 0){
+		pageContent += createButton('delete');
+		pageContent += createButton('move_to');
+	}
+	pageContent += createButton('copy_to');
+
+	toolbar.innerHTML = pageContent+'</tr></tbody></table>';
+
+
+}
+
+function loadPermissions(data){
+	var permission = parseInt(data);
+	var ACL_READ = 1;
+	var ACL_ADD = 2;
+	var ACL_EDIT = 4;
+	var ACL_DELETE = 8;
+	var ACL_PRIVATE = 16;
+
+	permissions['read']=(permission & ACL_READ);
+	permissions['add']=(permission & ACL_ADD);
+	permissions['edit']=(permission & ACL_EDIT);
+	permissions['delete']=(permission & ACL_DELETE);
+	permissions['private']=(permission & ACL_PRIVATE);
+	loadToolbar();
+	loadPreferences();
+	toolbar_control('reload');
+}
+
+function initDrawApi(){
+	currentPath = document.getElementById('currentPath').value;
+	cExecute('/index.php?menuaction=filemanager.uifilemanager.get_permissions&path='+base64_encode(currentPath),loadPermissions);
+	quotaSize = document.getElementById('quotaSize').value;
+	usedSpace = document.getElementById('usedSpace').value;
+
+	document.getElementById('divAppboxHeader').innerHTML = title_app;
+
+	if (parseInt(quotaSize) != 0)
+		document.getElementById('content_quota').innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="../phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+(usedSpace/1024/1024).toFixed(1)+'M/'+(quotaSize/1024/1024)+'M)</span></td></tr></tbody></table></td></tr></table>';
+	displayMessages();
+	resizeDiv();
+	window.onresize = resizeDiv;
+	document.body.style.overflow = "hidden";
+
+	// Disabled for now
+	// document.getElementById('main_table').style.visibility = "";
+
+}
+
Index: /sandbox/filemanager/js/uploadForm.js
===================================================================
--- /sandbox/filemanager/js/uploadForm.js	(revision 1694)
+++ /sandbox/filemanager/js/uploadForm.js	(revision 1719)
@@ -16,5 +16,5 @@
 		document.getElementById('button_up').style.visibility = "hidden";
 		var line = document.getElementById('uploadOption');
-		line.parentNode.innerHTML = "<img src='./filemanager/templates/default/images/progress.gif'>";
+		line.parentNode.innerHTML = "<img src='"+templatePath+"images/progress.gif'>";
 }
 
Index: /sandbox/filemanager/js/connector.js
===================================================================
--- /sandbox/filemanager/js/connector.js	(revision 1704)
+++ /sandbox/filemanager/js/connector.js	(revision 1719)
@@ -43,7 +43,7 @@
 	var div = document.getElementById('divProgressBar');
 
-	if(! div) {                                                                                           
+	if(! div) {
 		div = document.createElement("DIV");
-		div.style.visibility    = "hidden";
+		//div.style.visibility	= "hidden";
 		div.style.width = "103px";
 		div.id = 'divProgressBar';
@@ -54,5 +54,5 @@
 		div.style.top = '0px';
 		div.style.right = '0px';
-		document.body.appendChild(div);                                                               
+		document.body.appendChild(div);
 
 		if(is_ie) {
@@ -81,5 +81,4 @@
 	if (! div){
 		connector.buildBar();
-		connector.showProgressBar();
 		return;
 	}
@@ -115,4 +114,9 @@
 
 function cExecute(requestURL,handler){
+	if (connector.isVisibleBar == true){
+		setTimeout('cExecute("'+requestURL+'",'+handler+')',150);
+		return;
+	}
+	connector.showProgressBar();
 	var AjaxRequest = function () {
 		Ajax = false;
@@ -131,6 +135,8 @@
 	var responseRequest = function (){
 		if (Ajax.readyState == 4)
-			if (Ajax.status == 200)
+			if (Ajax.status == 200){
 				handler(Ajax.responseText);
+				connector.hideProgressBar();
+			}
 			else
 				throw("Connection error!");
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1704)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1719)
@@ -1,35 +1,5 @@
-var menuTimeout;
-/* draw_menu(id of menu, left position, top position, menu elements) */
-function draw_menu(id,left_pos,top_pos,elements){
-	var menu = document.getElementById('menu_newFile'+id);
-	if (menu == null){
-		menu = document.createElement('DIV');
-		menu.id = "menu_newFile"+id;
-		menu.style.left = left_pos+"px";
-		menu.style.top = top_pos+"px";
-		for(j in elements)
-		{
-			if (typeof(elements[j]['img']) != 'undefined'){
-				var img = document.createElement( 'IMG' );
-				img.src = elements[j]['img'];
-				menu.appendChild(img);
-			}
-			var link = document.createElement( 'A' );
-			link.href = elements[j]['url'];
-			link.appendChild( document.createTextNode( elements[j]['text'] ) );
-			menu.appendChild(link);
-			menu.appendChild(document.createElement( 'BR' ));
-		}
-
-		menu.onmouseout = function () { menuTimeout = setTimeout("document.getElementById('menu_newFile"+id+"').style.visibility = 'hidden'",50);}
-		menu.onmouseover = function () { clearTimeout(menuTimeout); };
-		menu.className = 'menubox';
-		menu.style.zIndex='1';
-		document.getElementById('divAppboxHeader').appendChild(menu);
-	}
-	menu.style.visibility = 'visible';
-}
 function load(path){
-	window.location = "/index.php?menuaction=filemanager.uifilemanager.index&path="+base64_encode(path);
+	currentPath = path;
+	cExecute('/index.php?menuaction=filemanager.uifilemanager.get_permissions&path='+base64_encode(path),loadPermissions);
 }
 
@@ -55,5 +25,5 @@
 			address = address.split("?");
 			elements[2]['url'] = address[0]+"?menuaction=filemanager.uifilemanager.index&upload=clicked&upload.x=1&path="+base64_encode(currentPath);
-			draw_menu(arg,50,130,elements);
+			draw_menu(arg,elements);
 			break;
 		case 'rename':
@@ -69,5 +39,5 @@
 					var filename = nameLink.innerHTML;
 					inputName.value = filename;
-					inputName.onblur = function () { cExecute('/index.php?menuaction=filemanager.vfs_functions.rename&file='+base64_encode(this.id.substr(6))+'&to='+base64_encode(this.value)+"&path="+base64_encode(currentPath.value),updateRename) };
+					inputName.onblur = function () { cExecute('/index.php?menuaction=filemanager.vfs_functions.rename&file='+base64_encode(this.id.substr(6))+'&to='+base64_encode(this.value)+"&path="+base64_encode(currentPath),updateRename) };
 					nameLink.parentNode.appendChild(inputName);
 					nameLink.parentNode.removeChild(nameLink);
@@ -113,5 +83,5 @@
 
 			cExecute('/index.php?menuaction=filemanager.vfs_functions.delete&path='+
-					base64_encode(currentPath.value)+filesUrl,handlerDelete);
+					base64_encode(currentPath)+filesUrl,handlerDelete);
 			break;
 		case 'move_to':
@@ -133,21 +103,23 @@
 			}
 			var elements = new Array();
-			inputEl = document.getElementsByName('todir');
-			for(i=0; i< inputEl[0].childNodes.length; i++)
+			inputEl = document.getElementById('content_folders');
+			for(i=0; i< inputEl.childNodes.length; i++)
 			{
+				if (inputEl.childNodes[i].nodeName != 'SPAN')
+					continue;
 				elements[i] = new Array();
-				elements[i]['text'] =inputEl[0].childNodes[i].innerHTML;
+				elements[i]['text']=inputEl.childNodes[i].innerHTML;
 				address = document.location.toString();
 				address = address.split("&");
 				elements[i]['url'] = address[0]+
 					"&"+escape(arg)+".x=10"+
-					"&to="+base64_encode(inputEl[0].childNodes[i].innerHTML)+
+					"&to="+base64_encode(inputEl.childNodes[i].innerHTML)+
 					filesUrl;
 
 			}
-			draw_menu(arg,button.offsetLeft+220,button.parentNode.offsetTop-20,elements);
+			draw_menu(arg,elements);
 			break;
 		case 'reload':
-			window.location = "/index.php?menuaction=filemanager.uifilemanager.index&path="+base64_encode(currentPath);
+			cExecute('/index.php?menuaction=filemanager.uifilemanager.dir_ls&path='+base64_encode(currentPath)+'&criteria='+criteria+'&otype='+order_type,drawFiles);
 			return;
 		case 'tools':
@@ -156,5 +128,5 @@
                         elements[0]['text'] = get_lang('Preferences');
                         elements[0]['url'] = 'preferences/preferences.php?appname=filemanager';
-			elements[0]['img'] = 'filemanager/templates/default/images/preferences.png';
+			elements[0]['img'] = templatePath+'images/preferences.png';
                         elements[1] = new Array();
                         elements[1]['text'] = get_lang('Search');
@@ -162,20 +134,20 @@
 						document.getElementById("menu_newFiletools").style.visibility="hidden";\
 						document.getElementById("em_message_search").focus();';
-			elements[1]['img'] = 'filemanager/templates/default/images/search.gif';
+			elements[1]['img'] = templatePath+'images/search.gif';
                         /*
 			elements[2] = new Array();
                         elements[2]['text'] = get_lang('Edit Folders');
                         elements[2]['url'] = 'javascript:EditFolders()';
-			elements[2]['img'] = 'filemanager/templates/default/images/mime16_directory.png';
+			elements[2]['img'] = 'images/mime16_directory.png';
 			*/
                         elements[3] = new Array();
                         elements[3]['text'] = get_lang('Share Folders');
                         elements[3]['url'] = "index.php?menuaction=preferences.uiaclprefs.index&acl_app=filemanager";
-			elements[3]['img'] = 'filemanager/templates/default/images/mime16_directory.png';
+			elements[3]['img'] = templatePath+'images/mime16_directory.png';
                         elements[4] = new Array();
                         elements[4]['text'] = get_lang('Edit Columns');
                         elements[4]['url'] = "javascript:EditColumns()";
-			elements[4]['img'] = 'filemanager/templates/default/images/editpaste.png';
-                        draw_menu(arg,50,190,elements);
+			elements[4]['img'] = templatePath+'images/editpaste.png';
+                        draw_menu(arg,elements);
 			break;
 		default:
@@ -301,8 +273,8 @@
 
 
-function setRestricted(link){
+function setRestricted(name){
 	var continue_set = confirm(get_lang('This property will change the visibility of all users that have access to this file, continue?'));
 	if (continue_set)
-		cExecute(link,setRestricted_handler);
+		cExecute('/index.php?menuaction=filemanager.vfs_functions.setRestricted&file='+base64_encode(name)+'&path='+base64_encode(currentPath),setRestricted_handler);
 }
 
@@ -391,5 +363,5 @@
 		var inputName = document.getElementById('input_'+returnVal[1]);
 		nameLink.innerHTML = returnVal[2];
-		nameLink.href="./index.php?menuaction=filemanager.uifilemanager.view&file="+base64_encode(returnVal[2])+"&path="+base64_encode(currentPath.value);
+		nameLink.href="./index.php?menuaction=filemanager.uifilemanager.view&file="+base64_encode(returnVal[2])+"&path="+base64_encode(currentPath);
 		inputName.parentNode.appendChild(nameLink);
 		inputName.parentNode.removeChild(inputName);
@@ -426,5 +398,5 @@
 				preferences[checkBoxes[i].value] = '0';
 		}
-		cExecute('/index.php?menuaction=filemanager.user.save_preferences&preferences='+base64_encode(serialize(preferences)),function () { toolbar_control('reload') })
+		cExecute('/index.php?menuaction=filemanager.user.save_preferences&preferences='+base64_encode(serialize(preferences)),function () { toolbar_control('reload'); EditColumns('close'); })
 		return;
 	}
Index: /sandbox/filemanager/js/global.js
===================================================================
--- /sandbox/filemanager/js/global.js	(revision 1627)
+++ /sandbox/filemanager/js/global.js	(revision 1719)
@@ -6,2 +6,16 @@
 '</tr></table>';
 
+var currentPath = "";
+var quotaSize;
+var usedSpace;
+
+var templatePath = '/filemanager/templates/default/';
+
+var menuTimeout;
+var DocX,DocY;
+var criteria='name';
+var order_type = '1'; // Ascending is 1, descending is 0
+
+// Store permissions of current path use it BUT DO NOT rely on it
+var permissions = new Array();
+var preferences = new Array();
Index: /sandbox/filemanager/templates/default/main.tpl
===================================================================
--- /sandbox/filemanager/templates/default/main.tpl	(revision 1719)
+++ /sandbox/filemanager/templates/default/main.tpl	(revision 1719)
@@ -0,0 +1,70 @@
+<!-- BEGIN filemanager_header -->
+{css}
+{usedSpace}
+{quotaSize}
+{path}
+<table id="main_table" width="100%" cellspacing="0" cellpadding="0" border="0">
+<tbody>
+<tr>
+<td id="folderscol" width="162px" height="100%" valign="top">
+	<table id="folders_tbl" width="162px" border="0" cellspacing="0" cellpadding="0" border="0">
+	<tbody>
+		<tr>
+			<td class='content-menu'>
+			<div id="search_div" align="left" style="white-space:nowrap">
+			<input type="text" id="em_message_search" size="16" maxlength="22" />
+			<img style="vertical-align: bottom;" src="./filemanager/templates/default/images/search.gif">
+			</div>
+			<table border="0" cellspacing="0" cellpadding="0" border="0" style="width:100%">
+			<tbody>
+			<tr height="24">
+			<td class='content-menu-td'>
+			{new_button}
+			</td>
+		</tr>
+
+		<tr height="24">
+			<td class='content-menu-td'>
+			{refresh_button}
+			</td>
+		</tr>
+
+		<tr height="24">
+			<td>
+			{tools_button}
+			</td>
+		</tr>
+	</tbody>
+	</table>
+		</td>
+		</tr>
+    		<tr>
+			<td height="2px"></td>
+		</tr>
+		<tr>
+                        <td class="image-menu" valign="top" style="padding:0px">
+                                <div id="content_folders" class="menu-degrade" style="height:100%;width:170px;overflow:auto">{folders}</div>
+                        </td>
+                </tr>
+	</tbody>
+	</table>
+<td>
+<div id="formfm" name="formfm">
+<div id="fmFileWindow">
+<table cellspacing="0" cellpadding="2">
+<tbody>
+<!-- END filemanager_header -->
+</td>
+</tr>
+</tbody>
+</table>
+<!-- BEGIN filemanager_footer -->
+</tbody></table>
+</div>
+<div id="fmMenu">
+</div>
+<div style="visibility: hidden" id="allMessages">{messages}</div>
+</div>
+{script}
+{preferences}
+<!-- END filemanager_footer -->
Index: /sandbox/filemanager/templates/default/main.css
===================================================================
--- /sandbox/filemanager/templates/default/main.css	(revision 1704)
+++ /sandbox/filemanager/templates/default/main.css	(revision 1719)
@@ -1,2 +1,9 @@
+a:link,
+a:active,
+a:visited,
+a:hover {
+	color: #000000 !important;
+	text-decoration: none !important;
+}
 
 .menubox{
@@ -12,4 +19,7 @@
     width: 160px;
     text-align: left;
+    line-height:150%;
+    margin: -10px 0  -10px 0;
+
 }
 .action_info_th {
Index: ndbox/filemanager/templates/default/filelisting.tpl
===================================================================
--- /sandbox/filemanager/templates/default/filelisting.tpl	(revision 1704)
+++ 	(revision )
@@ -1,87 +1,0 @@
-<!-- BEGIN filemanager_header -->
-{usedSpace}
-{quotaSize}
-{path}
-{css}
-<table id="main_table" width="100%" cellspacing="0" cellpadding="0" border="0">
-<tbody>
-<tr>
-<td id="folderscol" width="162px" height="100%" valign="top">
-	<table id="folders_tbl" width="162px" border="0" cellspacing="0" cellpadding="0" border="0">
-	<tbody>
-		<tr>
-			<td class='content-menu'>
-			<div id="search_div" align="left" style="white-space:nowrap">
-			<input type="text" id="em_message_search" size="16" maxlength="22" />
-			<img style="vertical-align: bottom;" src="./filemanager/templates/default/images/search.gif">
-			</div>
-			<table border="0" cellspacing="0" cellpadding="0" border="0" style="width:100%">
-			<tbody>
-			<tr height="24">
-			<td class='content-menu-td'>
-			{new_button}
-			</td>
-		</tr>
-
-		<tr height="24">
-			<td class='content-menu-td'>
-			{refresh_button}
-			</td>
-		</tr>
-
-		<tr height="24">
-			<td>
-			{tools_button}
-			</td>
-		</tr>
-	</tbody>
-	</table>
-		</td>
-		</tr>
-    		<tr>
-			<td height="2px"></td>
-		</tr>
-		<tr>
-                        <td class="image-menu" valign="top" style="padding:0px">
-                                <div id="content_folders" class="menu-degrade" style="height:100%;width:170px;overflow:auto">{folders}</div>
-                        </td>
-                </tr>
-	</tbody>
-	</table>
-<td>
-<form id="formfm" name="formfm" method="post" action="{form_action}">
-<div id="fmFileWindow">
-<table cellspacing="0" cellpadding="2">
-<tbody>
-<!-- END filemanager_header -->
-
-<!-- BEGIN column -->
-  <td valign="middle" style="padding-left:2px;padding-right:2px;">{col_data}&nbsp;</td>
-<!-- END column -->
-
-<!-- BEGIN row -->
-	<tr class="{row_tr_class}">
-		<td valign="middle" style="padding-left:2px;padding-right:2px;">{actions}{mini_bar}</td>
-		{columns}
-<!-- END row -->
-</td>
-</tr>
-</tbody>
-</table>
-<!-- BEGIN filemanager_footer -->
-{lang_no_files}
-</tbody></table>
-</div>
-<div id="fmMenu">
-<table cellspacing="10" cellpadding="0" border="0">
-<tbody><tr>
-{toolbar1}
-</tr>
-</tbody>
-</table>
-</div>
-<div id="fmStatusBar"><b>{lang_files_in_this_dir}:</b> {files_in_this_dir} <b>{lang_used_space}: </b> {used_space}</div>
-<div style="visibility: hidden" id="allMessages">{messages}</div>
-</form>
-{script}
-<!-- END filemanager_footer -->
