/*
	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.parser"],["require","dojo.date.stamp"]],defineResource:function(_1){if(!_1._hasResource["dojo.parser"]){_1._hasResource["dojo.parser"]=true;_1.provide("dojo.parser");_1.require("dojo.date.stamp");_1.parser=new function(){var d=_1;function val2type(_3){if(d.isString(_3)){return "string";}if(typeof _3=="number"){return "number";}if(typeof _3=="boolean"){return "boolean";}if(d.isFunction(_3)){return "function";}if(d.isArray(_3)){return "array";}if(_3 instanceof Date){return "date";}if(_3 instanceof d._Url){return "url";}return "object";};function str2obj(_4,_5){switch(_5){case "string":return _4;case "number":return _4.length?Number(_4):NaN;case "boolean":return typeof _4=="boolean"?_4:!(_4.toLowerCase()=="false");case "function":if(d.isFunction(_4)){_4=_4.toString();_4=d.trim(_4.substring(_4.indexOf("{")+1,_4.length-1));}try{if(_4.search(/[^\w\.]+/i)!=-1){_4=d.parser._nameAnonFunc(new Function(_4),this);}return d.getObject(_4,false);}catch(e){return new Function();}case "array":return _4.split(/\s*,\s*/);case "date":switch(_4){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_4);}case "url":return d.baseUrl+_4;default:return d.fromJson(_4);}};var _6={};function getClassInfo(_7){if(!_6[_7]){var _8=d.getObject(_7);if(!d.isFunction(_8)){throw new Error("Could not load class '"+_7+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _9=_8.prototype;var _a={};for(var _b in _9){if(_b.charAt(0)=="_"){continue;}var _c=_9[_b];_a[_b]=val2type(_c);}_6[_7]={cls:_8,params:_a};}return _6[_7];};this._functionFromScript=function(_d){var _e="";var _f="";var _10=_d.getAttribute("args");if(_10){d.forEach(_10.split(/\s*,\s*/),function(_11,idx){_e+="var "+_11+" = arguments["+idx+"]; ";});}var _13=_d.getAttribute("with");if(_13&&_13.length){d.forEach(_13.split(/\s*,\s*/),function(_14){_e+="with("+_14+"){";_f+="}";});}return new Function(_e+_d.innerHTML+_f);};this.instantiate=function(_15){var _16=[];d.forEach(_15,function(_17){if(!_17){return;}var _18=_17.getAttribute("dojoType");if((!_18)||(!_18.length)){return;}var _19=getClassInfo(_18);var _1a=_19.cls;var ps=_1a._noScript||_1a.prototype._noScript;var _1c={};var _1d=_17.attributes;for(var _1e in _19.params){var _1f=_1d.getNamedItem(_1e);if(!_1f||(!_1f.specified&&(!_1.isIE||_1e.toLowerCase()!="value"))){continue;}var _20=_1f.value;switch(_1e){case "class":_20=_17.className;break;case "style":_20=_17.style&&_17.style.cssText;}var _21=_19.params[_1e];_1c[_1e]=str2obj(_20,_21);}if(!ps){var _22=[],_23=[];d.query("> script[type^='dojo/']",_17).orphan().forEach(function(_24){var _25=_24.getAttribute("event"),_18=_24.getAttribute("type"),nf=d.parser._functionFromScript(_24);if(_25){if(_18=="dojo/connect"){_22.push({event:_25,func:nf});}else{_1c[_25]=nf;}}else{_23.push(nf);}});}var _27=_1a["markupFactory"];if(!_27&&_1a["prototype"]){_27=_1a.prototype["markupFactory"];}var _28=_27?_27(_1c,_17,_1a):new _1a(_1c,_17);_16.push(_28);var _29=_17.getAttribute("jsId");if(_29){d.setObject(_29,_28);}if(!ps){_1.forEach(_22,function(_2a){_1.connect(_28,_2a.event,null,_2a.func);});_1.forEach(_23,function(_2b){_2b.call(_28);});}});d.forEach(_16,function(_2c){if(_2c&&(_2c.startup)&&((!_2c.getParent)||(!_2c.getParent()))){_2c.startup();}});return _16;};this.parse=function(_2d){var _2e=d.query("[dojoType]",_2d);var _2f=this.instantiate(_2e);return _2f;};}();(function(){var _30=function(){if(djConfig["parseOnLoad"]==true){_1.parser.parse();}};if(_1.exists("dijit.wai.onload")&&(dijit.wai.onload===_1._loaders[0])){_1._loaders.splice(1,0,_30);}else{_1._loaders.unshift(_30);}})();_1.parser._anonCtr=0;_1.parser._anon={};_1.parser._nameAnonFunc=function(_31,_32){var jpn="$joinpoint";var nso=(_32||_1.parser._anon);if(_1.isIE){var cn=_31["__dojoNameCache"];if(cn&&nso[cn]===_31){return _31["__dojoNameCache"];}}var ret="__"+_1.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+_1.parser._anonCtr++;}nso[ret]=_31;return ret;};}}});