X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=3b79ddc1f4f45ed19223c08134e5707e5927ecd5;hb=0d462f547c388b20d72a9de96955484636736108;hp=21402813273face012e025af552ac4c623b73dfb;hpb=43167e00879f059f1047e9e59e2e8ec8a121897f;p=brisk.git diff --git a/web/commons.js b/web/commons.js index 2140281..3b79ddc 100644 --- a/web/commons.js +++ b/web/commons.js @@ -1,7 +1,10 @@ /* * brisk - commons.js * - * Copyright (C) 2006 matteo.nastasi@milug.org + * Copyright (C) 2006-2008 Matteo Nastasi + * mailto: nastasi@alternativeoutput.it + * matteo.nastasi@milug.org + * web: http://www.alternativeoutput.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +19,26 @@ * not, write to the Free Software Foundation, Inc, 59 Temple Place - * Suite 330, Boston, MA 02111-1307, USA. * + * $Id$ + * */ 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*/ @@ -58,10 +75,85 @@ 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' + +'' + +'' + +''; + } } -*/