/* Console debugging */ if (!window.console || !console.firebug) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; window.console = {}; for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {} } var Debug = { enabled : false, log : function() { if (!this.enabled) return; console.log(arguments); }, info : function() { if (!this.enabled) return; console.info(arguments); }, warn : function() { if (!this.enabled) return; console.warn(arguments); }, error : function() { if (!this.enabled) return; console.error(arguments); }, group : function() { if (!this.enabled) return; console.group(arguments); }, groupEnd : function() { if (!this.enabled) return; console.groupEnd(); }, dump :function(obj) { if (!this.enabled) return; if (obj instanceof Element) console.dirxml(obj); else console.dir(obj); } };