X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=d2863728c3fd3d0e0f499765da08f7d89d0a6f2b;hb=6832c7bff22cd4af320d2f192a70a960e0bfb411;hp=18b89c87df6d528556ee3e653235b2ca424dfe7b;hpb=041ad76b646377ac5d09f244fa0f524547b1a942;p=brisk.git diff --git a/web/commons.js b/web/commons.js index 18b89c8..d286372 100644 --- a/web/commons.js +++ b/web/commons.js @@ -21,9 +21,21 @@ */ var PLAYERS_N = 3; +var EXIT_BAN_TIME = 900; +var cookiepath = "/brisk/"; 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(){ /*if not IE, do nothing*/ @@ -60,6 +72,39 @@ function $(id) { return document.getElementById(id); } throw Error('setInterval Error\nInvalid function type'); }; }; + + /*Copy the default setTimeout behavior*/ + var nativeSetTimeout = window.setTimeout; + window.setTimeout = function(fn,ms) { + var param = []; + if(arguments.length <= 2) { + return nativeSetTimeout(fn,ms); + } + else { + for(var i=2;i' + +'' + +'' + +''; + } }