/*
	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 _4="",l=arguments.length;switch(l){case 9:_4=""+arguments[8]+_4;case 8:_4=""+arguments[7]+_4;case 7:_4=""+arguments[6]+_4;case 6:_4=""+arguments[5]+_4;case 5:_4=""+arguments[4]+_4;case 4:_4=""+arguments[3]+_4;case 3:_4=""+arguments[2]+_4;case 2:b+=""+arguments[0]+arguments[1]+_4;break;default:var i=0;while(i<arguments.length){_4+=arguments[i++];}b+=_4;}}else{b+=s;}this.length=b.length;return this;};this.concat=function(s){return this.append.apply(this,arguments);};this.appendArray=function(_8){return this.append.apply(this,_8);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_9,_a){b=b.replace(_9,_a);this.length=b.length;return this;};this.remove=function(_b,_c){if(_c===undefined){_c=b.length;}if(_c==0){return this;}b=b.substr(0,_b)+b.substr(_b+_c);this.length=b.length;return this;};this.insert=function(_d,_e){if(_d==0){b=_e+b;}else{b=b.slice(0,_d)+_e+b.slice(_d);}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(_f,re,_11,_12){var _13=[];var _14,_15,_16=0;while(_14=re.exec(_f)){_15=_f.slice(_16,re.lastIndex-_14[0].length);if(_15.length){_13.push(_15);}if(_11){if(dojo.isOpera){var _17=_14.slice(0);while(_17.length<_14.length){_17.push(null);}_14=_17;}var _18=_11.apply(_12,_14.slice(1).concat(_13.length));if(typeof _18!="undefined"){_13.push(_18);}}_16=re.lastIndex;}_15=_f.slice(_16);if(_15.length){_13.push(_15);}return _13;};}if(!dojo._hasResource["dojox.dtl._base"]){dojo._hasResource["dojox.dtl._base"]=true;dojo.provide("dojox.dtl._base");(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(_1a){dojo._mixin(this,_1a||{});this._dicts=[];},{push:function(){var _1b=this;var _1c=dojo.delegate(this);_1c.pop=function(){return _1b;};return _1c;},pop:function(){throw new Error("pop() called on empty Context");},get:function(key,_1e){if(typeof this[key]!="undefined"){return this._normalize(this[key]);}for(var i=0,_20;_20=this._dicts[i];i++){if(typeof _20[key]!="undefined"){return this._normalize(_20[key]);}}return _1e;},_normalize:function(_21){if(_21 instanceof Date){_21.year=_21.getFullYear();_21.month=_21.getMonth()+1;_21.day=_21.getDate();_21.date=_21.year+"-"+("0"+_21.month).slice(-2)+"-"+("0"+_21.day).slice(-2);_21.hour=_21.getHours();_21.minute=_21.getMinutes();_21.second=_21.getSeconds();_21.microsecond=_21.getMilliseconds();}return _21;},update:function(_22){var _23=this.push();if(_22){dojo._mixin(this,_22);}return _23;}});var _24=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _25=/\s+/g;var _26=function(_27,_28){_27=_27||_25;if(!(_27 instanceof RegExp)){_27=new RegExp(_27,"g");}if(!_27.global){throw new Error("You must use a globally flagged RegExp with split "+_27);}_27.exec("");var _29,_2a=[],_2b=0,i=0;while(_29=_27.exec(this)){_2a.push(this.slice(_2b,_27.lastIndex-_29[0].length));_2b=_27.lastIndex;if(_28&&(++i>_28-1)){break;}}_2a.push(this.slice(_2b));return _2a;};dd.Token=function(_2d,_2e){this.token_type=_2d;this.contents=new String(dojo.trim(_2e));this.contents.split=_26;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_2f){var bit,_31=[],i=0;_2f=_2f||999;while(i++<_2f&&(bit=_24.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_31.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_31.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_31.push(bit);}}}return _31;};var ddt=dd.text={_get:function(_34,_35,_36){var _37=dd.register.get(_34,_35.toLowerCase(),_36);if(!_37){if(!_36){throw new Error("No tag found for "+_35);}return null;}var fn=_37[1];var _39=_37[2];var _3a;if(fn.indexOf(":")!=-1){_3a=fn.split(":");fn=_3a.pop();}dojo["require"](_39);var _3b=dojo.getObject(_39);return _3b[fn||_35]||_3b[_35+"_"]||_3b[fn+"_"];},getTag:function(_3c,_3d){return ddt._get("tag",_3c,_3d);},getFilter:function(_3e,_3f){return ddt._get("filter",_3e,_3f);},getTemplate:function(_40){return new dd.Template(ddt.getTemplateString(_40));},getTemplateString:function(_41){return dojo._getText(_41.toString())||"";},_resolveLazy:function(_42,_43,_44){if(_43){if(_44){return dojo.fromJson(dojo._getText(_42))||{};}else{return dd.text.getTemplateString(_42);}}else{return dojo.xhrGet({handleAs:(_44)?"json":"text",url:_42});}},_resolveTemplateArg:function(arg,_46){if(ddt._isTemplate(arg)){if(!_46){var d=new dojo.Deferred();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_46);},_isTemplate:function(arg){return (typeof arg=="undefined")||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));},_resolveContextArg:function(arg,_4a){if(arg.constructor==Object){if(!_4a){var d=new dojo.Deferred;d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_4a,true);},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){return dojox.string.tokenize(str,ddt._re,ddt._parseDelims);},_parseDelims:function(_4d,_4e,tag){if(_4d){return [dd.TOKEN_VAR,_4d];}else{if(_4e){var _50=dojo.trim(tag).split(/\s+/g);for(var i=0,_52;_52=_50[i];i++){dojo["require"](_52);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=dojo.extend(function(_53,_54){var str=_54?_53:ddt._resolveTemplateArg(_53,true)||"";var _56=ddt.tokenize(str);var _57=new dd._Parser(_56);this.nodelist=_57.parse();},{update:function(_58,_59){return ddt._resolveContextArg(_59).addCallback(this,function(_5a){var _5b=this.render(new dd._Context(_5a));if(_58.forEach){_58.forEach(function(_5c){_5c.innerHTML=_5b;});}else{dojo.byId(_58).innerHTML=_5b;}return this;});},render:function(_5d,_5e){_5e=_5e||this.getBuffer();_5d=_5d||new dd._Context({});return this.nodelist.render(_5d,_5e)+"";},getBuffer:function(){return new dojox.string.Builder();}});var _5f=/\{\{\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,_5f,function(_61){return new dd._Filter(_61);}));}};dd._QuickNodeList=dojo.extend(function(_62){this.contents=_62;},{render:function(_63,_64){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_64=_64.concat(this.contents[i].resolve(_63));}else{_64=_64.concat(this.contents[i]);}}return _64;},dummyRender:function(_67){return this.render(_67,dd.Template.prototype.getBuffer()).toString();},clone:function(_68){return this;}});dd._Filter=dojo.extend(function(_69){if(!_69){throw new Error("Filter must be called with variable name");}this.contents=_69;var _6a=this._cache[_69];if(_6a){this.key=_6a[0];this.filters=_6a[1];}else{this.filters=[];dojox.string.tokenize(_69,this._re,this._tokenize,this);this._cache[_69]=[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 _6f=arguments[pos];if(this._args[pos]=="'"){_6f=_6f.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_6f=_6f.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_6f];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(_71){var str=this.resolvePath(this.key,_71);for(var i=0,_74;_74=this.filters[i];i++){if(_74[1]){if(_74[1][0]){str=_74[0](str,this.resolvePath(_74[1][1],_71));}else{str=_74[0](str,_74[1][1]);}}else{str=_74[0](str);}}return str;},resolvePath:function(_75,_76){var _77,_78;var _79=_75.charAt(0);var _7a=_75.slice(-1);if(!isNaN(parseInt(_79))){_77=(_75.indexOf(".")==-1)?parseInt(_75):parseFloat(_75);}else{if(_79=="\""&&_79==_7a){_77=_75.slice(1,-1);}else{if(_75=="true"){return true;}if(_75=="false"){return false;}if(_75=="null"||_75=="None"){return null;}_78=_75.split(".");_77=_76.get(_78[0]);for(var i=1;i<_78.length;i++){var _7c=_78[i];if(_77){var _7d=_77;if(dojo.isObject(_77)&&_7c=="items"&&typeof _77[_7c]=="undefined"){var _7e=[];for(var key in _77){_7e.push([key,_77[key]]);}_77=_7e;continue;}if(_77.get&&dojo.isFunction(_77.get)&&_77.get.safe){_77=_77.get(_7c);}else{if(typeof _77[_7c]=="undefined"){_77=_77[_7c];break;}else{_77=_77[_7c];}}if(dojo.isFunction(_77)){if(_77.alters_data){_77="";}else{_77=_77.call(_7d);}}else{if(_77 instanceof Date){_77=dd._Context.prototype._normalize(_77);}}}else{return "";}}}}return _77;}});dd._TextNode=dd._Node=dojo.extend(function(obj){this.contents=obj;},{set:function(_81){this.contents=_81;return this;},render:function(_82,_83){return _83.concat(this.contents);},isEmpty:function(){return !dojo.trim(this.contents);},clone:function(){return this;}});dd._NodeList=dojo.extend(function(_84){this.contents=_84||[];this.last="";},{push:function(_85){this.contents.push(_85);return this;},concat:function(_86){this.contents=this.contents.concat(_86);return this;},render:function(_87,_88){for(var i=0;i<this.contents.length;i++){_88=this.contents[i].render(_87,_88);if(!_88){throw new Error("Template must return buffer");}}return _88;},dummyRender:function(_8a){return this.render(_8a,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(_8c,_8d){var str=this.contents.resolve(_8c);if(!str.safe){str=dd._base.escape(""+str);}return _8d.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};};dd._Parser=dojo.extend(function(_8f){this.contents=_8f;},{i:0,parse:function(_90){var _91={};_90=_90||[];for(var i=0;i<_90.length;i++){_91[_90[i]]=true;}var _93=new dd._NodeList();while(this.i<this.contents.length){token=this.contents[this.i++];if(typeof token=="string"){_93.push(new dd._TextNode(token));}else{var _94=token[0];var _95=token[1];if(_94==dd.TOKEN_VAR){_93.push(new dd._VarNode(_95));}else{if(_94==dd.TOKEN_BLOCK){if(_91[_95]){--this.i;return _93;}var cmd=_95.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_93.push(fn(this,new dd.Token(_94,_95)));}}}}}}if(_90.length){throw new Error("Could not find closing tag(s): "+_90.toString());}this.contents.length=0;return _93;},next_token:function(){var _98=this.contents[this.i++];return new dd.Token(_98[0],_98[1]);},delete_first_token:function(){this.i++;},skip_past:function(_99){while(this.i<this.contents.length){var _9a=this.contents[this.i++];if(_9a[0]==dd.TOKEN_BLOCK&&_9a[1]==_99){return;}}throw new Error("Unclosed tag found when looking for "+_99);},create_variable_node:function(_9b){return new dd._VarNode(_9b);},create_text_node:function(_9c){return new dd._TextNode(_9c||"");},getTemplate:function(_9d){return new dd.Template(_9d);}});dd.register={_registry:{attributes:[],tags:[],filters:[]},get:function(_9e,_9f){var _a0=dd.register._registry[_9e+"s"];for(var i=0,_a2;_a2=_a0[i];i++){if(typeof _a2[0]=="string"){if(_a2[0]==_9f){return _a2;}}else{if(_9f.match(_a2[0])){return _a2;}}}},getAttributeTags:function(){var _a3=[];var _a4=dd.register._registry.attributes;for(var i=0,_a6;_a6=_a4[i];i++){if(_a6.length==3){_a3.push(_a6);}else{var fn=dojo.getObject(_a6[1]);if(fn&&dojo.isFunction(fn)){_a6.push(fn);_a3.push(_a6);}}}return _a3;},_any:function(_a8,_a9,_aa){for(var _ab in _aa){for(var i=0,fn;fn=_aa[_ab][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 _af=fn;if(_af.substr(0,5)=="attr:"){_af=_af.slice(5);}dd.register._registry.attributes.push([_af,_a9+"."+_ab+"."+_af]);}key=key.toLowerCase();}dd.register._registry[_a8].push([key,fn,_a9+"."+_ab]);}}},tags:function(_b0,_b1){dd.register._any("tags",_b0,_b1);},filters:function(_b2,_b3){dd.register._any("filters",_b2,_b3);}};var _b4=/&/g;var _b5=/</g;var _b6=/>/g;var _b7=/'/g;var _b8=/"/g;dd._base.escape=function(_b9){return dd.mark_safe(_b9.replace(_b4,"&amp;").replace(_b5,"&lt;").replace(_b6,"&gt;").replace(_b8,"&quot;").replace(_b7,"&#39;"));};dd._base.safe=function(_ba){if(typeof _ba=="string"){_ba=new String(_ba);}if(typeof _ba=="object"){_ba.safe=true;}return _ba;};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(_bb){this._this={};dojox.dtl._Context.call(this,_bb);},dojox.dtl._Context.prototype,{getKeys:function(){var _bc=[];for(var key in this){if(this.hasOwnProperty(key)&&key!="_dicts"&&key!="_this"){_bc.push(key);}}return _bc;},extend:function(obj){return dojo.delegate(this,obj);},filter:function(_bf){var _c0=new dojox.dtl.Context();var _c1=[];var i,arg;if(_bf instanceof dojox.dtl.Context){_c1=_bf.getKeys();}else{if(typeof _bf=="object"){for(var key in _bf){_c1.push(key);}}else{for(i=0;arg=arguments[i];i++){if(typeof arg=="string"){_c1.push(arg);}}}}for(i=0,key;key=_c1[i];i++){_c0[key]=this[key];}return _c0;},setThis:function(_c5){this._this=_c5;},getThis:function(){return this._this;},hasKey:function(key){if(typeof this[key]!="undefined"){return true;}for(var i=0,_c8;_c8=this._dicts[i];i++){if(typeof _c8[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 _cb=dd.tag.logic;_cb.IfNode=dojo.extend(function(_cc,_cd,_ce,_cf){this.bools=_cc;this.trues=_cd;this.falses=_ce;this.type=_cf;},{render:function(_d0,_d1){var i,_d3,_d4,_d5,_d6;if(this.type=="or"){for(i=0;_d3=this.bools[i];i++){_d4=_d3[0];_d5=_d3[1];_d6=_d5.resolve(_d0);if((_d6&&!_d4)||(_d4&&!_d6)){if(this.falses){_d1=this.falses.unrender(_d0,_d1);}return (this.trues)?this.trues.render(_d0,_d1,this):_d1;}}if(this.trues){_d1=this.trues.unrender(_d0,_d1);}return (this.falses)?this.falses.render(_d0,_d1,this):_d1;}else{for(i=0;_d3=this.bools[i];i++){_d4=_d3[0];_d5=_d3[1];_d6=_d5.resolve(_d0);if(_d6==_d4){if(this.trues){_d1=this.trues.unrender(_d0,_d1);}return (this.falses)?this.falses.render(_d0,_d1,this):_d1;}}if(this.falses){_d1=this.falses.unrender(_d0,_d1);}return (this.trues)?this.trues.render(_d0,_d1,this):_d1;}return _d1;},unrender:function(_d7,_d8){_d8=(this.trues)?this.trues.unrender(_d7,_d8):_d8;_d8=(this.falses)?this.falses.unrender(_d7,_d8):_d8;return _d8;},clone:function(_d9){var _da=(this.trues)?this.trues.clone(_d9):null;var _db=(this.falses)?this.falses.clone(_d9):null;return new this.constructor(this.bools,_da,_db,this.type);}});_cb.IfEqualNode=dojo.extend(function(_dc,_dd,_de,_df,_e0){this.var1=new dd._Filter(_dc);this.var2=new dd._Filter(_dd);this.trues=_de;this.falses=_df;this.negate=_e0;},{render:function(_e1,_e2){var _e3=this.var1.resolve(_e1);var _e4=this.var2.resolve(_e1);if((this.negate&&_e3!=_e4)||(!this.negate&&_e3==_e4)){if(this.falses){_e2=this.falses.unrender(_e1,_e2,this);}return (this.trues)?this.trues.render(_e1,_e2,this):_e2;}if(this.trues){_e2=this.trues.unrender(_e1,_e2,this);}return (this.falses)?this.falses.render(_e1,_e2,this):_e2;},unrender:function(_e5,_e6){return _cb.IfNode.prototype.unrender.call(this,_e5,_e6);},clone:function(_e7){var _e8=this.trues?this.trues.clone(_e7):null;var _e9=this.falses?this.falses.clone(_e7):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_e8,_e9,this.negate);}});_cb.ForNode=dojo.extend(function(_ea,_eb,_ec,_ed){this.assign=_ea;this.loop=new dd._Filter(_eb);this.reversed=_ec;this.nodelist=_ed;this.pool=[];},{render:function(_ee,_ef){var i,j,k;var _f3=false;var _f4=this.assign;for(k=0;k<_f4.length;k++){if(typeof _ee[_f4[k]]!="undefined"){_f3=true;_ee=_ee.push();break;}}if(!_f3&&_ee.forloop){_f3=true;_ee=_ee.push();}var _f5=this.loop.resolve(_ee)||[];for(i=_f5.length;i<this.pool.length;i++){this.pool[i].unrender(_ee,_ef,this);}if(this.reversed){_f5=_f5.slice(0).reverse();}var _f6=dojo.isObject(_f5)&&!dojo.isArrayLike(_f5);var _f7=[];if(_f6){for(var key in _f5){_f7.push(_f5[key]);}}else{_f7=_f5;}var _f9=_ee.forloop={parentloop:_ee.get("forloop",{})};var j=0;for(i=0;i<_f7.length;i++){var _fa=_f7[i];_f9.counter0=j;_f9.counter=j+1;_f9.revcounter0=_f7.length-j-1;_f9.revcounter=_f7.length-j;_f9.first=!j;_f9.last=(j==_f7.length-1);if(_f4.length>1&&dojo.isArrayLike(_fa)){if(!_f3){_f3=true;_ee=_ee.push();}var _fb={};for(k=0;k<_fa.length&&k<_f4.length;k++){_fb[_f4[k]]=_fa[k];}dojo.mixin(_ee,_fb);}else{_ee[_f4[0]]=_fa;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_ef));}_ef=this.pool[j++].render(_ee,_ef,this);}delete _ee.forloop;if(_f3){_ee=_ee.pop();}else{for(k=0;k<_f4.length;k++){delete _ee[_f4[k]];}}return _ef;},unrender:function(_fc,_fd){for(var i=0,_ff;_ff=this.pool[i];i++){_fd=_ff.unrender(_fc,_fd);}return _fd;},clone:function(_100){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_100));}});dojo.mixin(_cb,{if_:function(_101,_102){var i,part,type,_106=[],_107=_102.contents.split();_107.shift();_102=_107.join(" ");_107=_102.split(" and ");if(_107.length==1){type="or";_107=_102.split(" or ");}else{type="and";for(i=0;i<_107.length;i++){if(_107[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;part=_107[i];i++){var not=false;if(part.indexOf("not ")==0){part=part.slice(4);not=true;}_106.push([not,new dd._Filter(part)]);}var _109=_101.parse(["else","endif"]);var _10a=false;var _102=_101.next_token();if(_102.contents=="else"){_10a=_101.parse(["endif"]);_101.next_token();}return new _cb.IfNode(_106,_109,_10a,type);},_ifequal:function(_10b,_10c,_10d){var _10e=_10c.split_contents();if(_10e.length!=3){throw new Error(_10e[0]+" takes two arguments");}var end="end"+_10e[0];var _110=_10b.parse(["else",end]);var _111=false;var _10c=_10b.next_token();if(_10c.contents=="else"){_111=_10b.parse([end]);_10b.next_token();}return new _cb.IfEqualNode(_10e[1],_10e[2],_110,_111,_10d);},ifequal:function(_112,_113){return _cb._ifequal(_112,_113);},ifnotequal:function(_114,_115){return _cb._ifequal(_114,_115,true);},for_:function(_116,_117){var _118=_117.contents.split();if(_118.length<4){throw new Error("'for' statements should have at least four words: "+_117.contents);}var _119=_118[_118.length-1]=="reversed";var _11a=(_119)?-3:-2;if(_118[_118.length+_11a]!="in"){throw new Error("'for' tag received an invalid argument: "+_117.contents);}var _11b=_118.slice(1,_11a).join(" ").split(/ *, */);for(var i=0;i<_11b.length;i++){if(!_11b[i]||_11b[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_117.contents);}}var _11d=_116.parse(["endfor"]);_116.next_token();return new _cb.ForNode(_11b,_118[_118.length+_11a+1],_119,_11d);}});})();}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 ddtl=dd.tag.loop;ddtl.CycleNode=dojo.extend(function(_120,name,text,_123){this.cyclevars=_120;this.name=name;this.contents=text;this.shared=_123||{counter:-1,map:{}};},{render:function(_124,_125){if(_124.forloop&&!_124.forloop.counter0){this.shared.counter=-1;}++this.shared.counter;var _126=this.cyclevars[this.shared.counter%this.cyclevars.length];var map=this.shared.map;if(!map[_126]){map[_126]=new dd._Filter(_126);}_126=map[_126].resolve(_124,_125);if(this.name){_124[this.name]=_126;}this.contents.set(_126);return this.contents.render(_124,_125);},unrender:function(_128,_129){return this.contents.unrender(_128,_129);},clone:function(_12a){return new this.constructor(this.cyclevars,this.name,this.contents.clone(_12a),this.shared);}});ddtl.IfChangedNode=dojo.extend(function(_12b,vars,_12d){this.nodes=_12b;this._vars=vars;this.shared=_12d||{last:null,counter:0};this.vars=dojo.map(vars,function(item){return new dojox.dtl._Filter(item);});},{render:function(_12f,_130){if(_12f.forloop){if(_12f.forloop.counter<=this.shared.counter){this.shared.last=null;}this.shared.counter=_12f.forloop.counter;}var _131;if(this.vars.length){_131=dojo.toJson(dojo.map(this.vars,function(item){return item.resolve(_12f);}));}else{_131=this.nodes.dummyRender(_12f,_130);}if(_131!=this.shared.last){var _133=(this.shared.last===null);this.shared.last=_131;_12f=_12f.push();_12f.ifchanged={firstloop:_133};_130=this.nodes.render(_12f,_130);_12f=_12f.pop();}else{_130=this.nodes.unrender(_12f,_130);}return _130;},unrender:function(_134,_135){return this.nodes.unrender(_134,_135);},clone:function(_136){return new this.constructor(this.nodes.clone(_136),this._vars,this.shared);}});ddtl.RegroupNode=dojo.extend(function(_137,key,_139){this._expression=_137;this.expression=new dd._Filter(_137);this.key=key;this.alias=_139;},{_push:function(_13a,_13b,_13c){if(_13c.length){_13a.push({grouper:_13b,list:_13c});}},render:function(_13d,_13e){_13d[this.alias]=[];var list=this.expression.resolve(_13d);if(list){var last=null;var _141=[];for(var i=0;i<list.length;i++){var id=list[i][this.key];if(last!==id){this._push(_13d[this.alias],last,_141);last=id;_141=[list[i]];}else{_141.push(list[i]);}}this._push(_13d[this.alias],last,_141);}return _13e;},unrender:function(_144,_145){return _145;},clone:function(_146,_147){return this;}});dojo.mixin(ddtl,{cycle:function(_148,_149){var args=_149.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(!_148._namedCycleNodes){throw new Error("No named cycles in template: '"+name+"' is not defined");}if(!_148._namedCycleNodes[name]){throw new Error("Named cycle '"+name+"' does not exist");}return _148._namedCycleNodes[name];}if(args.length>4&&args[args.length-2]=="as"){var name=args[args.length-1];var node=new ddtl.CycleNode(args.slice(1,args.length-2),name,_148.create_text_node());if(!_148._namedCycleNodes){_148._namedCycleNodes={};}_148._namedCycleNodes[name]=node;}else{node=new ddtl.CycleNode(args.slice(1),null,_148.create_text_node());}return node;},ifchanged:function(_14f,_150){var _151=_150.contents.split();var _152=_14f.parse(["endifchanged"]);_14f.delete_first_token();return new ddtl.IfChangedNode(_152,_151.slice(1));},regroup:function(_153,_154){var _155=dojox.string.tokenize(_154.contents,/(\s+)/g,function(_156){return _156;});if(_155.length<11||_155[_155.length-3]!="as"||_155[_155.length-7]!="by"){throw new Error("Expected the format: regroup list by key as newList");}var _157=_155.slice(2,-8).join("");var key=_155[_155.length-5];var _159=_155[_155.length-1];return new ddtl.RegroupNode(_157,key,_159);}});})();}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_15a){var _15b=_15a.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_15b==1&&dojo.date.isLeapYear(_15a)){return 29;}return days[_15b];};dojo.date.isLeapYear=function(_15d){var year=_15d.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_15f){var str=_15f.toString();var tz="";var _162;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_162=str.match(pat))){tz=_162[1];}else{str=_15f.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_162=str.match(pat))){tz=_162[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_165,_166,_167){_165=new Date(Number(_165));_166=new Date(Number(_166||new Date()));if(_167!=="undefined"){if(_167=="date"){_165.setHours(0,0,0,0);_166.setHours(0,0,0,0);}else{if(_167=="time"){_165.setFullYear(0,0,0);_166.setFullYear(0,0,0);}}}if(_165>_166){return 1;}if(_165<_166){return -1;}return 0;};dojo.date.add=function(date,_169,_16a){var sum=new Date(Number(date));var _16c=false;var _16d="Date";switch(_169){case "day":break;case "weekday":var days,_16f;var mod=_16a%5;if(!mod){days=(_16a>0)?5:-5;_16f=(_16a>0)?((_16a-5)/5):((_16a+5)/5);}else{days=mod;_16f=parseInt(_16a/5);}var strt=date.getDay();var adj=0;if(strt==6&&_16a>0){adj=1;}else{if(strt==0&&_16a<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_16a>0)?2:-2;}_16a=(7*_16f)+days+adj;break;case "year":_16d="FullYear";_16c=true;break;case "week":_16a*=7;break;case "quarter":_16a*=3;case "month":_16c=true;_16d="Month";break;case "hour":case "minute":case "second":case "millisecond":_16d="UTC"+_169.charAt(0).toUpperCase()+_169.substring(1)+"s";}if(_16d){sum["set"+_16d](sum["get"+_16d]()+_16a);}if(_16c&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_174,_175,_176){_175=_175||new Date();_176=_176||"day";var _177=_175.getFullYear()-_174.getFullYear();var _178=1;switch(_176){case "quarter":var m1=_174.getMonth();var m2=_175.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_177*4);_178=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_174,_175,"day"));var _17e=parseInt(dojo.date.difference(_174,_175,"week"));var mod=days%7;if(mod==0){days=_17e*5;}else{var adj=0;var aDay=_174.getDay();var bDay=_175.getDay();_17e=parseInt(days/7);mod=days%7;var _183=new Date(_174);_183.setDate(_183.getDate()+(_17e*7));var _184=_183.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 (_184+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 (_184+mod)<0:adj=2;}}}days+=adj;days-=(_17e*2);}_178=days;break;case "year":_178=_177;break;case "month":_178=(_175.getMonth()-_174.getMonth())+(_177*12);break;case "week":_178=parseInt(dojo.date.difference(_174,_175,"day")/7);break;case "day":_178/=24;case "hour":_178/=60;case "minute":_178/=60;case "second":_178/=1000;case "millisecond":_178*=_175.getTime()-_174.getTime();}return Math.round(_178);};}if(!dojo._hasResource["dojox.date.php"]){dojo._hasResource["dojox.date.php"]=true;dojo.provide("dojox.date.php");dojox.date.php.format=function(date,_186){var df=new dojox.date.php.DateFormat(_186);return df.format(date);};dojox.date.php.DateFormat=function(_188){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 _18b=[];this.tokens=dojox.string.tokenize(_188,this.regex,function(_18c,_18d,i){if(_18d){_18b.push([i,_18d]);return _18d;}if(_18c){return _18c.charAt(1);}});this.replacements=_18b;};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,_191;_191=this.replacements[i];i++){this.tokens[_191[0]]=this[_191[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 _194=this.date.getTime()-new Date(this.date.getFullYear(),0,1).getTime();return Math.floor(_194/86400000)+"";},W:function(){var week;var _196=new Date(this.date.getFullYear(),0,1).getDay()+1;var w=this.date.getDay()+1;var z=parseInt(this.z());if(z<=(8-_196)&&_196>4){var _199=new Date(this.date.getFullYear()-1,this.date.getMonth(),this.date.getDate());if(_196==5||(_196==6&&dojo.date.isLeapYear(_199))){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)+(_196-1);week=Math.ceil(j/7);if(_196>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 _1a5=Math.floor(off/60)+"";var mins=(off%60)+"";if(_1a5.length==1){_1a5="0"+_1a5;}if(mins.length==1){_1a5="0"+mins;}return ((this.date.getTimezoneOffset()<0)?"+":"-")+_1a5+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(_1a8){dojox.date.php.DateFormat.call(this,_1a8);};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,_1aa){var df=new dojox.dtl.utils.date.DateFormat(_1aa);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 _1ae=Math.abs(now.getTime()-d.getTime());for(var i=0,_1b0;_1b0=dojox.dtl.utils.date._chunks[i];i++){var _1b1=Math.floor(_1ae/_1b0[0]);if(_1b1){break;}}return _1b1+" "+_1b0[1](_1b1);},_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(_1b8,node){this._format=_1b8;this.format=new dojox.dtl.utils.date.DateFormat(_1b8);this.contents=node;};dojo.extend(dojox.dtl.tag.date.NowNode,{render:function(_1ba,_1bb){this.contents.set(this.format.format(new Date()));return this.contents.render(_1ba,_1bb);},unrender:function(_1bc,_1bd){return this.contents.unrender(_1bc,_1bd);},clone:function(_1be){return new this.constructor(this._format,this.contents.clone(_1be));}});dojox.dtl.tag.date.now=function(_1bf,_1c0){var _1c1=_1c0.split_contents();if(_1c1.length!=2){throw new Error("'now' statement takes one argument");}return new dojox.dtl.tag.date.NowNode(_1c1[1].slice(1,-1),_1bf.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,_1c5){this.name=name;this.nodelist=_1c5;},{"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(_1c7,_1c8){var name=this.name;var _1ca=this.nodelist;var _1cb;if(_1c8.blocks){var _1cc=_1c8.blocks[name];if(_1cc){_1cb=_1cc.parent;_1ca=_1cc.nodelist;_1cc.used=true;}}this.rendered=_1ca;_1c7=_1c7.push();this.context=_1c7;this.parent=null;if(_1ca!=this.nodelist){this.parent=this;}_1c7["block"]=this;if(_1c8.getParent){var _1cd=_1c8.getParent();var _1ce=dojo.connect(_1c8,"onSetParent",function(node,up,root){if(up&&root){_1c8.setParent(_1cd);}});}_1c8=_1ca.render(_1c7,_1c8,this);_1ce&&dojo.disconnect(_1ce);_1c7=_1c7.pop();return _1c8;},unrender:function(_1d2,_1d3){return this.rendered.unrender(_1d2,_1d3);},clone:function(_1d4){return new this.constructor(this.name,this.nodelist.clone(_1d4));},toString:function(){return "dojox.dtl.tag.loader.BlockNode";}});ddtl.ExtendsNode=dojo.extend(function(_1d5,_1d6,_1d7,_1d8,key){this.getTemplate=_1d5;this.nodelist=_1d6;this.shared=_1d7;this.parent=_1d8;this.key=key;},{parents:{},getParent:function(_1da){var _1db=this.parent;if(!_1db){var _1dc;_1db=this.parent=_1da.get(this.key,false);if(!_1db){throw new Error("extends tag used a variable that did not resolve");}if(typeof _1db=="object"){var url=_1db.url||_1db.templatePath;if(_1db.shared){this.shared=true;}if(url){_1db=this.parent=url.toString();}else{if(_1db.templateString){_1dc=_1db.templateString;_1db=this.parent=" ";}else{_1db=this.parent=this.parent.toString();}}}if(_1db&&_1db.indexOf("shared:")==0){this.shared=true;_1db=this.parent=_1db.substring(7,_1db.length);}}if(!_1db){throw new Error("Invalid template name in 'extends' tag.");}if(_1db.render){return _1db;}if(this.parents[_1db]){return this.parents[_1db];}this.parent=this.getTemplate(_1dc||dojox.dtl.text.getTemplateString(_1db));if(this.shared){this.parents[_1db]=this.parent;}return this.parent;},render:function(_1de,_1df){var _1e0=this.getParent(_1de);_1e0.blocks=_1e0.blocks||{};_1df.blocks=_1df.blocks||{};for(var i=0,node;node=this.nodelist.contents[i];i++){if(node instanceof dojox.dtl.tag.loader.BlockNode){var old=_1e0.blocks[node.name];if(old&&old.nodelist!=node.nodelist){_1df=old.nodelist.unrender(_1de,_1df);}_1e0.blocks[node.name]=_1df.blocks[node.name]={shared:this.shared,nodelist:node.nodelist,used:false};}}this.rendered=_1e0;return _1e0.nodelist.render(_1de,_1df,this);},unrender:function(_1e4,_1e5){return this.rendered.unrender(_1e4,_1e5,this);},toString:function(){return "dojox.dtl.block.ExtendsNode";}});ddtl.IncludeNode=dojo.extend(function(path,_1e7,_1e8,text,_1ea){this._path=path;this.constant=_1e7;this.path=(_1e7)?path:new dd._Filter(path);this.getTemplate=_1e8;this.text=text;this.parsed=(arguments.length==5)?_1ea:true;},{_cache:[{},{}],render:function(_1eb,_1ec){var _1ed=((this.constant)?this.path:this.path.resolve(_1eb)).toString();var _1ee=Number(this.parsed);var _1ef=false;if(_1ed!=this.last){_1ef=true;if(this.last){_1ec=this.unrender(_1eb,_1ec);}this.last=_1ed;}var _1f0=this._cache[_1ee];if(_1ee){if(!_1f0[_1ed]){_1f0[_1ed]=dd.text._resolveTemplateArg(_1ed,true);}if(_1ef){var _1f1=this.getTemplate(_1f0[_1ed]);this.rendered=_1f1.nodelist;}return this.rendered.render(_1eb,_1ec,this);}else{if(this.text instanceof dd._TextNode){if(_1ef){this.rendered=this.text;this.rendered.set(dd.text._resolveTemplateArg(_1ed,true));}return this.rendered.render(_1eb,_1ec);}else{if(!_1f0[_1ed]){var _1f2=[];var div=document.createElement("div");div.innerHTML=dd.text._resolveTemplateArg(_1ed,true);var _1f4=div.childNodes;while(_1f4.length){var _1f5=div.removeChild(_1f4[0]);_1f2.push(_1f5);}_1f0[_1ed]=_1f2;}if(_1ef){this.nodelist=[];var _1f6=true;for(var i=0,_1f8;_1f8=_1f0[_1ed][i];i++){this.nodelist.push(_1f8.cloneNode(true));}}for(var i=0,node;node=this.nodelist[i];i++){_1ec=_1ec.concat(node);}}}return _1ec;},unrender:function(_1fa,_1fb){if(this.rendered){_1fb=this.rendered.unrender(_1fa,_1fb);}if(this.nodelist){for(var i=0,node;node=this.nodelist[i];i++){_1fb=_1fb.remove(node);}}return _1fb;},clone:function(_1fe){return new this.constructor(this._path,this.constant,this.getTemplate,this.text.clone(_1fe),this.parsed);}});dojo.mixin(ddtl,{block:function(_1ff,_200){var _201=_200.contents.split();var name=_201[1];_1ff._blocks=_1ff._blocks||{};_1ff._blocks[name]=_1ff._blocks[name]||[];_1ff._blocks[name].push(name);var _203=_1ff.parse(["endblock","endblock "+name]).rtrim();_1ff.next_token();return new dojox.dtl.tag.loader.BlockNode(name,_203);},extends_:function(_204,_205){var _206=_205.contents.split();var _207=false;var _208=null;var key=null;if(_206[1].charAt(0)=="\""||_206[1].charAt(0)=="'"){_208=_206[1].substring(1,_206[1].length-1);}else{key=_206[1];}if(_208&&_208.indexOf("shared:")==0){_207=true;_208=_208.substring(7,_208.length);}var _20a=_204.parse();return new dojox.dtl.tag.loader.ExtendsNode(_204.getTemplate,_20a,_207,_208,key);},include:function(_20b,_20c){var _20d=_20c.contents.split();if(_20d.length!=2){throw new Error(_20d[0]+" tag takes one argument: the name of the template to be included");}var path=_20d[1];var _20f=false;if((path.charAt(0)=="\""||path.slice(-1)=="'")&&path.charAt(0)==path.slice(-1)){path=path.slice(1,-1);_20f=true;}return new ddtl.IncludeNode(path,_20f,_20b.getTemplate,_20b.create_text_node());},ssi:function(_210,_211){var _212=_211.contents.split();var _213=false;if(_212.length==3){_213=(_212.pop()=="parsed");if(!_213){throw new Error("Second (optional) argument to ssi tag must be 'parsed'");}}var node=ddtl.include(_210,new dd.Token(_211.token_type,_212.join(" ")));node.parsed=_213;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(_218,_219){var keys=_218.getKeys();var _21b="";for(var i=0,key;key=keys[i];i++){_21b+=key+": "+dojo.toJson(_218[key])+"\n\n";}return this.text.set(_21b).render(_218,_219,this);},unrender:function(_21e,_21f){return _21f;},clone:function(_220){return new this.constructor(this.text.clone(_220));},toString:function(){return "ddtm.DebugNode";}});ddtm.FilterNode=dojo.extend(function(_221,_222){this._varnode=_221;this._nodelist=_222;},{render:function(_223,_224){var _225=this._nodelist.render(_223,new dojox.string.Builder());_223=_223.update({"var":_225.toString()});var _226=this._varnode.render(_223,_224);_223=_223.pop();return _224;},unrender:function(_227,_228){return _228;},clone:function(_229){return new this.constructor(this._expression,this._nodelist.clone(_229));}});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(_22d,_22e){for(var i=0,item;item=this.vars[i];i++){var _231=item.resolve(_22d);if(typeof _231!="undefined"){if(_231===null){_231="null";}this.contents.set(_231);return this.contents.render(_22d,_22e);}}return this.contents.unrender(_22d,_22e);},unrender:function(_232,_233){return this.contents.unrender(_232,_233);},clone:function(_234){return new this.constructor(this._vars,this.contents.clone(_234));}});ddtm.SpacelessNode=dojo.extend(function(_235,text){this.nodelist=_235;this.contents=text;},{render:function(_237,_238){if(_238.getParent){var _239=[dojo.connect(_238,"onAddNodeComplete",this,"_watch"),dojo.connect(_238,"onSetParent",this,"_watchParent")];_238=this.nodelist.render(_237,_238);dojo.disconnect(_239[0]);dojo.disconnect(_239[1]);}else{var _23a=this.nodelist.dummyRender(_237);this.contents.set(_23a.replace(/>\s+</g,"><"));_238=this.contents.render(_237,_238);}return _238;},unrender:function(_23b,_23c){return this.nodelist.unrender(_23b,_23c);},clone:function(_23d){return new this.constructor(this.nodelist.clone(_23d),this.contents.clone(_23d));},_isEmpty:function(node){return (node.nodeType==3&&!node.data.match(/[^\s\n]/));},_watch:function(node){if(this._isEmpty(node)){var _240=false;if(node.parentNode.firstChild==node){node.parentNode.removeChild(node);}}else{var _241=node.parentNode.childNodes;if(node.nodeType==1&&_241.length>2){for(var i=2,_243;_243=_241[i];i++){if(_241[i-2].nodeType==1&&this._isEmpty(_241[i-1])){node.parentNode.removeChild(_241[i-1]);return;}}}}},_watchParent:function(node){var _245=node.childNodes;if(_245.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(_249,_24a){this.contents.set(this.mapping[this.tag]);return this.contents.render(_249,_24a);},unrender:function(_24b,_24c){return this.contents.unrender(_24b,_24c);},clone:function(_24d){return new this.constructor(this.tag,this.contents.clone(_24d));}});ddtm.WidthRatioNode=dojo.extend(function(_24e,max,_250,text){this.current=new dd._Filter(_24e);this.max=new dd._Filter(max);this.width=_250;this.contents=text;},{render:function(_252,_253){var _254=+this.current.resolve(_252);var max=+this.max.resolve(_252);if(typeof _254!="number"||typeof max!="number"||!max){this.contents.set("");}else{this.contents.set(""+Math.round((_254/max)*this.width));}return this.contents.render(_252,_253);},unrender:function(_256,_257){return this.contents.unrender(_256,_257);},clone:function(_258){return new this.constructor(this.current.getExpression(),this.max.getExpression(),this.width,this.contents.clone(_258));}});ddtm.WithNode=dojo.extend(function(_259,_25a,_25b){this.target=new dd._Filter(_259);this.alias=_25a;this.nodelist=_25b;},{render:function(_25c,_25d){var _25e=this.target.resolve(_25c);_25c=_25c.push();_25c[this.alias]=_25e;_25d=this.nodelist.render(_25c,_25d);_25c=_25c.pop();return _25d;},unrender:function(_25f,_260){return _260;},clone:function(_261){return new this.constructor(this.target.getExpression(),this.alias,this.nodelist.clone(_261));}});dojo.mixin(ddtm,{comment:function(_262,_263){_262.skip_past("endcomment");return dd._noOpNode;},debug:function(_264,_265){return new ddtm.DebugNode(_264.create_text_node());},filter:function(_266,_267){var rest=_267.contents.split(null,1)[1];var _269=_266.create_variable_node("var|"+rest);var _26a=_266.parse(["endfilter"]);_266.next_token();return new ddtm.FilterNode(_269,_26a);},firstof:function(_26b,_26c){var _26d=_26c.split_contents().slice(1);if(!_26d.length){throw new Error("'firstof' statement requires at least one argument");}return new ddtm.FirstOfNode(_26d,_26b.create_text_node());},spaceless:function(_26e,_26f){var _270=_26e.parse(["endspaceless"]);_26e.delete_first_token();return new ddtm.SpacelessNode(_270,_26e.create_text_node());},templatetag:function(_271,_272){var _273=_272.contents.split();if(_273.length!=2){throw new Error("'templatetag' statement takes one argument");}var tag=_273[1];var _275=ddtm.TemplateTagNode.prototype.mapping;if(!_275[tag]){var keys=[];for(var key in _275){keys.push(key);}throw new Error("Invalid templatetag argument: '"+tag+"'. Must be one of: "+keys.join(", "));}return new ddtm.TemplateTagNode(tag,_271.create_text_node());},widthratio:function(_278,_279){var _27a=_279.contents.split();if(_27a.length!=4){throw new Error("widthratio takes three arguments");}var _27b=+_27a[3];if(typeof _27b!="number"){throw new Error("widthratio final argument must be an integer");}return new ddtm.WidthRatioNode(_27a[1],_27a[2],_27b,_278.create_text_node());},with_:function(_27c,_27d){var _27e=_27d.split_contents();if(_27e.length!=4||_27e[2]!="as"){throw new Error("do_width expected format as 'with value as name'");}var _27f=_27c.parse(["endwith"]);_27c.next_token();return new ddtm.WithNode(_27e[1],_27e[3],_27f);}});})();}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(_280,_281){var d=dojox.dtl;var self=this;var _284=function(_285,_286){var _287=_285.render(new d._Context(_286));self.forEach(function(node){node.innerHTML=_287;});};d.text._resolveTemplateArg(_280).addCallback(function(_289){_280=new d.Template(_289);d.text._resolveContextArg(_281).addCallback(function(_28a){_284(_280,_28a);});});return this;}});}
