first semi-working version of test-div-coord.html page
[xynt.git] / commons.js
index f3ea07c..cb8076f 100644 (file)
@@ -1,4 +1,14 @@
-  function $(id) { return document.getElementById(id); }
+function $(id) { return document.getElementById(id); }
+
+function getStyle(x,IEstyleProp, MozStyleProp) 
+{
+    if (x.currentStyle) {
+        var y = x.currentStyle[IEstyleProp];
+    } else if (window.getComputedStyle) {
+        var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp);
+    }
+    return y;
+}
 
   /* replacement of setInterval on IE */
 (function(){