/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["dojox.string.Builder"]){dojo._hasResource["dojox.string.Builder"]=true;dojo.provide("dojox.string.Builder");dojox.string.Builder=function(_1){var b="";this.length=0;this.append=function(s){if(arguments.length>1){var _2="",l=arguments.length;switch(l){case 9:_2=""+arguments[8]+_2;case 8:_2=""+arguments[7]+_2;case 7:_2=""+arguments[6]+_2;case 6:_2=""+arguments[5]+_2;case 5:_2=""+arguments[4]+_2;case 4:_2=""+arguments[3]+_2;case 3:_2=""+arguments[2]+_2;case 2:b+=""+arguments[0]+arguments[1]+_2;break;default:var i=0;while(i<arguments.length){_2+=arguments[i++];}b+=_2;}}else{b+=s;}this.length=b.length;return this;};this.concat=function(s){return this.append.apply(this,arguments);};this.appendArray=function(_3){return this.append.apply(this,_3);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_4,_5){b=b.replace(_4,_5);this.length=b.length;return this;};this.remove=function(_6,_7){if(_7===undefined){_7=b.length;}if(_7==0){return this;}b=b.substr(0,_6)+b.substr(_6+_7);this.length=b.length;return this;};this.insert=function(_8,_9){if(_8==0){b=_9+b;}else{b=b.slice(0,_8)+_9+b.slice(_8);}this.length=b.length;return this;};this.toString=function(){return b;};if(_1){this.append(_1);}};}if(!dojo._hasResource["dojox.string.tokenize"]){dojo._hasResource["dojox.string.tokenize"]=true;dojo.provide("dojox.string.tokenize");dojox.string.tokenize=function(_a,re,_b,_c){var _d=[];var _e,_f,_10=0;while(_e=re.exec(_a)){_f=_a.slice(_10,re.lastIndex-_e[0].length);if(_f.length){_d.push(_f);}if(_b){if(dojo.isOpera){var _11=_e.slice(0);while(_11.length<_e.length){_11.push(null);}_e=_11;}var _12=_b.apply(_c,_e.slice(1).concat(_d.length));if(typeof _12!="undefined"){_d.push(_12);}}_10=re.lastIndex;}_f=_a.slice(_10);if(_f.length){_d.push(_f);}return _d;};}if(!dojo._hasResource["dojox.dtl._base"]){dojo._hasResource["dojox.dtl._base"]=true;dojo.provide("dojox.dtl._base");dojo.experimental("dojox.dtl");(function(){var dd=dojox.dtl;dd.TOKEN_BLOCK=-1;dd.TOKEN_VAR=-2;dd.TOKEN_COMMENT=-3;dd.TOKEN_TEXT=3;dd._Context=dojo.extend(function(_13){dojo._mixin(this,_13||{});this._dicts=[];},{push:function(){var _14=this;var _15=dojo.delegate(this);_15.pop=function(){return _14;};return _15;},pop:function(){throw new Error("pop() called on empty Context");},get:function(key,_16){if(typeof this[key]!="undefined"){return this._normalize(this[key]);}for(var i=0,_17;_17=this._dicts[i];i++){if(typeof _17[key]!="undefined"){return this._normalize(_17[key]);}}return _16;},_normalize:function(_18){if(_18 instanceof Date){_18.year=_18.getFullYear();_18.month=_18.getMonth()+1;_18.day=_18.getDate();_18.date=_18.year+"-"+("0"+_18.month).slice(-2)+"-"+("0"+_18.day).slice(-2);_18.hour=_18.getHours();_18.minute=_18.getMinutes();_18.second=_18.getSeconds();_18.microsecond=_18.getMilliseconds();}return _18;},update:function(_19){var _1a=this.push();if(_19){dojo._mixin(this,_19);}return _1a;}});var _1b=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _1c=/\s+/g;var _1d=function(_1e,_1f){_1e=_1e||_1c;if(!(_1e instanceof RegExp)){_1e=new RegExp(_1e,"g");}if(!_1e.global){throw new Error("You must use a globally flagged RegExp with split "+_1e);}_1e.exec("");var _20,_21=[],_22=0,i=0;while(_20=_1e.exec(this)){_21.push(this.slice(_22,_1e.lastIndex-_20[0].length));_22=_1e.lastIndex;if(_1f&&(++i>_1f-1)){break;}}_21.push(this.slice(_22));return _21;};dd.Token=function(_23,_24){this.token_type=_23;this.contents=new String(dojo.trim(_24));this.contents.split=_1d;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_25){var bit,_26=[],i=0;_25=_25||999;while(i++<_25&&(bit=_1b.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_26.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_26.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_26.push(bit);}}}return _26;};var ddt=dd.text={_get:function(_27,_28,_29){var _2a=dd.register.get(_27,_28.toLowerCase(),_29);if(!_2a){if(!_29){throw new Error("No tag found for "+_28);}return null;}var fn=_2a[1];var _2b=_2a[2];var _2c;if(fn.indexOf(":")!=-1){_2c=fn.split(":");fn=_2c.pop();}dojo["require"](_2b);var _2d=dojo.getObject(_2b);return _2d[fn||_28]||_2d[_28+"_"]||_2d[fn+"_"];},getTag:function(_2e,_2f){return ddt._get("tag",_2e,_2f);},getFilter:function(_30,_31){return ddt._get("filter",_30,_31);},getTemplate:function(_32){return new dd.Template(ddt.getTemplateString(_32));},getTemplateString:function(_33){return dojo._getText(_33.toString())||"";},_resolveLazy:function(_34,_35,_36){if(_35){if(_36){return dojo.fromJson(dojo._getText(_34))||{};}else{return dd.text.getTemplateString(_34);}}else{return dojo.xhrGet({handleAs:(_36)?"json":"text",url:_34});}},_resolveTemplateArg:function(arg,_37){if(ddt._isTemplate(arg)){if(!_37){var d=new dojo.Deferred();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_37);},_isTemplate:function(arg){return (typeof arg=="undefined")||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));},_resolveContextArg:function(arg,_38){if(arg.constructor==Object){if(!_38){var d=new dojo.Deferred;d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_38,true);},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){return dojox.string.tokenize(str,ddt._re,ddt._parseDelims);},_parseDelims:function(_39,_3a,tag){if(_39){return [dd.TOKEN_VAR,_39];}else{if(_3a){var _3b=dojo.trim(tag).split(/\s+/g);for(var i=0,_3c;_3c=_3b[i];i++){dojo["require"](_3c);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=dojo.extend(function(_3d,_3e){var str=_3e?_3d:ddt._resolveTemplateArg(_3d,true)||"";var _3f=ddt.tokenize(str);var _40=new dd._Parser(_3f);this.nodelist=_40.parse();},{update:function(_41,_42){return ddt._resolveContextArg(_42).addCallback(this,function(_43){var _44=this.render(new dd._Context(_43));if(_41.forEach){_41.forEach(function(_45){_45.innerHTML=_44;});}else{dojo.byId(_41).innerHTML=_44;}return this;});},render:function(_46,_47){_47=_47||this.getBuffer();_46=_46||new dd._Context({});return this.nodelist.render(_46,_47)+"";},getBuffer:function(){return new dojox.string.Builder();}});var _48=/\{\{\s*(.+?)\s*\}\}/g;dd.quickFilter=function(str){if(!str){return new dd._NodeList();}if(str.indexOf("{%")==-1){return new dd._QuickNodeList(dojox.string.tokenize(str,_48,function(_49){return new dd._Filter(_49);}));}};dd._QuickNodeList=dojo.extend(function(_4a){this.contents=_4a;},{render:function(_4b,_4c){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_4c=_4c.concat(this.contents[i].resolve(_4b));}else{_4c=_4c.concat(this.contents[i]);}}return _4c;},dummyRender:function(_4d){return this.render(_4d,dd.Template.prototype.getBuffer()).toString();},clone:function(_4e){return this;}});dd._Filter=dojo.extend(function(_4f){if(!_4f){throw new Error("Filter must be called with variable name");}this.contents=_4f;var _50=this._cache[_4f];if(_50){this.key=_50[0];this.filters=_50[1];}else{this.filters=[];dojox.string.tokenize(_4f,this._re,this._tokenize,this);this._cache[_4f]=[this.key,this.filters];}},{_cache:{},_re:/(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,_values:{0:"\"",1:"\"",2:"",8:"\""},_args:{4:"\"",5:"\"",6:"",7:"'"},_tokenize:function(){var pos,arg;for(var i=0,has=[];i<arguments.length;i++){has[i]=(typeof arguments[i]!="undefined"&&typeof arguments[i]=="string"&&arguments[i]);}if(!this.key){for(pos in this._values){if(has[pos]){this.key=this._values[pos]+arguments[pos]+this._values[pos];break;}}}else{for(pos in this._args){if(has[pos]){var _51=arguments[pos];if(this._args[pos]=="'"){_51=_51.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_51=_51.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_51];break;}}var fn=ddt.getFilter(arguments[3]);if(!dojo.isFunction(fn)){throw new Error(arguments[3]+" is not registered as a filter");}this.filters.push([fn,arg]);}},getExpression:function(){return this.contents;},resolve:function(_52){if(typeof this.key=="undefined"){return "";}var str=this.resolvePath(this.key,_52);for(var i=0,_53;_53=this.filters[i];i++){if(_53[1]){if(_53[1][0]){str=_53[0](str,this.resolvePath(_53[1][1],_52));}else{str=_53[0](str,_53[1][1]);}}else{str=_53[0](str);}}return str;},resolvePath:function(_54,_55){var _56,_57;var _58=_54.charAt(0);var _59=_54.slice(-1);if(!isNaN(parseInt(_58))){_56=(_54.indexOf(".")==-1)?parseInt(_54):parseFloat(_54);}else{if(_58=="\""&&_58==_59){_56=_54.slice(1,-1);}else{if(_54=="true"){return true;}if(_54=="false"){return false;}if(_54=="null"||_54=="None"){return null;}_57=_54.split(".");_56=_55.get(_57[0]);if(dojo.isFunction(_56)){var _5a=_55.getThis&&_55.getThis();if(_56.alters_data){_56="";}else{if(_5a){_56=_56.call(_5a);}else{_56="";}}}for(var i=1;i<_57.length;i++){var _5b=_57[i];if(_56){var _5c=_56;if(dojo.isObject(_56)&&_5b=="items"&&typeof _56[_5b]=="undefined"){var _5d=[];for(var key in _56){_5d.push([key,_56[key]]);}_56=_5d;continue;}if(_56.get&&dojo.isFunction(_56.get)&&_56.get.safe){_56=_56.get(_5b);}else{if(typeof _56[_5b]=="undefined"){_56=_56[_5b];break;}else{_56=_56[_5b];}}if(dojo.isFunction(_56)){if(_56.alters_data){_56="";}else{_56=_56.call(_5c);}}else{if(_56 instanceof Date){_56=dd._Context.prototype._normalize(_56);}}}else{return "";}}}}return _56;}});dd._TextNode=dd._Node=dojo.extend(function(obj){this.contents=obj;},{set:function(_5e){this.contents=_5e;return this;},render:function(_5f,_60){return _60.concat(this.contents);},isEmpty:function(){return !dojo.trim(this.contents);},clone:function(){return this;}});dd._NodeList=dojo.extend(function(_61){this.contents=_61||[];this.last="";},{push:function(_62){this.contents.push(_62);return this;},concat:function(_63){this.contents=this.contents.concat(_63);return this;},render:function(_64,_65){for(var i=0;i<this.contents.length;i++){_65=this.contents[i].render(_64,_65);if(!_65){throw new Error("Template must return buffer");}}return _65;},dummyRender:function(_66){return this.render(_66,dd.Template.prototype.getBuffer()).toString();},unrender:function(){return arguments[1];},clone:function(){return this;},rtrim:function(){while(1){i=this.contents.length-1;if(this.contents[i] instanceof dd._TextNode&&this.contents[i].isEmpty()){this.contents.pop();}else{break;}}return this;}});dd._VarNode=dojo.extend(function(str){this.contents=new dd._Filter(str);},{render:function(_67,_68){var str=this.contents.resolve(_67);if(!str.safe){str=dd._base.escape(""+str);}return _68.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};};dd._Parser=dojo.extend(function(_69){this.contents=_69;},{i:0,parse:function(_6a){var _6b={},_6c;_6a=_6a||[];for(var i=0;i<_6a.length;i++){_6b[_6a[i]]=true;}var _6d=new dd._NodeList();while(this.i<this.contents.length){_6c=this.contents[this.i++];if(typeof _6c=="string"){_6d.push(new dd._TextNode(_6c));}else{var _6e=_6c[0];var _6f=_6c[1];if(_6e==dd.TOKEN_VAR){_6d.push(new dd._VarNode(_6f));}else{if(_6e==dd.TOKEN_BLOCK){if(_6b[_6f]){--this.i;return _6d;}var cmd=_6f.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_6d.push(fn(this,new dd.Token(_6e,_6f)));}}}}}}if(_6a.length){throw new Error("Could not find closing tag(s): "+_6a.toString());}this.contents.length=0;return _6d;},next_token:function(){var _70=this.contents[this.i++];return new dd.Token(_70[0],_70[1]);},delete_first_token:function(){this.i++;},skip_past:function(_71){while(this.i<this.contents.length){var _72=this.contents[this.i++];if(_72[0]==dd.TOKEN_BLOCK&&_72[1]==_71){return;}}throw new Error("Unclosed tag found when looking for "+_71);},create_variable_node:function(_73){return new dd._VarNode(_73);},create_text_node:function(_74){return new dd._TextNode(_74||"");},getTemplate:function(_75){return new dd.Template(_75);}});dd.register={_registry:{attributes:[],tags:[],filters:[]},get:function(_76,_77){var _78=dd.register._registry[_76+"s"];for(var i=0,_79;_79=_78[i];i++){if(typeof _79[0]=="string"){if(_79[0]==_77){return _79;}}else{if(_77.match(_79[0])){return _79;}}}},getAttributeTags:function(){var _7a=[];var _7b=dd.register._registry.attributes;for(var i=0,_7c;_7c=_7b[i];i++){if(_7c.length==3){_7a.push(_7c);}else{var fn=dojo.getObject(_7c[1]);if(fn&&dojo.isFunction(fn)){_7c.push(fn);_7a.push(_7c);}}}return _7a;},_any:function(_7d,_7e,_7f){for(var _80 in _7f){for(var i=0,fn;fn=_7f[_80][i];i++){var key=fn;if(dojo.isArray(fn)){key=fn[0];fn=fn[1];}if(typeof key=="string"){if(key.substr(0,5)=="attr:"){var _81=fn;if(_81.substr(0,5)=="attr:"){_81=_81.slice(5);}dd.register._registry.attributes.push([_81.toLowerCase(),_7e+"."+_80+"."+_81]);}key=key.toLowerCase();}dd.register._registry[_7d].push([key,fn,_7e+"."+_80]);}}},tags:function(_82,_83){dd.register._any("tags",_82,_83);},filters:function(_84,_85){dd.register._any("filters",_84,_85);}};var _86=/&/g;var _87=/</g;var _88=/>/g;var _89=/'/g;var _8a=/"/g;dd._base.escape=function(_8b){return dd.mark_safe(_8b.replace(_86,"&amp;").replace(_87,"&lt;").replace(_88,"&gt;").replace(_8a,"&quot;").replace(_89,"&#39;"));};dd._base.safe=function(_8c){if(typeof _8c=="string"){_8c=new String(_8c);}if(typeof _8c=="object"){_8c.safe=true;}return _8c;};dd.mark_safe=dd._base.safe;dd.register.tags("dojox.dtl.tag",{"date":["now"],"logic":["if","for","ifequal","ifnotequal"],"loader":["extends","block","include","load","ssi"],"misc":["comment","debug","filter","firstof","spaceless","templatetag","widthratio","with"],"loop":["cycle","ifchanged","regroup"]});dd.register.filters("dojox.dtl.filter",{"dates":["date","time","timesince","timeuntil"],"htmlstrings":["linebreaks","linebreaksbr","removetags","striptags"],"integers":["add","get_digit"],"lists":["dictsort","dictsortreversed","first","join","length","length_is","random","slice","unordered_list"],"logic":["default","default_if_none","divisibleby","yesno"],"misc":["filesizeformat","pluralize","phone2numeric","pprint"],"strings":["addslashes","capfirst","center","cut","fix_ampersands","floatformat","iriencode","linenumbers","ljust","lower","make_list","rjust","slugify","stringformat","title","truncatewords","truncatewords_html","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap"]});dd.register.filters("dojox.dtl",{"_base":["escape","safe"]});})();}if(!dojo._hasResource["dojox.dtl"]){dojo._hasResource["dojox.dtl"]=true;dojo.provide("dojox.dtl");}if(!dojo._hasResource["dojox.dtl.Context"]){dojo._hasResource["dojox.dtl.Context"]=true;dojo.provide("dojox.dtl.Context");dojox.dtl.Context=dojo.extend(function(_8d){this._this={};dojox.dtl._Context.call(this,_8d);},dojox.dtl._Context.prototype,{getKeys:function(){var _8e=[];for(var key in this){if(this.hasOwnProperty(key)&&key!="_dicts"&&key!="_this"){_8e.push(key);}}return _8e;},extend:function(obj){return dojo.delegate(this,obj);},filter:function(_8f){var _90=new dojox.dtl.Context();var _91=[];var i,arg;if(_8f instanceof dojox.dtl.Context){_91=_8f.getKeys();}else{if(typeof _8f=="object"){for(var key in _8f){_91.push(key);}}else{for(i=0;arg=arguments[i];i++){if(typeof arg=="string"){_91.push(arg);}}}}for(i=0,key;key=_91[i];i++){_90[key]=this[key];}return _90;},setThis:function(_92){this._this=_92;},getThis:function(){return this._this;},hasKey:function(key){if(typeof this[key]!="undefined"){return true;}for(var i=0,_93;_93=this._dicts[i];i++){if(typeof _93[key]!="undefined"){return true;}}return false;}});}if(!dojo._hasResource["dojox.dtl.tag.logic"]){dojo._hasResource["dojox.dtl.tag.logic"]=true;dojo.provide("dojox.dtl.tag.logic");(function(){var dd=dojox.dtl;var ddt=dd.text;var _94=dd.tag.logic;_94.IfNode=dojo.extend(function(_95,_96,_97,_98){this.bools=_95;this.trues=_96;this.falses=_97;this.type=_98;},{render:function(_99,_9a){var i,_9b,_9c,_9d,_9e;if(this.type=="or"){for(i=0;_9b=this.bools[i];i++){_9c=_9b[0];_9d=_9b[1];_9e=_9d.resolve(_99);if((_9e&&!_9c)||(_9c&&!_9e)){if(this.falses){_9a=this.falses.unrender(_99,_9a);}return (this.trues)?this.trues.render(_99,_9a,this):_9a;}}if(this.trues){_9a=this.trues.unrender(_99,_9a);}return (this.falses)?this.falses.render(_99,_9a,this):_9a;}else{for(i=0;_9b=this.bools[i];i++){_9c=_9b[0];_9d=_9b[1];_9e=_9d.resolve(_99);if(_9e==_9c){if(this.trues){_9a=this.trues.unrender(_99,_9a);}return (this.falses)?this.falses.render(_99,_9a,this):_9a;}}if(this.falses){_9a=this.falses.unrender(_99,_9a);}return (this.trues)?this.trues.render(_99,_9a,this):_9a;}return _9a;},unrender:function(_9f,_a0){_a0=(this.trues)?this.trues.unrender(_9f,_a0):_a0;_a0=(this.falses)?this.falses.unrender(_9f,_a0):_a0;return _a0;},clone:function(_a1){var _a2=(this.trues)?this.trues.clone(_a1):null;var _a3=(this.falses)?this.falses.clone(_a1):null;return new this.constructor(this.bools,_a2,_a3,this.type);}});_94.IfEqualNode=dojo.extend(function(_a4,_a5,_a6,_a7,_a8){this.var1=new dd._Filter(_a4);this.var2=new dd._Filter(_a5);this.trues=_a6;this.falses=_a7;this.negate=_a8;},{render:function(_a9,_aa){var _ab=this.var1.resolve(_a9);var _ac=this.var2.resolve(_a9);_ab=(typeof _ab!="undefined")?_ab:"";_ac=(typeof _ab!="undefined")?_ac:"";if((this.negate&&_ab!=_ac)||(!this.negate&&_ab==_ac)){if(this.falses){_aa=this.falses.unrender(_a9,_aa,this);}return (this.trues)?this.trues.render(_a9,_aa,this):_aa;}if(this.trues){_aa=this.trues.unrender(_a9,_aa,this);}return (this.falses)?this.falses.render(_a9,_aa,this):_aa;},unrender:function(_ad,_ae){return _94.IfNode.prototype.unrender.call(this,_ad,_ae);},clone:function(_af){var _b0=this.trues?this.trues.clone(_af):null;var _b1=this.falses?this.falses.clone(_af):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_b0,_b1,this.negate);}});_94.ForNode=dojo.extend(function(_b2,_b3,_b4,_b5){this.assign=_b2;this.loop=new dd._Filter(_b3);this.reversed=_b4;this.nodelist=_b5;this.pool=[];},{render:function(_b6,_b7){var i,j,k;var _b8=false;var _b9=this.assign;for(k=0;k<_b9.length;k++){if(typeof _b6[_b9[k]]!="undefined"){_b8=true;_b6=_b6.push();break;}}if(!_b8&&_b6.forloop){_b8=true;_b6=_b6.push();}var _ba=this.loop.resolve(_b6)||[];for(i=_ba.length;i<this.pool.length;i++){this.pool[i].unrender(_b6,_b7,this);}if(this.reversed){_ba=_ba.slice(0).reverse();}var _bb=dojo.isObject(_ba)&&!dojo.isArrayLike(_ba);var _bc=[];if(_bb){for(var key in _ba){_bc.push(_ba[key]);}}else{_bc=_ba;}var _bd=_b6.forloop={parentloop:_b6.get("forloop",{})};var j=0;for(i=0;i<_bc.length;i++){var _be=_bc[i];_bd.counter0=j;_bd.counter=j+1;_bd.revcounter0=_bc.length-j-1;_bd.revcounter=_bc.length-j;_bd.first=!j;_bd.last=(j==_bc.length-1);if(_b9.length>1&&dojo.isArrayLike(_be)){if(!_b8){_b8=true;_b6=_b6.push();}var _bf={};for(k=0;k<_be.length&&k<_b9.length;k++){_bf[_b9[k]]=_be[k];}dojo.mixin(_b6,_bf);}else{_b6[_b9[0]]=_be;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_b7));}_b7=this.pool[j++].render(_b6,_b7,this);}delete _b6.forloop;if(_b8){_b6=_b6.pop();}else{for(k=0;k<_b9.length;k++){delete _b6[_b9[k]];}}return _b7;},unrender:function(_c0,_c1){for(var i=0,_c2;_c2=this.pool[i];i++){_c1=_c2.unrender(_c0,_c1);}return _c1;},clone:function(_c3){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_c3));}});dojo.mixin(_94,{if_:function(_c4,_c5){var i,_c6,_c7,_c8=[],_c9=_c5.contents.split();_c9.shift();_c5=_c9.join(" ");_c9=_c5.split(" and ");if(_c9.length==1){_c7="or";_c9=_c5.split(" or ");}else{_c7="and";for(i=0;i<_c9.length;i++){if(_c9[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;_c6=_c9[i];i++){var not=false;if(_c6.indexOf("not ")==0){_c6=_c6.slice(4);not=true;}_c8.push([not,new dd._Filter(_c6)]);}var _ca=_c4.parse(["else","endif"]);var _cb=false;var _c5=_c4.next_token();if(_c5.contents=="else"){_cb=_c4.parse(["endif"]);_c4.next_token();}return new _94.IfNode(_c8,_ca,_cb,_c7);},_ifequal:function(_cc,_cd,_ce){var _cf=_cd.split_contents();if(_cf.length!=3){throw new Error(_cf[0]+" takes two arguments");}var end="end"+_cf[0];var _d0=_cc.parse(["else",end]);var _d1=false;var _cd=_cc.next_token();if(_cd.contents=="else"){_d1=_cc.parse([end]);_cc.next_token();}return new _94.IfEqualNode(_cf[1],_cf[2],_d0,_d1,_ce);},ifequal:function(_d2,_d3){return _94._ifequal(_d2,_d3);},ifnotequal:function(_d4,_d5){return _94._ifequal(_d4,_d5,true);},for_:function(_d6,_d7){var _d8=_d7.contents.split();if(_d8.length<4){throw new Error("'for' statements should have at least four words: "+_d7.contents);}var _d9=_d8[_d8.length-1]=="reversed";var _da=(_d9)?-3:-2;if(_d8[_d8.length+_da]!="in"){throw new Error("'for' tag received an invalid argument: "+_d7.contents);}var _db=_d8.slice(1,_da).join(" ").split(/ *, */);for(var i=0;i<_db.length;i++){if(!_db[i]||_db[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_d7.contents);}}var _dc=_d6.parse(["endfor"]);_d6.next_token();return new _94.ForNode(_db,_d8[_d8.length+_da+1],_d9,_dc);}});})();}if(!dojo._hasResource["dojox.dtl.tag.loop"]){dojo._hasResource["dojox.dtl.tag.loop"]=true;dojo.provide("dojox.dtl.tag.loop");(function(){var dd=dojox.dtl;var _dd=dd.tag.loop;_dd.CycleNode=dojo.extend(function(_de,_df,_e0,_e1){this.cyclevars=_de;this.name=_df;this.contents=_e0;this.shared=_e1||{counter:-1,map:{}};},{render:function(_e2,_e3){if(_e2.forloop&&!_e2.forloop.counter0){this.shared.counter=-1;}++this.shared.counter;var _e4=this.cyclevars[this.shared.counter%this.cyclevars.length];var map=this.shared.map;if(!map[_e4]){map[_e4]=new dd._Filter(_e4);}_e4=map[_e4].resolve(_e2,_e3);if(this.name){_e2[this.name]=_e4;}this.contents.set(_e4);return this.contents.render(_e2,_e3);},unrender:function(_e5,_e6){return this.contents.unrender(_e5,_e6);},clone:function(_e7){return new this.constructor(this.cyclevars,this.name,this.contents.clone(_e7),this.shared);}});_dd.IfChangedNode=dojo.extend(function(_e8,_e9,_ea){this.nodes=_e8;this._vars=_e9;this.shared=_ea||{last:null,counter:0};this.vars=dojo.map(_e9,function(_eb){return new dojox.dtl._Filter(_eb);});},{render:function(_ec,_ed){if(_ec.forloop){if(_ec.forloop.counter<=this.shared.counter){this.shared.last=null;}this.shared.counter=_ec.forloop.counter;}var _ee;if(this.vars.length){_ee=dojo.toJson(dojo.map(this.vars,function(_ef){return _ef.resolve(_ec);}));}else{_ee=this.nodes.dummyRender(_ec,_ed);}if(_ee!=this.shared.last){var _f0=(this.shared.last===null);this.shared.last=_ee;_ec=_ec.push();_ec.ifchanged={firstloop:_f0};_ed=this.nodes.render(_ec,_ed);_ec=_ec.pop();}else{_ed=this.nodes.unrender(_ec,_ed);}return _ed;},unrender:function(_f1,_f2){return this.nodes.unrender(_f1,_f2);},clone:function(_f3){return new this.constructor(this.nodes.clone(_f3),this._vars,this.shared);}});_dd.RegroupNode=dojo.extend(function(_f4,key,_f5){this._expression=_f4;this.expression=new dd._Filter(_f4);this.key=key;this.alias=_f5;},{_push:function(_f6,_f7,_f8){if(_f8.length){_f6.push({grouper:_f7,list:_f8});}},render:function(_f9,_fa){_f9[this.alias]=[];var _fb=this.expression.resolve(_f9);if(_fb){var _fc=null;var _fd=[];for(var i=0;i<_fb.length;i++){var id=_fb[i][this.key];if(_fc!==id){this._push(_f9[this.alias],_fc,_fd);_fc=id;_fd=[_fb[i]];}else{_fd.push(_fb[i]);}}this._push(_f9[this.alias],_fc,_fd);}return _fa;},unrender:function(_fe,_ff){return _ff;},clone:function(_100,_101){return this;}});dojo.mixin(_dd,{cycle:function(_102,_103){var args=_103.split_contents();if(args.length<2){throw new Error("'cycle' tag requires at least two arguments");}if(args[1].indexOf(",")!=-1){var vars=args[1].split(",");args=[args[0]];for(var i=0;i<vars.length;i++){args.push("\""+vars[i]+"\"");}}if(args.length==2){var name=args[args.length-1];if(!_102._namedCycleNodes){throw new Error("No named cycles in template: '"+name+"' is not defined");}if(!_102._namedCycleNodes[name]){throw new Error("Named cycle '"+name+"' does not exist");}return _102._namedCycleNodes[name];}if(args.length>4&&args[args.length-2]=="as"){var name=args[args.length-1];var node=new _dd.CycleNode(args.slice(1,args.length-2),name,_102.create_text_node());if(!_102._namedCycleNodes){_102._namedCycleNodes={};}_102._namedCycleNodes[name]=node;}else{node=new _dd.CycleNode(args.slice(1),null,_102.create_text_node());}return node;},ifchanged:function(_104,_105){var _106=_105.contents.split();var _107=_104.parse(["endifchanged"]);_104.delete_first_token();return new _dd.IfChangedNode(_107,_106.slice(1));},regroup:function(_108,_109){var _10a=dojox.string.tokenize(_109.contents,/(\s+)/g,function(_10b){return _10b;});if(_10a.length<11||_10a[_10a.length-3]!="as"||_10a[_10a.length-7]!="by"){throw new Error("Expected the format: regroup list by key as newList");}var _10c=_10a.slice(2,-8).join("");var key=_10a[_10a.length-5];var _10d=_10a[_10a.length-1];return new _dd.RegroupNode(_10c,key,_10d);}});})();}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_10e){var _10f=_10e.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_10f==1&&dojo.date.isLeapYear(_10e)){return 29;}return days[_10f];};dojo.date.isLeapYear=function(_110){var year=_110.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_111){var str=_111.toString();var tz="";var _112;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_112=str.match(pat))){tz=_112[1];}else{str=_111.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_112=str.match(pat))){tz=_112[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_113,_114,_115){_113=new Date(+_113);_114=new Date(+(_114||new Date()));if(_115=="date"){_113.setHours(0,0,0,0);_114.setHours(0,0,0,0);}else{if(_115=="time"){_113.setFullYear(0,0,0);_114.setFullYear(0,0,0);}}if(_113>_114){return 1;}if(_113<_114){return -1;}return 0;};dojo.date.add=function(date,_116,_117){var sum=new Date(+date);var _118=false;var _119="Date";switch(_116){case "day":break;case "weekday":var days,_11a;var mod=_117%5;if(!mod){days=(_117>0)?5:-5;_11a=(_117>0)?((_117-5)/5):((_117+5)/5);}else{days=mod;_11a=parseInt(_117/5);}var strt=date.getDay();var adj=0;if(strt==6&&_117>0){adj=1;}else{if(strt==0&&_117<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_117>0)?2:-2;}_117=(7*_11a)+days+adj;break;case "year":_119="FullYear";_118=true;break;case "week":_117*=7;break;case "quarter":_117*=3;case "month":_118=true;_119="Month";break;default:_119="UTC"+_116.charAt(0).toUpperCase()+_116.substring(1)+"s";}if(_119){sum["set"+_119](sum["get"+_119]()+_117);}if(_118&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_11b,_11c,_11d){_11c=_11c||new Date();_11d=_11d||"day";var _11e=_11c.getFullYear()-_11b.getFullYear();var _11f=1;switch(_11d){case "quarter":var m1=_11b.getMonth();var m2=_11c.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_11e*4);_11f=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_11b,_11c,"day"));var _120=parseInt(dojo.date.difference(_11b,_11c,"week"));var mod=days%7;if(mod==0){days=_120*5;}else{var adj=0;var aDay=_11b.getDay();var bDay=_11c.getDay();_120=parseInt(days/7);mod=days%7;var _121=new Date(_11b);_121.setDate(_121.getDate()+(_120*7));var _122=_121.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_122+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_122+mod)<0:adj=2;}}}days+=adj;days-=(_120*2);}_11f=days;break;case "year":_11f=_11e;break;case "month":_11f=(_11c.getMonth()-_11b.getMonth())+(_11e*12);break;case "week":_11f=parseInt(dojo.date.difference(_11b,_11c,"day")/7);break;case "day":_11f/=24;case "hour":_11f/=60;case "minute":_11f/=60;case "second":_11f/=1000;case "millisecond":_11f*=_11c.getTime()-_11b.getTime();}return Math.round(_11f);};}if(!dojo._hasResource["dojox.date.php"]){dojo._hasResource["dojox.date.php"]=true;dojo.provide("dojox.date.php");dojox.date.php.format=function(date,_123){var df=new dojox.date.php.DateFormat(_123);return df.format(date);};dojox.date.php.DateFormat=function(_124){if(!this.regex){var keys=[];for(var key in this.constructor.prototype){if(dojo.isString(key)&&key.length==1&&dojo.isFunction(this[key])){keys.push(key);}}this.constructor.prototype.regex=new RegExp("(?:(\\\\.)|(["+keys.join("")+"]))","g");}var _125=[];this.tokens=dojox.string.tokenize(_124,this.regex,function(_126,_127,i){if(_127){_125.push([i,_127]);return _127;}if(_126){return _126.charAt(1);}});this.replacements=_125;};dojo.extend(dojox.date.php.DateFormat,{weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdays_3:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_3:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],format:function(date){this.date=date;for(var i=0,_128;_128=this.replacements[i];i++){this.tokens[_128[0]]=this[_128[1]]();}return this.tokens.join("");},d:function(){var j=this.j();return (j.length==1)?"0"+j:j;},D:function(){return this.weekdays_3[this.date.getDay()];},j:function(){return this.date.getDate()+"";},l:function(){return this.weekdays[this.date.getDay()];},N:function(){var w=this.w();return (!w)?7:w;},S:function(){switch(this.date.getDate()){case 11:case 12:case 13:return "th";case 1:case 21:case 31:return "st";case 2:case 22:return "nd";case 3:case 23:return "rd";default:return "th";}},w:function(){return this.date.getDay()+"";},z:function(){var _129=this.date.getTime()-new Date(this.date.getFullYear(),0,1).getTime();return Math.floor(_129/86400000)+"";},W:function(){var week;var _12a=new Date(this.date.getFullYear(),0,1).getDay()+1;var w=this.date.getDay()+1;var z=parseInt(this.z());if(z<=(8-_12a)&&_12a>4){var _12b=new Date(this.date.getFullYear()-1,this.date.getMonth(),this.date.getDate());if(_12a==5||(_12a==6&&dojo.date.isLeapYear(_12b))){week=53;}else{week=52;}}else{var i;if(Boolean(this.L())){i=366;}else{i=365;}if((i-z)<(4-w)){week=1;}else{var j=z+(7-w)+(_12a-1);week=Math.ceil(j/7);if(_12a>4){--week;}}}return week;},F:function(){return this.months[this.date.getMonth()];},m:function(){var n=this.n();return (n.length==1)?"0"+n:n;},M:function(){return this.months_3[this.date.getMonth()];},n:function(){return this.date.getMonth()+1+"";},t:function(){return (Boolean(this.L())&&this.date.getMonth()==1)?29:this.monthdays[this.getMonth()];},L:function(){return (dojo.date.isLeapYear(this.date))?"1":"0";},o:function(){},Y:function(){return this.date.getFullYear()+"";},y:function(){return this.Y().slice(-2);},a:function(){return this.date.getHours()>=12?"pm":"am";},b:function(){return this.a().toUpperCase();},B:function(){var off=this.date.getTimezoneOffset()+60;var secs=(this.date.getHours()*3600)+(this.date.getMinutes()*60)+this.getSeconds()+(off*60);var beat=Math.abs(Math.floor(secs/86.4)%1000)+"";while(beat.length<2){beat="0"+beat;}return beat;},g:function(){return (this.date.getHours()>12)?this.date.getHours()-12+"":this.date.getHours()+"";},G:function(){return this.date.getHours()+"";},h:function(){var g=this.g();return (g.length==1)?"0"+g:g;},H:function(){var G=this.G();return (G.length==1)?"0"+G:G;},i:function(){var mins=this.date.getMinutes()+"";return (mins.length==1)?"0"+mins:mins;},s:function(){var secs=this.date.getSeconds()+"";return (secs.length==1)?"0"+secs:secs;},e:function(){return dojo.date.getTimezoneName(this.date);},I:function(){},O:function(){var off=Math.abs(this.date.getTimezoneOffset());var _12c=Math.floor(off/60)+"";var mins=(off%60)+"";if(_12c.length==1){_12c="0"+_12c;}if(mins.length==1){_12c="0"+mins;}return ((this.date.getTimezoneOffset()<0)?"+":"-")+_12c+mins;},P:function(){var O=this.O();return O.substring(0,2)+":"+O.substring(2,4);},T:function(){return this.e().substring(0,3);},Z:function(){return this.date.getTimezoneOffset()*-60;},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.h()+":"+this.i()+":"+this.s()+this.P();},r:function(){return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();},U:function(){return Math.floor(this.date.getTime()/1000);}});}if(!dojo._hasResource["dojox.dtl.utils.date"]){dojo._hasResource["dojox.dtl.utils.date"]=true;dojo.provide("dojox.dtl.utils.date");dojox.dtl.utils.date.DateFormat=function(_12d){dojox.date.php.DateFormat.call(this,_12d);};dojo.extend(dojox.dtl.utils.date.DateFormat,dojox.date.php.DateFormat.prototype,{f:function(){return (!this.date.getMinutes())?this.g():this.g()+":"+this.i();},N:function(){return dojox.dtl.utils.date._months_ap[this.date.getMonth()];},P:function(){if(!this.date.getMinutes()&&!this.date.getHours()){return "midnight";}if(!this.date.getMinutes()&&this.date.getHours()==12){return "noon";}return this.f()+" "+this.a();}});dojo.mixin(dojox.dtl.utils.date,{format:function(date,_12e){var df=new dojox.dtl.utils.date.DateFormat(_12e);return df.format(date);},timesince:function(d,now){if(!(d instanceof Date)){d=new Date(d.year,d.month,d.day);}if(!now){now=new Date();}var _12f=Math.abs(now.getTime()-d.getTime());for(var i=0,_130;_130=dojox.dtl.utils.date._chunks[i];i++){var _131=Math.floor(_12f/_130[0]);if(_131){break;}}return _131+" "+_130[1](_131);},_chunks:[[60*60*24*365*1000,function(n){return (n==1)?"year":"years";}],[60*60*24*30*1000,function(n){return (n==1)?"month":"months";}],[60*60*24*7*1000,function(n){return (n==1)?"week":"weeks";}],[60*60*24*1000,function(n){return (n==1)?"day":"days";}],[60*60*1000,function(n){return (n==1)?"hour":"hours";}],[60*1000,function(n){return (n==1)?"minute":"minutes";}]],_months_ap:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."]});}if(!dojo._hasResource["dojox.dtl.tag.date"]){dojo._hasResource["dojox.dtl.tag.date"]=true;dojo.provide("dojox.dtl.tag.date");dojox.dtl.tag.date.NowNode=function(_132,node){this._format=_132;this.format=new dojox.dtl.utils.date.DateFormat(_132);this.contents=node;};dojo.extend(dojox.dtl.tag.date.NowNode,{render:function(_133,_134){this.contents.set(this.format.format(new Date()));return this.contents.render(_133,_134);},unrender:function(_135,_136){return this.contents.unrender(_135,_136);},clone:function(_137){return new this.constructor(this._format,this.contents.clone(_137));}});dojox.dtl.tag.date.now=function(_138,_139){var _13a=_139.split_contents();if(_13a.length!=2){throw new Error("'now' statement takes one argument");}return new dojox.dtl.tag.date.NowNode(_13a[1].slice(1,-1),_138.create_text_node());};}if(!dojo._hasResource["dojox.dtl.tag.loader"]){dojo._hasResource["dojox.dtl.tag.loader"]=true;dojo.provide("dojox.dtl.tag.loader");(function(){var dd=dojox.dtl;var ddtl=dd.tag.loader;ddtl.BlockNode=dojo.extend(function(name,_13b){this.name=name;this.nodelist=_13b;},{"super":function(){if(this.parent){var html=this.parent.nodelist.dummyRender(this.context,null,true);if(typeof html=="string"){html=new String(html);}html.safe=true;return html;}return "";},render:function(_13c,_13d){var name=this.name;var _13e=this.nodelist;var _13f;if(_13d.blocks){var _140=_13d.blocks[name];if(_140){_13f=_140.parent;_13e=_140.nodelist;_140.used=true;}}this.rendered=_13e;_13c=_13c.push();this.context=_13c;this.parent=null;if(_13e!=this.nodelist){this.parent=this;}_13c.block=this;if(_13d.getParent){var _141=_13d.getParent();var _142=dojo.connect(_13d,"onSetParent",function(node,up,root){if(up&&root){_13d.setParent(_141);}});}_13d=_13e.render(_13c,_13d,this);_142&&dojo.disconnect(_142);_13c=_13c.pop();return _13d;},unrender:function(_143,_144){return this.rendered.unrender(_143,_144);},clone:function(_145){return new this.constructor(this.name,this.nodelist.clone(_145));},toString:function(){return "dojox.dtl.tag.loader.BlockNode";}});ddtl.ExtendsNode=dojo.extend(function(_146,_147,_148,_149,key){this.getTemplate=_146;this.nodelist=_147;this.shared=_148;this.parent=_149;this.key=key;},{parents:{},getParent:function(_14a){var _14b=this.parent;if(!_14b){var _14c;_14b=this.parent=_14a.get(this.key,false);if(!_14b){throw new Error("extends tag used a variable that did not resolve");}if(typeof _14b=="object"){var url=_14b.url||_14b.templatePath;if(_14b.shared){this.shared=true;}if(url){_14b=this.parent=url.toString();}else{if(_14b.templateString){_14c=_14b.templateString;_14b=this.parent=" ";}else{_14b=this.parent=this.parent.toString();}}}if(_14b&&_14b.indexOf("shared:")===0){this.shared=true;_14b=this.parent=_14b.substring(7,_14b.length);}}if(!_14b){throw new Error("Invalid template name in 'extends' tag.");}if(_14b.render){return _14b;}if(this.parents[_14b]){return this.parents[_14b];}this.parent=this.getTemplate(_14c||dojox.dtl.text.getTemplateString(_14b));if(this.shared){this.parents[_14b]=this.parent;}return this.parent;},render:function(_14d,_14e){var _14f=this.getParent(_14d);_14f.blocks=_14f.blocks||{};_14e.blocks=_14e.blocks||{};for(var i=0,node;node=this.nodelist.contents[i];i++){if(node instanceof dojox.dtl.tag.loader.BlockNode){var old=_14f.blocks[node.name];if(old&&old.nodelist!=node.nodelist){_14e=old.nodelist.unrender(_14d,_14e);}_14f.blocks[node.name]=_14e.blocks[node.name]={shared:this.shared,nodelist:node.nodelist,used:false};}}this.rendered=_14f;return _14f.nodelist.render(_14d,_14e,this);},unrender:function(_150,_151){return this.rendered.unrender(_150,_151,this);},toString:function(){return "dojox.dtl.block.ExtendsNode";}});ddtl.IncludeNode=dojo.extend(function(path,_152,_153,text,_154){this._path=path;this.constant=_152;this.path=(_152)?path:new dd._Filter(path);this.getTemplate=_153;this.text=text;this.parsed=(arguments.length==5)?_154:true;},{_cache:[{},{}],render:function(_155,_156){var _157=((this.constant)?this.path:this.path.resolve(_155)).toString();var _158=Number(this.parsed);var _159=false;if(_157!=this.last){_159=true;if(this.last){_156=this.unrender(_155,_156);}this.last=_157;}var _15a=this._cache[_158];if(_158){if(!_15a[_157]){_15a[_157]=dd.text._resolveTemplateArg(_157,true);}if(_159){var _15b=this.getTemplate(_15a[_157]);this.rendered=_15b.nodelist;}return this.rendered.render(_155,_156,this);}else{if(this.text instanceof dd._TextNode){if(_159){this.rendered=this.text;this.rendered.set(dd.text._resolveTemplateArg(_157,true));}return this.rendered.render(_155,_156);}else{if(!_15a[_157]){var _15c=[];var div=document.createElement("div");div.innerHTML=dd.text._resolveTemplateArg(_157,true);var _15d=div.childNodes;while(_15d.length){var _15e=div.removeChild(_15d[0]);_15c.push(_15e);}_15a[_157]=_15c;}if(_159){this.nodelist=[];var _15f=true;for(var i=0,_160;_160=_15a[_157][i];i++){this.nodelist.push(_160.cloneNode(true));}}for(var i=0,node;node=this.nodelist[i];i++){_156=_156.concat(node);}}}return _156;},unrender:function(_161,_162){if(this.rendered){_162=this.rendered.unrender(_161,_162);}if(this.nodelist){for(var i=0,node;node=this.nodelist[i];i++){_162=_162.remove(node);}}return _162;},clone:function(_163){return new this.constructor(this._path,this.constant,this.getTemplate,this.text.clone(_163),this.parsed);}});dojo.mixin(ddtl,{block:function(_164,_165){var _166=_165.contents.split();var name=_166[1];_164._blocks=_164._blocks||{};_164._blocks[name]=_164._blocks[name]||[];_164._blocks[name].push(name);var _167=_164.parse(["endblock","endblock "+name]).rtrim();_164.next_token();return new dojox.dtl.tag.loader.BlockNode(name,_167);},extends_:function(_168,_169){var _16a=_169.contents.split();var _16b=false;var _16c=null;var key=null;if(_16a[1].charAt(0)=="\""||_16a[1].charAt(0)=="'"){_16c=_16a[1].substring(1,_16a[1].length-1);}else{key=_16a[1];}if(_16c&&_16c.indexOf("shared:")==0){_16b=true;_16c=_16c.substring(7,_16c.length);}var _16d=_168.parse();return new dojox.dtl.tag.loader.ExtendsNode(_168.getTemplate,_16d,_16b,_16c,key);},include:function(_16e,_16f){var _170=_16f.contents.split();if(_170.length!=2){throw new Error(_170[0]+" tag takes one argument: the name of the template to be included");}var path=_170[1];var _171=false;if((path.charAt(0)=="\""||path.slice(-1)=="'")&&path.charAt(0)==path.slice(-1)){path=path.slice(1,-1);_171=true;}return new ddtl.IncludeNode(path,_171,_16e.getTemplate,_16e.create_text_node());},ssi:function(_172,_173){var _174=_173.contents.split();var _175=false;if(_174.length==3){_175=(_174.pop()=="parsed");if(!_175){throw new Error("Second (optional) argument to ssi tag must be 'parsed'");}}var node=ddtl.include(_172,new dd.Token(_173.token_type,_174.join(" ")));node.parsed=_175;return node;}});})();}if(!dojo._hasResource["dojox.dtl.tag.misc"]){dojo._hasResource["dojox.dtl.tag.misc"]=true;dojo.provide("dojox.dtl.tag.misc");(function(){var dd=dojox.dtl;var ddtm=dd.tag.misc;ddtm.DebugNode=dojo.extend(function(text){this.text=text;},{render:function(_176,_177){var keys=_176.getKeys();var _178=[];var only={};for(var i=0,key;key=keys[i];i++){only[key]=_176[key];_178+="["+key+": "+typeof _176[key]+"]\n";}return this.text.set(_178).render(_176,_177,this);},unrender:function(_179,_17a){return _17a;},clone:function(_17b){return new this.constructor(this.text.clone(_17b));},toString:function(){return "ddtm.DebugNode";}});ddtm.FilterNode=dojo.extend(function(_17c,_17d){this._varnode=_17c;this._nodelist=_17d;},{render:function(_17e,_17f){var _180=this._nodelist.render(_17e,new dojox.string.Builder());_17e=_17e.update({"var":_180.toString()});var _181=this._varnode.render(_17e,_17f);_17e=_17e.pop();return _17f;},unrender:function(_182,_183){return _183;},clone:function(_184){return new this.constructor(this._expression,this._nodelist.clone(_184));}});ddtm.FirstOfNode=dojo.extend(function(vars,text){this._vars=vars;this.vars=dojo.map(vars,function(item){return new dojox.dtl._Filter(item);});this.contents=text;},{render:function(_185,_186){for(var i=0,item;item=this.vars[i];i++){var _187=item.resolve(_185);if(typeof _187!="undefined"){if(_187===null){_187="null";}this.contents.set(_187);return this.contents.render(_185,_186);}}return this.contents.unrender(_185,_186);},unrender:function(_188,_189){return this.contents.unrender(_188,_189);},clone:function(_18a){return new this.constructor(this._vars,this.contents.clone(_18a));}});ddtm.SpacelessNode=dojo.extend(function(_18b,text){this.nodelist=_18b;this.contents=text;},{render:function(_18c,_18d){if(_18d.getParent){var _18e=[dojo.connect(_18d,"onAddNodeComplete",this,"_watch"),dojo.connect(_18d,"onSetParent",this,"_watchParent")];_18d=this.nodelist.render(_18c,_18d);dojo.disconnect(_18e[0]);dojo.disconnect(_18e[1]);}else{var _18f=this.nodelist.dummyRender(_18c);this.contents.set(_18f.replace(/>\s+</g,"><"));_18d=this.contents.render(_18c,_18d);}return _18d;},unrender:function(_190,_191){return this.nodelist.unrender(_190,_191);},clone:function(_192){return new this.constructor(this.nodelist.clone(_192),this.contents.clone(_192));},_isEmpty:function(node){return (node.nodeType==3&&!node.data.match(/[^\s\n]/));},_watch:function(node){if(this._isEmpty(node)){var _193=false;if(node.parentNode.firstChild==node){node.parentNode.removeChild(node);}}else{var _194=node.parentNode.childNodes;if(node.nodeType==1&&_194.length>2){for(var i=2,_195;_195=_194[i];i++){if(_194[i-2].nodeType==1&&this._isEmpty(_194[i-1])){node.parentNode.removeChild(_194[i-1]);return;}}}}},_watchParent:function(node){var _196=node.childNodes;if(_196.length){while(node.childNodes.length){var last=node.childNodes[node.childNodes.length-1];if(!this._isEmpty(last)){return;}node.removeChild(last);}}}});ddtm.TemplateTagNode=dojo.extend(function(tag,text){this.tag=tag;this.contents=text;},{mapping:{openblock:"{%",closeblock:"%}",openvariable:"{{",closevariable:"}}",openbrace:"{",closebrace:"}",opencomment:"{#",closecomment:"#}"},render:function(_197,_198){this.contents.set(this.mapping[this.tag]);return this.contents.render(_197,_198);},unrender:function(_199,_19a){return this.contents.unrender(_199,_19a);},clone:function(_19b){return new this.constructor(this.tag,this.contents.clone(_19b));}});ddtm.WidthRatioNode=dojo.extend(function(_19c,max,_19d,text){this.current=new dd._Filter(_19c);this.max=new dd._Filter(max);this.width=_19d;this.contents=text;},{render:function(_19e,_19f){var _1a0=+this.current.resolve(_19e);var max=+this.max.resolve(_19e);if(typeof _1a0!="number"||typeof max!="number"||!max){this.contents.set("");}else{this.contents.set(""+Math.round((_1a0/max)*this.width));}return this.contents.render(_19e,_19f);},unrender:function(_1a1,_1a2){return this.contents.unrender(_1a1,_1a2);},clone:function(_1a3){return new this.constructor(this.current.getExpression(),this.max.getExpression(),this.width,this.contents.clone(_1a3));}});ddtm.WithNode=dojo.extend(function(_1a4,_1a5,_1a6){this.target=new dd._Filter(_1a4);this.alias=_1a5;this.nodelist=_1a6;},{render:function(_1a7,_1a8){var _1a9=this.target.resolve(_1a7);_1a7=_1a7.push();_1a7[this.alias]=_1a9;_1a8=this.nodelist.render(_1a7,_1a8);_1a7=_1a7.pop();return _1a8;},unrender:function(_1aa,_1ab){return _1ab;},clone:function(_1ac){return new this.constructor(this.target.getExpression(),this.alias,this.nodelist.clone(_1ac));}});dojo.mixin(ddtm,{comment:function(_1ad,_1ae){_1ad.skip_past("endcomment");return dd._noOpNode;},debug:function(_1af,_1b0){return new ddtm.DebugNode(_1af.create_text_node());},filter:function(_1b1,_1b2){var rest=_1b2.contents.split(null,1)[1];var _1b3=_1b1.create_variable_node("var|"+rest);var _1b4=_1b1.parse(["endfilter"]);_1b1.next_token();return new ddtm.FilterNode(_1b3,_1b4);},firstof:function(_1b5,_1b6){var _1b7=_1b6.split_contents().slice(1);if(!_1b7.length){throw new Error("'firstof' statement requires at least one argument");}return new ddtm.FirstOfNode(_1b7,_1b5.create_text_node());},spaceless:function(_1b8,_1b9){var _1ba=_1b8.parse(["endspaceless"]);_1b8.delete_first_token();return new ddtm.SpacelessNode(_1ba,_1b8.create_text_node());},templatetag:function(_1bb,_1bc){var _1bd=_1bc.contents.split();if(_1bd.length!=2){throw new Error("'templatetag' statement takes one argument");}var tag=_1bd[1];var _1be=ddtm.TemplateTagNode.prototype.mapping;if(!_1be[tag]){var keys=[];for(var key in _1be){keys.push(key);}throw new Error("Invalid templatetag argument: '"+tag+"'. Must be one of: "+keys.join(", "));}return new ddtm.TemplateTagNode(tag,_1bb.create_text_node());},widthratio:function(_1bf,_1c0){var _1c1=_1c0.contents.split();if(_1c1.length!=4){throw new Error("widthratio takes three arguments");}var _1c2=+_1c1[3];if(typeof _1c2!="number"){throw new Error("widthratio final argument must be an integer");}return new ddtm.WidthRatioNode(_1c1[1],_1c1[2],_1c2,_1bf.create_text_node());},with_:function(_1c3,_1c4){var _1c5=_1c4.split_contents();if(_1c5.length!=4||_1c5[2]!="as"){throw new Error("do_width expected format as 'with value as name'");}var _1c6=_1c3.parse(["endwith"]);_1c3.next_token();return new ddtm.WithNode(_1c5[1],_1c5[3],_1c6);}});})();}if(!dojo._hasResource["dojox.dtl.ext-dojo.NodeList"]){dojo._hasResource["dojox.dtl.ext-dojo.NodeList"]=true;dojo.provide("dojox.dtl.ext-dojo.NodeList");dojo.extend(dojo.NodeList,{dtl:function(_1c7,_1c8){var d=dojox.dtl;var self=this;var _1c9=function(_1ca,_1cb){var _1cc=_1ca.render(new d._Context(_1cb));self.forEach(function(node){node.innerHTML=_1cc;});};d.text._resolveTemplateArg(_1c7).addCallback(function(_1cd){_1c7=new d.Template(_1cd);d.text._resolveContextArg(_1c8).addCallback(function(_1ce){_1c9(_1c7,_1ce);});});return this;}});}
