Index: modules/imageflow/imageflow.js
===================================================================
--- modules/imageflow/imageflow.js	(revision 478)
+++ modules/imageflow/imageflow.js	(revision 701)
@@ -119,7 +119,28 @@
 
 			/* Still hide images until they are processed, but set display style to block */
 			image.style.display = 'block';
-		
+
+      /* Add width and height as attributes ONLY once onload */
+      if (!(image.w && image.h) && (image.width && image.height))
+      {
+        image.w = image.width;
+        image.h = image.height;
+        
+	      /* Check source image format. Get image height minus reflection height! */
+	      switch ((image.w + 1) > (image.h / (conf_reflection_p + 1))) 
+	      {
+	        /* Landscape format */
+	        case true:
+	          image.pc = 118;
+	          break;
+	
+	        /* Portrait and square format */
+	        default:
+	          image.pc = 100;
+	          break;
+	      }
+      }
+      		
 			/* Process new image height and image width */
 			var new_img_h = (image.h / image.w * image.pc) / z * size;
 			switch ( new_img_h > max_height )
@@ -189,6 +210,12 @@
 	images_width = img_div.offsetWidth;
 	images_top = imageflow_div.offsetTop;
 	images_left = imageflow_div.offsetLeft;
+	offsetParent = imageflow_div.offsetParent;
+	while (offsetParent != null) {
+		images_top += offsetParent.offsetTop;
+		images_left += offsetParent.offsetLeft;
+		offsetParent = offsetParent.offsetParent;
+	}
 	max_conf_focus = conf_focus * xstep;
 	size = images_width * 0.5;
 	scrollbar_width = images_width * 0.6;
@@ -229,27 +256,6 @@
 			image.x_pos = (-i * xstep);
 			image.i = i;
 			
-			/* Add width and height as attributes ONLY once onload */
-			if(onload == true)
-			{
-				image.w = image.width;
-				image.h = image.height;
-			}
-
-			/* Check source image format. Get image height minus reflection height! */
-			switch ((image.w + 1) > (image.h / (conf_reflection_p + 1))) 
-			{
-				/* Landscape format */
-				case true:
-					image.pc = 118;
-					break;
-
-				/* Portrait and square format */
-				default:
-					image.pc = 100;
-					break;
-			}
-
 			/* Set ondblclick event */
 			image.url = image.getAttribute('longdesc');
 			image.ondblclick = function() { document.location = this.url; }
@@ -285,7 +291,7 @@
 {
 	if(document.getElementById(conf_imageflow))
 	{
-		hide(conf_loading);
+		//hide(conf_loading);
 		refresh(true);
 		show(conf_images);
 		show(conf_scrollbar);
@@ -303,7 +309,7 @@
 /* Fixes the back button issue */
 window.onunload = function()
 {
-  document = null;
+  //document = null;
 }
 
 
@@ -443,4 +449,4 @@
 			handle(1);
 			break;
 	}
-}
\ No newline at end of file
+}
