SAPO.namespace('Utility');SAPO.Utility.Dumper={_tab:'\xA0\xA0\xA0\xA0',_formatParam:function(param) {var formated='';switch(typeof(param)){case'string':formated='(string) '+param;break;case'number':formated='(number) '+param;break;case'boolean':formated='(boolean) '+param;break;case'object':if(param!=null){if(param.constructor==Array){formated='Array \n{\n'+this._outputFormat(param,0)+'\n}';}else{formated='Object \n{\n'+this._outputFormat(param,0)+'\n}';}}else{formated='null';} break;default:formated=false;} return formated;},_getTabs:function(numberOfTabs) {var tabs='';for(var _i=0;_i '+_typeof+'\n';formated+=this._tab+this._getTabs(dim)+'{\n';formated+=this._outputFormat(param[key],dim+1)+this._tab+this._getTabs(dim)+'}\n';}else if(param[key].constructor==Function){continue;}else{formated=formated+this._tab+this._getTabs(dim)+'['+key+'] => '+param[key]+'\n';}}else{formated=formated+this._tab+this._getTabs(dim)+'['+key+'] => null \n';}} return formated;},printDump:function(param,target) {if(!target||typeof(target)=='undefined'){document.write('
'+this._formatParam(param)+'
');}else{if(typeof(target)=='string'){document.getElementById(target).innerHTML='
'+this._formatParam(param)+'
';}else if(typeof(target)=='object'){target.innerHTML='
'+this._formatParam(param)+'
';}else{throw"TARGET must be an element or an element ID";}}},returnDump:function(param) {return this._formatParam(param);},alertDump:function(param) {alert(this._formatParam(param).replace(/()(Array|Object)(<\/b>)/g,"$2"));},windowDump:function(param) {var dumperwindow='dumperwindow_'+(Math.random()*10000);var win=window.open('',dumperwindow,'width=400,height=300,left=50,top=50,status,menubar,scrollbars,resizable');win.document.open();win.document.write('
'+this._formatParam(param)+'
');win.document.close();win.focus();}};