X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=88b97e7e44f8fa9739ffcb9d917dcea822bde1ba;hb=b1ab2024d5e2e81099c704a6b78ef9d5476c5f62;hp=33bb8eb066e48eb54ec1234f74d54ad0a26842fc;hpb=0900364491042222a4ff6d08cc627c0677acd9b9;p=brisk.git diff --git a/web/commons.js b/web/commons.js index 33bb8eb..88b97e7 100644 --- a/web/commons.js +++ b/web/commons.js @@ -60,6 +60,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"; } + +function playsound(tag, sound) { + // g_withflash is a global var + if (g_withflash) { + alert("PLAYSOUND "+sound); + $(tag).innerHTML = '' + +'' + +'' + +''; + } +}