Object.extend(String,{format:function(f){var c=f;var a=null;var e=null;for(var d=1,b=0;d<arguments.length;++d,++b){e=new RegExp("\\$"+b,"gm");a=arguments[d];if(!String.isNullOrEmpty(a)){c=c.replace(e,a)}else{c=c.replace(e,"")}}return c},isNullOrEmpty:function(a){if(typeof a==="undefined"){return true}return a===null||a.length===0}});