+mkws.debug = function (string) {
+ if (!mkws_debug)
+ return;
+
+ if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */
+ return;
+ }
+
+ // you need to disable use strict at the top of the file!!!
+ if (mkws_debug >= 3) {
+ console.log(arguments.callee.caller);
+ } else if (mkws_debug >= 2) {
+ console.log(">>> called from function " + arguments.callee.caller.name + ' <<<');
+ }
+ console.log(string);
+}
+var debug = mkws.debug; // local alias