Function.prototype.method=function(_1,_2){
this.prototype[_1]=_2;
return this;
};
if(typeof DebugManager=="undefined"){
DebugManager=function(_3,_4){
function Constructor(){
this.manager=(_3)?_3:this;
this.outputType=_4;
this.debugLog="";
}
with(Constructor){
method("setOutputType",function(_5){
this.outputType=_5;
return true;
});
method("output",function(_6,_7,_8,_9){
var _a="";
_a="Function:    "+_6+"\nInstance:    "+_7+"\nError Msg:   "+_8;
this.debugLog+=(this.debugLog.length>0?"\n\n":"DEBUG LOG\n----------------\n\n")+_a;
if(this.outputType=="alert"){
var _b="\n\nClick [OK] to copy/paste the info for assistance.\nClick [Cancel] to close this debug alert.";
var _c="[COPY & PASTE BELOW INTO EMAIL FOR ASSISTANCE]\n";
if(confirm(_a+_b)){
prompt(_c+_a,_a.replace(/\n/g,"|")+"|WindowURL: "+document.location);
}
}
if(this.outputType=="firebug"){
switch(_9){
case "log":
console.log(_a);
break;
case "info":
console.info(_a);
break;
case "warn":
console.warn(_a);
break;
case "error":
console.error(_a);
break;
default:
console.log(_a);
}
}
return true;
});
}
return new Constructor();
};
}


