Index: trunk/FACT++/www/smartfact/index.js
===================================================================
--- trunk/FACT++/www/smartfact/index.js	(revision 13702)
+++ trunk/FACT++/www/smartfact/index.js	(revision 13703)
@@ -198,4 +198,20 @@
     var name = location.hash.length==0 ? "fact" : location.hash.substr(1);
 
+    var args = location.search.substr(1).split('&');
+
+    for (var i=0; i<args.length; i++)
+    {
+        var entry = args[i].split('=');
+        if (entry.length!=2)
+            continue;
+
+        switch (entry[0])
+        {
+        case "w": $("body").setAttribute("data-width",  entry[1]); break;
+        case "h": $("body").setAttribute("data-height", entry[1]); break;
+        }
+    }
+
+
     /*
      alert("0 -- "+navigator.appCodeName+"\n"+
@@ -325,5 +341,5 @@
     table.cellSpacing = 0;
     table.cellPadding = "0px";
-    table.width = "100%";
+    /*table.width = "100%";*/
     table.setAttribute("style", "overflow:hidden;position:fixed;top:0px;left:"+window.innerWidth+"px;");
 
@@ -497,5 +513,5 @@
 
             var img = document.createElement("img");
-            img.src = "dummy.png";//needed in firefox
+            img.src = "img/dummy.png";//needed in firefox
             img.id = "image"+z;
             img.setAttribute("style", "width:1px;height:1px;display:none;");
@@ -515,4 +531,20 @@
         var td0 = document.createElement("td");
         td0.setAttribute("class", "tcol0");
+        tr.appendChild(td0);
+
+        if (check.length>0 && check[0]=="image")
+        {
+            var img = document.createElement("img");
+            img.style.width="100%";
+            img.src = check[1];
+            td0.style.paddingLeft=0;
+            td0.style.border=0;
+            td0.colSpan=3;
+            td0.appendChild(img);
+
+            tbody.appendChild(tr);
+            continue;
+        }
+
         if (valid(cols[0]))
         {
@@ -522,5 +554,4 @@
             td0.appendChild(sp);
         }
-        tr.appendChild(td0);
 
         var td1 = document.createElement("td");
@@ -649,6 +680,11 @@
         return;
 
-    var W = window.innerWidth;
-    var H = window.innerHeight;
+    var fixedw = $("body").getAttribute("data-width");
+    var fixedh = $("body").getAttribute("data-height");
+
+    var W = fixedw>0 ? fixedw : window.innerWidth;
+    var H = fixedh>0 ? fixedh : window.innerHeight;
+
+    $("table"+z).style.width = W+"px";
 
 /*
@@ -683,15 +719,5 @@
 
     if ($("table"+z).offsetHeight == H || cnt==2)
-    {
-        // ------ debug -----
-        if (debug == true)
-        {
-            $('debug'+z).innerHTML = "";
-            $('debug'+z).innerHTML += "|W="+W +"/"+H;
-            $('debug'+z).innerHTML += "|H="+h+"/"+$("table"+z).offsetHeight+"/"+img.offsetHeight;
-            $('debug'+z).innerHTML += "|I="+img.style.height+"+"+H+"-"+h;
-        }
-        return;
-    }
+        return;
 
     resizeimpl(z, ++cnt);
