X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=08b36a4991a4b57af99585d127839060fbc5112f;hb=03b56b29d58cbd66c9d6fefebe842221ceaa5e62;hp=dcd5919e6924650a4c99f437454c6a0bf36d0c65;hpb=66f1d5561c09c83cf39918152467aed392fc4f3b;p=brisk.git diff --git a/web/commons.js b/web/commons.js index dcd5919..08b36a4 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 1) { + if (div.childNodes.toArray) + alert("si puo"); + else { + var length = div.childNodes.length, results = new Array(length); + while (length--) + results[length] = div.childNodes[length]; + + for (i=0 ; i' + +'' + +'' + +''; + } }