X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=commons.js;h=cb8076f7e0fe1de2a28c9c3b3f262b636abd9ade;hb=3d6b134b0c2945787eb759dc3aa44f876c3232c8;hp=f3ea07c65845ae157db68a253e7620141e777af6;hpb=0306e71dc1b093adfe745948419154c248619b59;p=xynt.git 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(){