X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=xynt.git;a=blobdiff_plain;f=commons.js;h=cb8076f7e0fe1de2a28c9c3b3f262b636abd9ade;hp=f3ea07c65845ae157db68a253e7620141e777af6;hb=cadae724f0353fb440f8e6150a4e6b45d983a761;hpb=63c94961b0af39593bdaf5a2c7af4b5228db9a35 diff --git a/commons.js b/commons.js index f3ea07c..cb8076f 100644 --- a/commons.js +++ b/commons.js @@ -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(){