/*
	Copyright (c) 2004-2011, 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
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojo.date"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojo.date"]){_4._hasResource["dojo.date"]=true;_4.provide("dojo.date");_4.getObject("date",true,_4);_4.date.getDaysInMonth=function(_7){var _8=_7.getMonth();var _9=[31,28,31,30,31,30,31,31,30,31,30,31];if(_8==1&&_4.date.isLeapYear(_7)){return 29;}return _9[_8];};_4.date.isLeapYear=function(_a){var _b=_a.getFullYear();return !(_b%400)||(!(_b%4)&&!!(_b%100));};_4.date.getTimezoneName=function(_c){var _d=_c.toString();var tz="";var _e;var _f=_d.indexOf("(");if(_f>-1){tz=_d.substring(++_f,_d.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_e=_d.match(pat))){tz=_e[1];}else{_d=_c.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_e=_d.match(pat))){tz=_e[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};_4.date.compare=function(_10,_11,_12){_10=new Date(+_10);_11=new Date(+(_11||new Date()));if(_12=="date"){_10.setHours(0,0,0,0);_11.setHours(0,0,0,0);}else{if(_12=="time"){_10.setFullYear(0,0,0);_11.setFullYear(0,0,0);}}if(_10>_11){return 1;}if(_10<_11){return -1;}return 0;};_4.date.add=function(_13,_14,_15){var sum=new Date(+_13);var _16=false;var _17="Date";switch(_14){case "day":break;case "weekday":var _18,_19;var mod=_15%5;if(!mod){_18=(_15>0)?5:-5;_19=(_15>0)?((_15-5)/5):((_15+5)/5);}else{_18=mod;_19=parseInt(_15/5);}var _1a=_13.getDay();var adj=0;if(_1a==6&&_15>0){adj=1;}else{if(_1a==0&&_15<0){adj=-1;}}var _1b=_1a+_18;if(_1b==0||_1b==6){adj=(_15>0)?2:-2;}_15=(7*_19)+_18+adj;break;case "year":_17="FullYear";_16=true;break;case "week":_15*=7;break;case "quarter":_15*=3;case "month":_16=true;_17="Month";break;default:_17="UTC"+_14.charAt(0).toUpperCase()+_14.substring(1)+"s";}if(_17){sum["set"+_17](sum["get"+_17]()+_15);}if(_16&&(sum.getDate()<_13.getDate())){sum.setDate(0);}return sum;};_4.date.difference=function(_1c,_1d,_1e){_1d=_1d||new Date();_1e=_1e||"day";var _1f=_1d.getFullYear()-_1c.getFullYear();var _20=1;switch(_1e){case "quarter":var m1=_1c.getMonth();var m2=_1d.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_1f*4);_20=q2-q1;break;case "weekday":var _21=Math.round(_4.date.difference(_1c,_1d,"day"));var _22=parseInt(_4.date.difference(_1c,_1d,"week"));var mod=_21%7;if(mod==0){_21=_22*5;}else{var adj=0;var _23=_1c.getDay();var _24=_1d.getDay();_22=parseInt(_21/7);mod=_21%7;var _25=new Date(_1c);_25.setDate(_25.getDate()+(_22*7));var _26=_25.getDay();if(_21>0){switch(true){case _23==6:adj=-1;break;case _23==0:adj=0;break;case _24==6:adj=-1;break;case _24==0:adj=-2;break;case (_26+mod)>5:adj=-2;}}else{if(_21<0){switch(true){case _23==6:adj=0;break;case _23==0:adj=1;break;case _24==6:adj=2;break;case _24==0:adj=1;break;case (_26+mod)<0:adj=2;}}}_21+=adj;_21-=(_22*2);}_20=_21;break;case "year":_20=_1f;break;case "month":_20=(_1d.getMonth()-_1c.getMonth())+(_1f*12);break;case "week":_20=parseInt(_4.date.difference(_1c,_1d,"day")/7);break;case "day":_20/=24;case "hour":_20/=60;case "minute":_20/=60;case "second":_20/=1000;case "millisecond":_20*=_1d.getTime()-_1c.getTime();}return Math.round(_20);};}}};});