/*
	Copyright (c) 2004-2007, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/


dojo._xdResourceLoaded({depends:[["provide","dojo.string"]],defineResource:function(_1){if(!_1._hasResource["dojo.string"]){_1._hasResource["dojo.string"]=true;_1.provide("dojo.string");_1.string.pad=function(_2,_3,ch,_5){var _6=String(_2);if(!ch){ch="0";}while(_6.length<_3){if(_5){_6+=ch;}else{_6=ch+_6;}}return _6;};_1.string.substitute=function(_7,_8,_9,_a){return _7.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_b,_c,_d){var _e=_1.getObject(_c,false,_8);if(_d){_e=_1.getObject(_d,false,_a)(_e);}if(_9){_e=_9(_e,_c);}return _e.toString();});};_1.string.trim=function(_f){_f=_f.replace(/^\s+/,"");for(var i=_f.length-1;i>0;i--){if(/\S/.test(_f.charAt(i))){_f=_f.substring(0,i+1);break;}}return _f;};}}});