--- C:/Documents and Settings/John/Bureau/imce-6.x-1.2.tar/imce/js/imce.js	Sun Jul 13 13:34:48 2008
+++ C:/Documents and Settings/John/Bureau/imce/js/imce.js	Wed Aug 05 14:35:34 2009
@@ -160,9 +160,10 @@
 //return a file object containing all properties.
 fileGet: function (fid) {
   var row = imce.fids[fid];
+  var url = (imce.conf.frelurl) ? imce.getRelURL(fid) : imce.getURL(fid);
   return row ? {
     name: imce.decode(fid),
-    url: imce.getURL(fid),
+    url: url,
     size: row.cells[1].innerHTML,
     bytes: row.cells[1].id * 1,
     width: row.cells[2].innerHTML * 1,
@@ -627,6 +628,11 @@
 getURL: function (fid) {
   var path = (imce.conf.dir == '.' ? '' : imce.conf.dir +'/') + fid;
   return imce.conf.furl +'/'+ (imce.conf.clean && imce.conf.prvt ? path.replace(/%(23|26)/g, '%25$1') : path);
+},
+//get true file url. re-encode & and # for mod rewrite
+getRelURL: function (fid) {
+  var path = (imce.conf.dir == '.' ? '' : imce.conf.dir +'/') + fid;
+  return imce.conf.frelurl +'/'+ (imce.conf.clean && imce.conf.prvt ? path.replace(/%(23|26)/g, '%25$1') : path);
 },
 //el. by id
 el: function (id) {
