Index: /sandbox/filemanager/inc/class.vfs_functions.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.vfs_functions.inc.php	(revision 1896)
+++ /sandbox/filemanager/inc/class.vfs_functions.inc.php	(revision 1924)
@@ -221,5 +221,5 @@
 		function summary()
 		{
-			header('Content-Type: image/gif');
+			header('Content-Type: image/png');
 			$expires = 60*60*24*15;
 			header("Cache-Control: maxage=".$expires);
@@ -233,5 +233,5 @@
 				if (strlen($content) < 1)
 				{
-					$filename = './filemanager/templates/default/images/error.gif';
+					$filename = './filemanager/templates/default/images/error.png';
 					$handle = fopen($filename,'rb');
 					$content = fread($handle,filesize($filename));
Index: /sandbox/filemanager/inc/upload.php
===================================================================
--- /sandbox/filemanager/inc/upload.php	(revision 1920)
+++ /sandbox/filemanager/inc/upload.php	(revision 1924)
@@ -50,5 +50,5 @@
 	imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
 	ob_start();
-	imagegif($image_new);
+	imagepng($image_new);
 	$content = ob_get_clean();
 	return $content;
Index: /sandbox/filemanager/js/drag_area.js
===================================================================
--- /sandbox/filemanager/js/drag_area.js	(revision 1895)
+++ /sandbox/filemanager/js/drag_area.js	(revision 1924)
@@ -7,8 +7,14 @@
 	this.initEvent;
 	this.endEvent;
-	this.currentEvent;
+	this.operation;
 }
 
-document.onmousemove = function(event) { _dragArea.moveWindow(event); }
+document.onmousemove = function(event) {
+	getPointer(event);
+	if (_dragArea.operation == 'drag')
+		_dragArea.dragObj(event);
+	else
+		_dragArea.moveWindow(event);
+}
 document.onmousedown = function(event) {_dragArea.pressed = 1; };
 document.onmouseup = function(event) { _dragArea.pressed = 0 };
@@ -16,5 +22,4 @@
 counter = 0;
 DragArea.prototype.moveWindow = function(e) {
-	getPointer(e);
 	if (this.pressed){
 		var elem =  document.getElementById('dwindow'); // FIXME do not use getElement here
@@ -26,3 +31,39 @@
 	}
 }
+
+DragArea.prototype.dragObj = function(e){
+        var _event  = is_ie ? window.event : e;
+	var _target = is_ie ? _event.srcElement : _event.target;
+
+	if (this.pressed)
+	{
+		var sign = document.getElementById('dragSign');
+		if (sign == null)
+		{
+			sign = document.createElement('SPAN');
+			sign.className = 'dragSign';
+			sign.id = 'dragSign';
+			document.body.appendChild(sign);
+		}
+		sign.innerHTML = get_lang("Drag and drop to move");
+		sign.style.left = (_event.clientX + 2) + "px";
+		sign.style.top = (_event.clientY + 2) + "px";
+		sign.style.position = 'absolute';
+	}
+	else{
+		this.operation = "";
+		var sign = document.getElementById('dragSign');
+		if (sign == null)
+			return;
+		sign.parentNode.removeChild(sign);
+		if(_target.tagName == 'SPAN'){
+			var filesUrl = toolbar.getCheckedFiles();
+			var path = _target.id.replace(/main$/g,'').substr(1);
+			if (filesUrl.length > 1 && path.length > 1)
+				move_to(path,filesUrl);
+		}
+	}
+}
+
+
 var _dragArea = new DragArea();
Index: /sandbox/filemanager/js/draw_api.js
===================================================================
--- /sandbox/filemanager/js/draw_api.js	(revision 1922)
+++ /sandbox/filemanager/js/draw_api.js	(revision 1924)
@@ -229,5 +229,6 @@
 folderList.prototype.createLine = function(file){
 		var fl = folderList;
-		retBuff = fl.td;
+		retBuff = '<tr id="line_'+file.name+'" onmouseout="clearTimeout(menuTimeout)" onmousedown="check(this);_dragArea.operation=\'drag\'">';
+		retBuff += fl.td;
 		retBuff += '<input name="fileman" value="'+file.name+'" type="checkbox"></td>';
 		if (permissions['private']) {
@@ -241,8 +242,8 @@
 		{
 			case 'text/html':
-				retBuff += '<td><a href="./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'"><div alt="'+get_lang('export')+'" title="'+get_lang('export')+'" style="background-image:url('+templatePath+'images/button_export.png);background-repeat: repeat-none;width:13px;height:12px;"></div></a></td>';
+				retBuff += '<td><a href="./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'"><div class="exportButton" alt="'+get_lang('export')+'" title="'+get_lang('export')+'"></div></a></td>';
 				break;
 			case 'application/zip':
-				retBuff += '<td><a href="javascript:unarchive(\''+file.name+'\')"><div alt="'+get_lang('unarchive')+'" title="'+get_lang('unarchive')+'" style="background-image:url('+templatePath+'images/button_export.png);background-repeat: repeat-none;width:13px;height:12px;"></a></td>'
+				retBuff += '<td><div class="exportButton" onclick="unarchive(\''+file.name+'\')" alt="'+get_lang('unarchive')+'" title="'+get_lang('unarchive')+'"></a></td>'
 				break;
 			default:
@@ -301,4 +302,5 @@
 		if (preferences.comment =='1') retBuff += fl.td+'<input id="'+file.name+'" class="inputComment" onkeydown="enterComments(event,this)" onclick="presetComments(this)" onblur="setComments(this)" value="'+(file.comm==null?'':file.comm)+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>';
 		if (preferences.version =='1') retBuff += fl.td+'<span onclick="loadHistory(\''+file.name+'\')">'+file.vers+'</span></td>';
+		retBuff += "</tr>";
 		return retBuff;
 }
@@ -323,5 +325,5 @@
 			newicon = '<div class="icon">';
 			newicon += '<a href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(currentPath)+'" target="_blank">';
-			newicon += '<img src="'+(files[i].icon)+'">';
+			newicon += '<div style="width:64; height:64; background-image:url('+files[i].icon+'); background-repeat: no-repeat;"></div>';
 			newicon += '<span class="iconCaption">'+files[i].name+'</span>';
 			newicon += '</a></div>';
@@ -358,7 +360,5 @@
 			for (var i=0; i < files.length; i++)
 			{
-				newpage += '<tr>';
 				newpage += fl.createLine(files[i]);
-				newpage += '</tr>';
 			}
 		else
@@ -421,4 +421,22 @@
 	this.element.innerHTML = pageContent+'</tr></tbody></table>';
 
+}
+toolbar.prototype.getCheckedFiles = function () {
+	filesUrl = "";
+	var one_checked = false;
+	files=document.getElementsByName('fileman');
+	var j=0;
+	for (i = 0; i <  files.length; i++)
+		if (files[i].checked){
+			one_checked = true;
+			filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value);
+			j++;
+		}
+	if (!one_checked)
+	{
+		write_msg(get_lang('Please select a file'));
+		return;
+	}
+	return filesUrl;
 }
 toolbar.prototype.control = function (arg)
@@ -482,39 +500,10 @@
 			break;
 		case 'delete':
-			filesUrl = "";
-			var one_checked = false;
-			files=document.getElementsByName('fileman');
-			var j=0;
-			for (i = 0; i <  files.length; i++)
-				if (files[i].checked){
-					one_checked = true;
-					filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value);
-					j++;
-				}
-			if (!one_checked)
-			{
-				write_msg(get_lang('Please select a file'));
-				return;
-			}
-
+			var filesUrl = this.getCheckedFiles();
 			cExecute('./index.php?menuaction=filemanager.vfs_functions.delete&path='+
 					base64_encode(currentPath)+filesUrl,handler.del);
 			break;
 		case 'archive':
-			filesUrl = "";
-			var one_checked = false;
-			files=document.getElementsByName('fileman');
-			var j=0;
-			for (i = 0; i <  files.length; i++)
-				if (files[i].checked){
-					one_checked = true;
-					filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value);
-					j++;
-				}
-			if (!one_checked)
-			{
-				write_msg(get_lang('Please select a file'));
-				return;
-			}
+			var filesUrl = this.getCheckedFiles();
 			password = prompt(get_lang('Please, type a strong password (suggestion: at least 8 characters, letters and numbers) or leave it empty to archive only'));
 			if (password == null)
@@ -534,20 +523,6 @@
 		case 'move_to':
 		case 'copy_to':
-			filesUrl = "";
-			var one_checked = false;
-			files=document.getElementsByName('fileman');
-			var j=0;
-			for (i = 0; i <  files.length; i++)
-				if (files[i].checked){
-					one_checked = true;
-					filesUrl += "&fileman["+j+"]="+files[i].value;
-					j++;
-				}
-			if (!one_checked)
-			{
-				write_msg(get_lang('Please select a file'));
-				return;
-			}
-			var elements = new Array();
+			 var filesUrl = this.getCheckedFiles();
+			 var elements = new Array();
 			for(i=0; i< folders.length; i++)
 			{
@@ -565,30 +540,23 @@
 		case 'tools':
 			elements = new Array();
-			elements[0] = new Array();
-			elements[0]['text'] = get_lang('Preferences');
-			elements[0]['url'] = 'preferences/preferences.php?appname=filemanager';
-			elements[0]['img'] = templatePath+'images/preferences.png';
-			elements[1] = new Array();
-			elements[1]['text'] = get_lang('Search');
-			elements[1]['url'] = 'javascript:\
-				document.getElementById("menu_newFiletools").style.visibility="hidden";\
-				document.getElementById("em_message_search").focus();';
-			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'] = templatePath+'images/button_createdir.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'] = templatePath+'images/mime16_directory.png';
-			elements[4] = new Array();
-			elements[4]['text'] = get_lang('View');
-			elements[4]['url'] = "javascript:EditColumns()";
-			elements[4]['img'] = templatePath+'images/editpaste.png';
-			elements[5] = new Array();
-			elements[5]['text'] = get_lang('Archive');
-			elements[5]['url'] = "javascript:toolbar.control('archive')";
-			elements[5]['img'] = templatePath+'images/button_zip.png';
+			elements[0] = { 'text' : get_lang('Preferences'),
+					'url' : 'preferences/preferences.php?appname=filemanager',
+					'img' : templatePath+'images/preferences.png'};
+			elements[1] = { 'text' : get_lang('Search'),
+					'url' : 'javascript:document.getElementById("menu_newFiletools").style.visibility="hidden";\
+						document.getElementById("em_message_search").focus();',
+					'img' : templatePath+'images/search.gif'};
+			elements[2] = { 'text' : get_lang('Edit Folders'),
+					'url' : 'javascript:editFolders()',
+					'img' : templatePath+'images/button_createdir.png'};
+			elements[3] = { 'text' : get_lang('Share Folders'),
+					'url' : "./index.php?menuaction=preferences.uiaclprefs.index&acl_app=filemanager",
+					'img' : templatePath+'images/mime16_directory.png'};
+			elements[4] = { 'text' : get_lang('View'),
+					'url' : "javascript:EditColumns()",
+					'img' : templatePath+'images/editpaste.png'};
+			elements[5] = {'text' : get_lang('Archive'),
+					'url' : "javascript:toolbar.control('archive')",
+					'img' : templatePath+'images/button_zip.png'};
 			draw_menu(arg,elements);
 			break;
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1922)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1924)
@@ -7,4 +7,8 @@
 	el.className = "sl";
 	toolbar.control('reload');
+}
+
+function check(element){
+	element.firstChild.firstChild.checked = true;
 }
 
Index: /sandbox/filemanager/templates/default/main.css
===================================================================
--- /sandbox/filemanager/templates/default/main.css	(revision 1922)
+++ /sandbox/filemanager/templates/default/main.css	(revision 1924)
@@ -25,7 +25,6 @@
 .icon {
 	float:left;
-	padding-right: 25px;
-	padding-top: 40px;
-	width: 140px;
+	padding: 40px;
+	width: 100px;
 	display:table-cell;
 }
@@ -35,6 +34,5 @@
 	font-size:10px;
 	overflow:hidden;
-	position:fixed;
-	width:140px;
+	width:100%;
 
 }
@@ -132,4 +130,9 @@
 }
 
+.dragSign{
+	background-color:#f5f5f5;
+	border: 1px solid black;
+	font-color: green;
+}
 
 .message_header {
@@ -154,2 +157,12 @@
 	background: transparent !important;
 }
+
+.exportButton{
+	background-image:url('../../templates/default/images/button_export.png');
+	background-repeat: repeat-none;
+	width:13px;
+	height:12px;
+	cursor: pointer;
+	cursor: hand;
+}
+
