diff --git a/typo3/template.php b/typo3/template.php
index 923b6f28e23d46f6cea5fd79fd9c3a41be93c9eb..83282b1ff22ffe3a4542f1e8a1a0fb89a2a9021e 100755
--- a/typo3/template.php
+++ b/typo3/template.php
@@ -1187,9 +1187,9 @@ trim($this->form);
 				}
 					// outsideLayer(level)
 				function outsideLayer(level)	{
-					return GLV_x+GLV_gap-GLV_curLayerX[level] <0 || 
-							GLV_y+GLV_gap-GLV_curLayerY[level] <0 || 
-							GLV_curLayerX[level]+GLV_curLayerWidth[level]+GLV_gap-GLV_x <0 || 
+					return GLV_x+GLV_gap-GLV_curLayerX[level] <0 ||
+							GLV_y+GLV_gap-GLV_curLayerY[level] <0 ||
+							GLV_curLayerX[level]+GLV_curLayerWidth[level]+GLV_gap-GLV_x <0 ||
 							GLV_curLayerY[level]+GLV_curLayerHeight[level]+GLV_gap-GLV_y <0;
 				}
 					// setLayerObj(html,level)
@@ -1202,8 +1202,10 @@ trim($this->form);
 						tempLayerObj.height= (bw.ie4||bw.ie5||bw.ns6||bw.konq||bw.op7)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.op?this.css.pixelHeight:0;
 						tempLayerObj.width= (bw.ie4||bw.ie5||bw.ns6||bw.konq||bw.op7)?this.el.offsetWidth:bw.ns4?this.ref.width:bw.op?this.css.pixelWidth:0;
 
-						tempLayerObjCss.left = GLV_curLayerX[level] = GLV_x;
-						tempLayerObjCss.top = GLV_curLayerY[level] = GLV_y;
+						GLV_curLayerX[level] = GLV_x;
+						GLV_curLayerY[level] = GLV_y;
+						tempLayerObjCss.left = GLV_x+"px";
+						tempLayerObjCss.top = GLV_y+"px";
 						tempLayerObjCss.visibility = "visible";
 
 						GLV_isVisible[level]=1;