/*
	Copyright (c) 2004-2007, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/

/*
	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["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_1){var _2=_1.getMonth();var _3=[31,28,31,30,31,30,31,31,30,31,30,31];if(_2==1&&dojo.date.isLeapYear(_1)){return 29;}return _3[_2];};dojo.date.isLeapYear=function(_4){var _5=_4.getFullYear();return !(_5%400)||(!(_5%4)&&!!(_5%100));};dojo.date.getTimezoneName=function(_6){var _7=_6.toString();var tz="";var _9;var _a=_7.indexOf("(");if(_a>-1){tz=_7.substring(++_a,_7.indexOf(")"));}else{var _b=/([A-Z\/]+) \d{4}$/;if((_9=_7.match(_b))){tz=_9[1];}else{_7=_6.toLocaleString();_b=/ ([A-Z\/]+)$/;if((_9=_7.match(_b))){tz=_9[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_c,_d,_e){_c=new Date(Number(_c));_d=new Date(Number(_d||new Date()));if(typeof _e!=="undefined"){if(_e=="date"){_c.setHours(0,0,0,0);_d.setHours(0,0,0,0);}else{if(_e=="time"){_c.setFullYear(0,0,0);_d.setFullYear(0,0,0);}}}if(_c>_d){return 1;}if(_c<_d){return -1;}return 0;};dojo.date.add=function(_f,_10,_11){var sum=new Date(Number(_f));var _13=false;var _14="Date";switch(_10){case "day":break;case "weekday":var _15=_f.getDate();var _16,_17;var adj=0;var mod=_11%5;if(!mod){_16=(_11>0)?5:-5;_17=(_11>0)?((_11-5)/5):((_11+5)/5);}else{_16=mod;_17=parseInt(_11/5);}var _1a=_f.getDay();if(_1a==6&&_11>0){adj=1;}else{if(_1a==0&&_11<0){adj=-1;}}var _1b=_1a+_16;if(_1b==0||_1b==6){adj=(_11>0)?2:-2;}_11=_15+7*_17+_16+adj;break;case "year":_14="FullYear";_13=true;break;case "week":_11*=7;break;case "quarter":_11*=3;case "month":_13=true;_14="Month";break;case "hour":case "minute":case "second":case "millisecond":_14=_10.charAt(0).toUpperCase()+_10.substring(1)+"s";}if(_14){sum["set"+_14](sum["get"+_14]()+_11);}if(_13&&(sum.getDate()<_f.getDate())){sum.setDate(0);}return sum;};dojo.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 _25=Math.round(dojo.date.difference(_1c,_1d,"day"));var _26=parseInt(dojo.date.difference(_1c,_1d,"week"));var mod=_25%7;if(mod==0){_25=_26*5;}else{var adj=0;var _29=_1c.getDay();var _2a=_1d.getDay();_26=parseInt(_25/7);mod=_25%7;var _2b=new Date(_1c);_2b.setDate(_2b.getDate()+(_26*7));var _2c=_2b.getDay();if(_25>0){switch(true){case _29==6:adj=-1;break;case _29==0:adj=0;break;case _2a==6:adj=-1;break;case _2a==0:adj=-2;break;case (_2c+mod)>5:adj=-2;}}else{if(_25<0){switch(true){case _29==6:adj=0;break;case _29==0:adj=1;break;case _2a==6:adj=2;break;case _2a==0:adj=1;break;case (_2c+mod)<0:adj=2;}}}_25+=adj;_25-=(_26*2);}_20=_25;break;case "year":_20=_1f;break;case "month":_20=(_1d.getMonth()-_1c.getMonth())+(_1f*12);break;case "week":_20=parseInt(dojo.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);};}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_2d,_2e,_2f){_2f=dojo.i18n.normalizeLocale(_2f);var _30=_2f.split("-");var _31=[_2d,"nls",_2e].join(".");var _32=dojo._loadedModules[_31];if(_32){var _33;for(var i=_30.length;i>0;i--){var loc=_30.slice(0,i).join("_");if(_32[loc]){_33=_32[loc];break;}}if(!_33){_33=_32.ROOT;}if(_33){var _36=function(){};_36.prototype=_33;return new _36();}}throw new Error("Bundle not found: "+_2e+" in "+_2d+" , locale="+_2f);};dojo.i18n.normalizeLocale=function(_37){var _38=_37?_37.toLowerCase():dojo.locale;if(_38=="root"){_38="ROOT";}return _38;};dojo.i18n._requireLocalization=function(_39,_3a,_3b,_3c){var _3d=dojo.i18n.normalizeLocale(_3b);var _3e=[_39,"nls",_3a].join(".");var _3f="";if(_3c){var _40=_3c.split(",");for(var i=0;i<_40.length;i++){if(_3d.indexOf(_40[i])==0){if(_40[i].length>_3f.length){_3f=_40[i];}}}if(!_3f){_3f="ROOT";}}var _42=_3c?_3f:_3d;var _43=dojo._loadedModules[_3e];var _44=null;if(_43){if(djConfig.localizationComplete&&_43._built){return;}var _45=_42.replace(/-/g,"_");var _46=_3e+"."+_45;_44=dojo._loadedModules[_46];}if(!_44){_43=dojo["provide"](_3e);var _47=dojo._getModuleSymbols(_39);var _48=_47.concat("nls").join("/");var _49;dojo.i18n._searchLocalePath(_42,_3c,function(loc){var _4b=loc.replace(/-/g,"_");var _4c=_3e+"."+_4b;var _4d=false;if(!dojo._loadedModules[_4c]){dojo["provide"](_4c);var _4e=[_48];if(loc!="ROOT"){_4e.push(loc);}_4e.push(_3a);var _4f=_4e.join("/")+".js";_4d=dojo._loadPath(_4f,null,function(_50){var _51=function(){};_51.prototype=_49;_43[_4b]=new _51();for(var j in _50){_43[_4b][j]=_50[j];}});}else{_4d=true;}if(_4d&&_43[_4b]){_49=_43[_4b];}else{_43[_4b]=_49;}if(_3c){return true;}});}if(_3c&&_3d!=_3f){_43[_3d.replace(/-/g,"_")]=_43[_3f.replace(/-/g,"_")];}};(function(){var _53=djConfig.extraLocale;if(_53){if(!_53 instanceof Array){_53=[_53];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_57,_58){req(m,b,_57,_58);if(_57){return;}for(var i=0;i<_53.length;i++){req(m,b,_53[i],_58);}};}})();dojo.i18n._searchLocalePath=function(_5a,_5b,_5c){_5a=dojo.i18n.normalizeLocale(_5a);var _5d=_5a.split("-");var _5e=[];for(var i=_5d.length;i>0;i--){_5e.push(_5d.slice(0,i).join("-"));}_5e.push(false);if(_5b){_5e.reverse();}for(var j=_5e.length-1;j>=0;j--){var loc=_5e[j]||"ROOT";var _62=_5c(loc);if(_62){break;}}};dojo.i18n._preloadLocalizations=function(_63,_64){function preload(_65){_65=dojo.i18n.normalizeLocale(_65);dojo.i18n._searchLocalePath(_65,true,function(loc){for(var i=0;i<_64.length;i++){if(_64[i]==loc){dojo["require"](_63+"_"+loc);return true;}}return false;});};preload();var _68=djConfig.extraLocale||[];for(var i=0;i<_68.length;i++){preload(_68[i]);}};}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_6a){var _6b={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};var _6c=dojo.cldr.supplemental._region(_6a);var dow=_6b[_6c];return (typeof dow=="undefined")?1:dow;};dojo.cldr.supplemental._region=function(_6e){_6e=dojo.i18n.normalizeLocale(_6e);var _6f=_6e.split("-");var _70=_6f[1];if(!_70){_70={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[_6f[0]];}else{if(_70.length==4){_70=_6f[2];}}return _70;};dojo.cldr.supplemental.getWeekend=function(_71){var _72={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _73={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var _74=dojo.cldr.supplemental._region(_71);var _75=_72[_74];var end=_73[_74];if(typeof _75=="undefined"){_75=6;}if(typeof end=="undefined"){end=0;}return {start:_75,end:end};};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_78){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_78&&_78.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_7c){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_7c);};dojo.regexp.group=function(_7f,_80){return "("+(_80?"?:":"")+_7f+")";};}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.pad=function(_81,_82,ch,end){var out=String(_81);if(!ch){ch="0";}while(out.length<_82){if(end){out+=ch;}else{out=ch+out;}}return out;};dojo.string.substitute=function(_86,map,_88,_89){return _86.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_8a,key,_8c){var _8d=dojo.getObject(key,false,map);if(_8c){_8d=dojo.getObject(_8c,false,_89)(_8d);}if(_88){_8d=_88(_8d,key);}return _8d.toString();});};dojo.string.trim=function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function formatPattern(_90,_91,_92){return _92.replace(/([a-z])\1*/ig,function(_93){var s;var c=_93.charAt(0);var l=_93.length;var pad;var _98=["abbr","wide","narrow"];switch(c){case "G":s=_91[(l<4)?"eraAbbr":"eraNames"][_90.getFullYear()<0?0:1];break;case "y":s=_90.getFullYear();switch(l){case 1:break;case 2:s=String(s);s=s.substr(s.length-2);break;default:pad=true;}break;case "Q":case "q":s=Math.ceil((_90.getMonth()+1)/3);pad=true;break;case "M":case "L":var m=_90.getMonth();var _9a;switch(l){case 1:case 2:s=m+1;pad=true;break;case 3:case 4:case 5:_9a=_98[l-3];break;}if(_9a){var _9b=(c=="L")?"standalone":"format";var _9c=["months",_9b,_9a].join("-");s=_91[_9c][m];}break;case "w":var _9d=0;s=dojo.date.locale._getWeekOfYear(_90,_9d);pad=true;break;case "d":s=_90.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_90);pad=true;break;case "E":case "e":case "c":var d=_90.getDay();var _9a;switch(l){case 1:case 2:if(c=="e"){var _9f=dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);d=(d-_9f+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3:case 4:case 5:_9a=_98[l-3];break;}if(_9a){var _9b=(c=="c")?"standalone":"format";var _9c=["days",_9b,_9a].join("-");s=_91[_9c][d];}break;case "a":var _a0=(_90.getHours()<12)?"am":"pm";s=_91[_a0];break;case "h":case "H":case "K":case "k":var h=_90.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_90.getMinutes();pad=true;break;case "s":s=_90.getSeconds();pad=true;break;case "S":s=Math.round(_90.getMilliseconds()*Math.pow(10,l-3));break;case "v":case "z":s=dojo.date.getTimezoneName(_90);if(s){break;}l=4;case "Z":var _a2=_90.getTimezoneOffset();var tz=[(_a2<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_a2)/60),2),dojo.string.pad(Math.abs(_a2)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_92);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale.format=function(_a4,_a5){_a5=_a5||{};var _a6=dojo.i18n.normalizeLocale(_a5.locale);var _a7=_a5.formatLength||"short";var _a8=dojo.date.locale._getGregorianBundle(_a6);var str=[];var _aa=dojo.hitch(this,formatPattern,_a4,_a8);if(_a5.selector=="year"){var _ab=_a4.getFullYear();if(_a6.match(/^zh|^ja/)){_ab+="年";}return _ab;}if(_a5.selector!="time"){var _ac=_a5.datePattern||_a8["dateFormat-"+_a7];if(_ac){str.push(_processPattern(_ac,_aa));}}if(_a5.selector!="date"){var _ad=_a5.timePattern||_a8["timeFormat-"+_a7];if(_ad){str.push(_processPattern(_ad,_aa));}}var _ae=str.join(" ");return _ae;};dojo.date.locale.regexp=function(_af){return dojo.date.locale._parseInfo(_af).regexp;};dojo.date.locale._parseInfo=function(_b0){_b0=_b0||{};var _b1=dojo.i18n.normalizeLocale(_b0.locale);var _b2=dojo.date.locale._getGregorianBundle(_b1);var _b3=_b0.formatLength||"short";var _b4=_b0.datePattern||_b2["dateFormat-"+_b3];var _b5=_b0.timePattern||_b2["timeFormat-"+_b3];var _b6;if(_b0.selector=="date"){_b6=_b4;}else{if(_b0.selector=="time"){_b6=_b5;}else{_b6=_b4+" "+_b5;}}var _b7=[];var re=_processPattern(_b6,dojo.hitch(this,_buildDateTimeRE,_b7,_b2,_b0));return {regexp:re,tokens:_b7,bundle:_b2};};dojo.date.locale.parse=function(_b9,_ba){var _bb=dojo.date.locale._parseInfo(_ba);var _bc=_bb.tokens,_bd=_bb.bundle;var re=new RegExp("^"+_bb.regexp+"$");var _bf=re.exec(_b9);if(!_bf){return null;}var _c0=["abbr","wide","narrow"];var _c1=new Date(1972,0);var _c2={};var _c3="";dojo.forEach(_bf,function(v,i){if(!i){return;}var _c6=_bc[i-1];var l=_c6.length;switch(_c6.charAt(0)){case "y":if(l!=2){_c1.setFullYear(v);_c2.year=v;}else{if(v<100){v=Number(v);var _c8=""+new Date().getFullYear();var _c9=_c8.substring(0,2)*100;var _ca=Number(_c8.substring(2,4));var _cb=Math.min(_ca+20,99);var num=(v<_cb)?_c9+v:_c9-100+v;_c1.setFullYear(num);_c2.year=num;}else{if(_ba.strict){return null;}_c1.setFullYear(v);_c2.year=v;}}break;case "M":if(l>2){var _cd=_bd["months-format-"+_c0[l-3]].concat();if(!_ba.strict){v=v.replace(".","").toLowerCase();_cd=dojo.map(_cd,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_cd,v);if(v==-1){return null;}}else{v--;}_c1.setMonth(v);_c2.month=v;break;case "E":case "e":var _cf=_bd["days-format-"+_c0[l-3]].concat();if(!_ba.strict){v=v.toLowerCase();_cf=dojo.map(_cf,"".toLowerCase);}v=dojo.indexOf(_cf,v);if(v==-1){return null;}break;case "d":_c1.setDate(v);_c2.date=v;break;case "D":_c1.setMonth(0);_c1.setDate(v);break;case "a":var am=_ba.am||_bd.am;var pm=_ba.pm||_bd.pm;if(!_ba.strict){var _d2=/\./g;v=v.replace(_d2,"").toLowerCase();am=am.replace(_d2,"").toLowerCase();pm=pm.replace(_d2,"").toLowerCase();}if(_ba.strict&&v!=am&&v!=pm){return null;}_c3=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return null;}_c1.setHours(v);break;case "m":_c1.setMinutes(v);break;case "s":_c1.setSeconds(v);break;case "S":_c1.setMilliseconds(v);}});var _d3=_c1.getHours();if(_c3==="p"&&_d3<12){_c1.setHours(_d3+12);}else{if(_c3==="a"&&_d3==12){_c1.setHours(0);}}if(_c2.year&&_c1.getFullYear()!=_c2.year){return null;}if(_c2.month&&_c1.getMonth()!=_c2.month){return null;}if(_c2.date&&_c1.getDate()!=_c2.date){return null;}return _c1;};function _processPattern(_d4,_d5,_d6,_d7){var _d8=function(x){return x;};_d5=_d5||_d8;_d6=_d6||_d8;_d7=_d7||_d8;var _da=_d4.match(/(''|[^'])+/g);var _db=false;dojo.forEach(_da,function(_dc,i){if(!_dc){_da[i]="";}else{_da[i]=(_db?_d6:_d5)(_dc);_db=!_db;}});return _d7(_da.join(""));};function _buildDateTimeRE(_de,_df,_e0,_e1){_e1=dojo.regexp.escapeString(_e1);if(!_e0.strict){_e1=_e1.replace(" a"," ?a");}return _e1.replace(/([a-z])\1*/ig,function(_e2){var s;var c=_e2.charAt(0);var l=_e2.length;var p2="",p3="";if(_e0.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+":p2+"[1-9]|1[0-2]";break;case "D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case "d":s=p2+"[1-9]|[12]\\d|3[01]";break;case "w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_e0.am||_df.am||"AM";var pm=_e0.pm||_df.pm||"PM";if(_e0.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_de){_de.push(_e2);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _ea=[];dojo.date.locale.addCustomFormats=function(_eb,_ec){_ea.push({pkg:_eb,name:_ec});};dojo.date.locale._getGregorianBundle=function(_ed){var _ee={};dojo.forEach(_ea,function(_ef){var _f0=dojo.i18n.getLocalization(_ef.pkg,_ef.name,_ed);_ee=dojo.mixin(_ee,_f0);},this);return _ee;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(_f1,_f2,use,_f4){var _f5;var _f6=dojo.date.locale._getGregorianBundle(_f4);var _f7=[_f1,use,_f2];if(use=="standAlone"){_f5=_f6[_f7.join("-")];}_f7[1]="format";return (_f5||_f6[_f7.join("-")]).concat();};dojo.date.locale.isWeekend=function(_f8,_f9){var _fa=dojo.cldr.supplemental.getWeekend(_f9);var day=(_f8||new Date()).getDay();if(_fa.end<_fa.start){_fa.end+=7;if(day<_fa.start){day+=7;}}return day>=_fa.start&&day<=_fa.end;};dojo.date.locale._getDayOfYear=function(_fc){return dojo.date.difference(new Date(_fc.getFullYear(),0,1),_fc)+1;};dojo.date.locale._getWeekOfYear=function(_fd,_fe){if(arguments.length==1){_fe=0;}var _ff=new Date(_fd.getFullYear(),0,1).getDay();var adj=(_ff-_fe+7)%7;var week=Math.floor((dojo.date.locale._getDayOfYear(_fd)+adj-1)/7);if(_ff==_fe){week++;}return week;};}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");dojo.fx.chain=function(_102){var _103=_102.shift();var _104=_103;dojo.forEach(_102,function(_105){dojo.connect(_104,"onEnd",_105,"play");_104=_105;});return _103;};dojo.fx.combine=function(_106){var ctr=new dojo._Animation({curve:[0,1]});if(!_106.length){return ctr;}ctr.duration=_106[0].duration;dojo.forEach(_106,function(_108){dojo.forEach(["play","pause","stop"],function(e){if(_108[e]){dojo.connect(ctr,e,_108,e);}});});return ctr;};dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){var _t=this;dojo.mixin(_t,args);_t.node=args.node;_t._showArgs=dojo.mixin({},args);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},args);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_10c){return this.showAnim.play(_10c||0);},hide:function(_10d){return this.hideAnim.play(_10d||0);}});dojo.fx.wipeIn=function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _112=dojo.style(node,"height");return Math.max(_112,1);}},end:function(){return node.scrollHeight;}}}},args));dojo.connect(anim,"onEnd",function(){});return anim;};dojo.fx.wipeOut=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));dojo.connect(anim,"beforeBegin",function(){s.overflow="hidden";s.display="";});dojo.connect(anim,"onEnd",function(){s.height="auto";s.display="none";});return anim;};dojo.fx.slideTo=function(args){var node=(args.node=dojo.byId(args.node));var top=null;var left=null;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));dojo.connect(anim,"beforeBegin",anim,init);return anim;};}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._copyKey=navigator.appVersion.indexOf("Macintosh")<0?"ctrlKey":"metaKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id="dojoUnique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!dojo._hasResource["dojo.dnd.Container"]){dojo._hasResource["dojo.dnd.Container"]=true;dojo.provide("dojo.dnd.Container");dojo.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(node,_126){this.node=dojo.byId(node);if(!_126){_126={};}this.creator=_126.creator||null;this.skipForm=_126.skipForm;this.defaultCreator=dojo.dnd._defaultCreator(this.node);this.map={};this.current=null;this.containerState="";dojo.addClass(this.node,"dojoDndContainer");if(!(_126&&_126._skipStartup)){this.startup();}this.events=[dojo.connect(this.node,"onmouseover",this,"onMouseOver"),dojo.connect(this.node,"onmouseout",this,"onMouseOut"),dojo.connect(this.node,"ondragstart",this,"onSelectStart"),dojo.connect(this.node,"onselectstart",this,"onSelectStart")];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||dojo.global;var m=this.map,e=dojo.dnd._empty;for(var i in this.map){if(i in e){continue;}f.call(o,m[i],i,m);}},clearItems:function(){this.map={};},getAllNodes:function(){return dojo.query("> .dojoDndItem",this.parent);},insertNodes:function(data,_131,_132){if(!this.parent.firstChild){_132=null;}else{if(_131){if(!_132){_132=this.parent.firstChild;}}else{if(_132){_132=_132.nextSibling;}}}if(_132){for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.insertBefore(t.node,_132);}}else{for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.clearItems();this.node=this.parent=this.current;},markupFactory:function(_135,node){_135._skipStartup=true;return new dojo.dnd.Container(node,_135);},startup:function(){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}dojo.query("> .dojoDndItem",this.parent).forEach(function(node){if(!node.id){node.id=dojo.dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");this.setItem(node.id,{data:data?data:node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]});},this);},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_141){var _142="dojoDnd"+type;var _143=type.toLowerCase()+"State";dojo.removeClass(this.node,_142+this[_143]);dojo.addClass(this.node,_142+_141);this[_143]=_141;},_addItemClass:function(node,type){dojo.addClass(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){dojo.removeClass(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _14a=node.parentNode;_14a;node=_14a,_14a=node.parentNode){if(_14a==this.parent&&dojo.hasClass(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator?this.creator:this.defaultCreator)(item,hint);if(!dojo.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=dojo.dnd.getUniqueId();}dojo.addClass(t.node,"dojoDndItem");return t;}});dojo.dnd._createNode=function(tag){if(!tag){return dojo.dnd._createSpan;}return function(text){var n=dojo.doc.createElement(tag);n.innerHTML=text;return n;};};dojo.dnd._createTrTd=function(text){var tr=dojo.doc.createElement("tr");var td=dojo.doc.createElement("td");td.innerHTML=text;tr.appendChild(td);return tr;};dojo.dnd._createSpan=function(text){var n=dojo.doc.createElement("span");n.innerHTML=text;return n;};dojo.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};dojo.dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="table"?dojo.dnd._createTrTd:dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]);return function(item,hint){var _15b=dojo.isObject(item)&&item;var data=(_15b&&item.data)?item.data:item;var type=(_15b&&item.type)?item.type:["text"];var t=String(data),n=(hint=="avatar"?dojo.dnd._createSpan:c)(t);n.id=dojo.dnd.getUniqueId();return {node:n,data:data,type:type};};};}if(!dojo._hasResource["dojo.dnd.Selector"]){dojo._hasResource["dojo.dnd.Selector"]=true;dojo.provide("dojo.dnd.Selector");dojo.declare("dojo.dnd.Selector",dojo.dnd.Container,{constructor:function(node,_161){if(!_161){_161={};}this.singular=_161.singular;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(dojo.connect(this.node,"onmousedown",this,"onMouseDown"),dojo.connect(this.node,"onmouseup",this,"onMouseUp"));},singular:false,getSelectedNodes:function(){var t=new dojo.NodeList();var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(dojo.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(dojo.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=dojo.byId(i);this.delItem(i);dojo._destroyElement(n);}this.anchor=null;this.selection={};return this;},insertNodes:function(_16a,data,_16c,_16d){var _16e=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_16e.call(this,item,hint);if(_16a){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};dojo.dnd.Selector.superclass.insertNodes.call(this,data,_16c,_16d);this._normalizedCreator=_16e;return this;},destroy:function(){dojo.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_172,node){_172._skipStartup=true;return new dojo.dnd.Selector(node,_172);},onMouseDown:function(e){if(!this.current){return;}if(!this.singular&&!dojo.dnd.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;dojo.stopEvent(e);return;}if(!this.singular&&e.shiftKey){if(!dojo.dnd.getCopyKeyState(e)){this._removeSelection();}var c=dojo.query("> .dojoDndItem",this.parent);if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0;for(;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(dojo.dnd.getCopyKeyState(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dojo.dnd.getCopyKeyState(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}dojo.stopEvent(e);},onMouseUp:function(e){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(e){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=dojo.connect(this.node,"onmousemove",this,"onMouseMove");},onOutEvent:function(){dojo.disconnect(this.onmousemoveEvent);delete this.onmousemoveEvent;},_removeSelection:function(){var e=dojo.dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=dojo.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return {w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return {w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return {w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return {w:b.clientWidth,h:b.clientHeight};}}}}return null;};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={"div":1,"p":1,"td":1};dojo.dnd._validOverflow={"auto":1,"scroll":1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);console.debug(b.l,b.t,t.x,t.y,n.scrollLeft,n.scrollTop);b.l+=t.x+n.scrollLeft;b.t+=t.y+n.scrollTop;var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-b.l,ry=e.pageY-b.t,dx=0,dy=0;if(rx>0&&rx<b.w){if(rx<w){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(rx>b.w-w){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(ry>b.h-h){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}}var _190=n.scrollLeft,_191=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(dx||dy){console.debug(_190+", "+_191+"\n"+dx+", "+dy+"\n"+n.scrollLeft+", "+n.scrollTop);}if(_190!=n.scrollLeft||_191!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.Avatar"]){dojo._hasResource["dojo.dnd.Avatar"]=true;dojo.provide("dojo.dnd.Avatar");dojo.dnd.Avatar=function(_192){this.manager=_192;this.construct();};dojo.extend(dojo.dnd.Avatar,{construct:function(){var a=dojo.doc.createElement("table");a.className="dojoDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dojo.doc.createElement("tbody");var tr=dojo.doc.createElement("tr");tr.className="dojoDndAvatarHeader";var td=dojo.doc.createElement("td");td.innerHTML=this._generateText();tr.appendChild(td);dojo.style(tr,"opacity",0.9);b.appendChild(tr);var k=Math.min(5,this.manager.nodes.length);var _198=this.manager.source;for(var i=0;i<k;++i){tr=dojo.doc.createElement("tr");tr.className="dojoDndAvatarItem";td=dojo.doc.createElement("td");var node=_198.creator?node=_198._normalizedCreator(_198.getItem(this.manager.nodes[i].id).data,"avatar").node:node=this.manager.nodes[i].cloneNode(true);node.id="";td.appendChild(node);tr.appendChild(td);dojo.style(tr,"opacity",(9-i)/10);b.appendChild(tr);}a.appendChild(b);this.node=a;},destroy:function(){dojo._destroyElement(this.node);this.node=false;},update:function(){dojo[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");var t=this.node.getElementsByTagName("td");for(var i=0;i<t.length;++i){var n=t[i];if(dojo.hasClass(n.parentNode,"dojoDndAvatarHeader")){n.innerHTML=this._generateText();break;}}},_generateText:function(){return this.manager.nodes.length.toString();}});}if(!dojo._hasResource["dojo.dnd.Manager"]){dojo._hasResource["dojo.dnd.Manager"]=true;dojo.provide("dojo.dnd.Manager");dojo.dnd.Manager=function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];};dojo.extend(dojo.dnd.Manager,{OFFSET_X:16,OFFSET_Y:16,overSource:function(_19e){if(this.avatar){this.target=(_19e&&_19e.targetState!="Disabled")?_19e:null;this.avatar.update();}dojo.publish("/dnd/source/over",[_19e]);},outSource:function(_19f){if(this.avatar){if(this.target==_19f){this.target=null;this.canDropFlag=false;this.avatar.update();dojo.publish("/dnd/source/over",[null]);}}else{dojo.publish("/dnd/source/over",[null]);}},startDrag:function(_1a0,_1a1,copy){this.source=_1a0;this.nodes=_1a1;this.copy=Boolean(copy);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_1a0,_1a1,this.copy]);this.events=[dojo.connect(dojo.doc,"onmousemove",this,"onMouseMove"),dojo.connect(dojo.doc,"onmouseup",this,"onMouseUp"),dojo.connect(dojo.doc,"onkeydown",this,"onKeyDown"),dojo.connect(dojo.doc,"onkeyup",this,"onKeyUp")];var c="dojoDnd"+(copy?"Copy":"Move");dojo.addClass(dojo.body(),c);},canDrop:function(flag){var _1a5=this.target&&flag;if(this.canDropFlag!=_1a5){this.canDropFlag=_1a5;this.avatar.update();}},stopDrag:function(){dojo.removeClass(dojo.body(),"dojoDndCopy");dojo.removeClass(dojo.body(),"dojoDndMove");dojo.forEach(this.events,dojo.disconnect);this.events=[];this.avatar.destroy();this.avatar=null;this.source=null;this.nodes=[];},makeAvatar:function(){return new dojo.dnd.Avatar(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){dojo.dnd.autoScroll(e);dojo.marginBox(a.node,{l:e.pageX+this.OFFSET_X,t:e.pageY+this.OFFSET_Y});var copy=Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}},onMouseUp:function(e){if(this.avatar&&this.source.mouseButton==e.button){if(this.target&&this.canDropFlag){dojo.publish("/dnd/drop",[this.source,this.nodes,Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e)))]);}else{dojo.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case dojo.keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case dojo.keys.ESCAPE:dojo.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==dojo.keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();dojo.removeClass(dojo.body(),"dojoDnd"+(this.copy?"Move":"Copy"));dojo.addClass(dojo.body(),"dojoDnd"+(this.copy?"Copy":"Move"));}});dojo.dnd._manager=null;dojo.dnd.manager=function(){if(!dojo.dnd._manager){dojo.dnd._manager=new dojo.dnd.Manager();}return dojo.dnd._manager;};}if(!dojo._hasResource["dojo.dnd.Source"]){dojo._hasResource["dojo.dnd.Source"]=true;dojo.provide("dojo.dnd.Source");dojo.declare("dojo.dnd.Source",dojo.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,skipForm:false,withHandles:false,accept:["text"],constructor:function(node,_1b0){if(!_1b0){_1b0={};}this.isSource=typeof _1b0.isSource=="undefined"?true:_1b0.isSource;var type=_1b0.accept instanceof Array?_1b0.accept:["text"];this.accept=null;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.horizontal=_1b0.horizontal;this.copyOnly=_1b0.copyOnly;this.withHandles=_1b0.withHandles;this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this.sourceState="";if(this.isSource){dojo.addClass(this.node,"dojoDndSource");}this.targetState="";if(this.accept){dojo.addClass(this.node,"dojoDndTarget");}if(this.horizontal){dojo.addClass(this.node,"dojoDndHorizontal");}this.topics=[dojo.subscribe("/dnd/source/over",this,"onDndSourceOver"),dojo.subscribe("/dnd/start",this,"onDndStart"),dojo.subscribe("/dnd/drop",this,"onDndDrop"),dojo.subscribe("/dnd/cancel",this,"onDndCancel")];},checkAcceptance:function(_1b3,_1b4){if(this==_1b3){return true;}for(var i=0;i<_1b4.length;++i){var type=_1b3.getItem(_1b4[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_1b9){return this.copyOnly||_1b9;},destroy:function(){dojo.dnd.Source.superclass.destroy.call(this);dojo.forEach(this.topics,dojo.unsubscribe);this.targetAnchor=null;},markupFactory:function(_1ba,node){_1ba._skipStartup=true;return new dojo.dnd.Source(node,_1ba);},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}dojo.dnd.Source.superclass.onMouseMove.call(this,e);var m=dojo.dnd.manager();if(this.isDragging){var _1be=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox={xy:dojo.coords(this.current,true),w:this.current.offsetWidth,h:this.current.offsetHeight};}if(this.horizontal){_1be=(e.pageX-this.targetBox.xy.x)<(this.targetBox.w/2);}else{_1be=(e.pageY-this.targetBox.xy.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_1be!=this.before){this._markTargetAnchor(_1be);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}else{if(this.mouseDown&&this.isSource){var _1bf=this.getSelectedNodes();if(_1bf.length){m.startDrag(this,_1bf,this.copyState(dojo.dnd.getCopyKeyState(e)));}}}},onMouseDown:function(e){if(this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){this.mouseDown=true;this.mouseButton=e.button;dojo.dnd.Source.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;dojo.dnd.Source.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_1c2){if(this!=_1c2){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=dojo.dnd.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_1c4,_1c5,copy){if(this.isSource){this._changeState("Source",this==_1c4?(copy?"Copied":"Moved"):"");}var _1c7=this.accept&&this.checkAcceptance(_1c4,_1c5);this._changeState("Target",_1c7?"":"Disabled");if(_1c7){dojo.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_1c8,_1c9,copy){do{if(this.containerState!="Over"){break;}var _1cb=this._normalizedCreator;if(this!=_1c8){if(this.creator){this._normalizedCreator=function(node,hint){return _1cb.call(this,_1c8.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_1c8.getItem(node.id);var n=node.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node,hint){var t=_1c8.getItem(node.id);_1c8.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}}else{if(this.current&&this.current.id in this.selection){break;}if(this.creator){if(copy){this._normalizedCreator=function(node,hint){return _1cb.call(this,_1c8.getItem(node.id).data,hint);};}else{if(!this.current){break;}this._normalizedCreator=function(node,hint){var t=_1c8.getItem(node.id);return {node:node,data:t.data,type:t.type};};}}else{if(copy){this._normalizedCreator=function(node,hint){var t=_1c8.getItem(node.id);var n=node.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{if(!this.current){break;}this._normalizedCreator=function(node,hint){var t=_1c8.getItem(node.id);return {node:node,data:t.data,type:t.type};};}}}this._removeSelection();if(this!=_1c8){this._removeAnchor();}if(this!=_1c8&&!copy&&!this.creator){_1c8.selectNone();}this.insertNodes(true,_1c9,this.before,this.current);if(this!=_1c8&&!copy&&this.creator){_1c8.deleteSelectedNodes();}this._normalizedCreator=_1cb;}while(false);this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onOverEvent:function(){dojo.dnd.Source.superclass.onOverEvent.call(this);dojo.dnd.manager().overSource(this);},onOutEvent:function(){dojo.dnd.Source.superclass.onOutEvent.call(this);dojo.dnd.manager().outSource(this);},_markTargetAnchor:function(_1e1){if(this.current==this.targetAnchor&&this.before==_1e1){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_1e1;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(!this.withHandles){return true;}for(var node=e.target;node&&!dojo.hasClass(node,"dojoDndItem");node=node.parentNode){if(dojo.hasClass(node,"dojoDndHandle")){return true;}}return false;}});dojo.declare("dojo.dnd.Target",dojo.dnd.Source,{constructor:function(node,_1e6){this.isSource=false;dojo.removeClass(this.node,"dojoDndSource");},markupFactory:function(_1e7,node){_1e7._skipStartup=true;return new dojo.dnd.Target(node,_1e7);}});}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1e9=dojo.global;var _1ea=dojo.doc;if(_1ea.selection){return !_1ea.selection.createRange().text;}else{if(_1e9.getSelection){var _1eb=_1e9.getSelection();if(dojo.isString(_1eb)){return !_1eb;}else{return _1eb.isCollapsed||!_1eb.toString();}}}},getBookmark:function(){var _1ec,_1ed=dojo.doc.selection;if(_1ed){var _1ee=_1ed.createRange();if(_1ed.type.toUpperCase()=="CONTROL"){_1ec=_1ee.length?dojo._toArray(_1ee):null;}else{_1ec=_1ee.getBookmark();}}else{if(dojo.global.getSelection){_1ed=dojo.global.getSelection();if(_1ed){var _1ee=_1ed.getRangeAt(0);_1ec=_1ee.cloneRange();}}else{console.debug("No idea how to store the current selection for this browser!");}}return _1ec;},moveToBookmark:function(_1ef){var _1f0=dojo.doc;if(_1f0.selection){var _1f1;if(dojo.isArray(_1ef)){_1f1=_1f0.body.createControlRange();dojo.forEach(_1ef,_1f1.addElement);}else{_1f1=_1f0.selection.createRange();_1f1.moveToBookmark(_1ef);}_1f1.select();}else{var _1f2=dojo.global.getSelection&&dojo.global.getSelection();if(_1f2&&_1f2.removeAllRanges){_1f2.removeAllRanges();_1f2.addRange(_1ef);}else{console.debug("No idea how to restore selection for this browser!");}}},getFocus:function(menu,_1f4){return {node:menu&&dojo.isDescendant(dijit._curFocus,menu.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_1f4||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_1f4||dojo.global,dijit.getBookmark):null,openedForWindow:_1f4};},focus:function(_1f5){if(!_1f5){return;}var node="node" in _1f5?_1f5.node:_1f5,_1f7=_1f5.bookmark,_1f8=_1f5.openedForWindow;if(node){var _1f9=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_1f9&&_1f9.focus){try{_1f9.focus();}catch(e){}}dijit._onFocusNode(node);}if(_1f7&&dojo.withGlobal(_1f8||dojo.global,dijit.isCollapsed)){if(_1f8){_1f8.focus();}try{dojo.withGlobal(_1f8||dojo.global,moveToBookmark,null,[_1f7]);}catch(e){}}},_activeStack:[],registerWin:function(_1fa){if(!_1fa){_1fa=window;}dojo.connect(_1fa.document,"onmousedown",null,function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var body=_1fa.document.body||_1fa.document.getElementsByTagName("body")[0];if(body){if(dojo.isIE){body.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="body"){dijit._onFocusNode(evt.srcElement);}});body.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(evt.srcElement);});}else{body.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);body.addEventListener("blur",function(evt){dijit._onBlurNode(evt.target);},true);}}body=null;},_onBlurNode:function(node){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;var w=dijit.getEnclosingWidget(node);if(w&&w._setStateClass){w._focused=false;w._setStateClass();}if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);},100);},_onTouchNode:function(node){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _204=[];try{while(node){if(node.dijitPopupParent){node=dijit.byId(node.dijitPopupParent).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===dojo.body()){break;}node=dojo.query("iframe").filter(function(_205){return _205.contentDocument.body===node;})[0];}else{var id=node.getAttribute&&node.getAttribute("widgetId");if(id){_204.unshift(id);}node=node.parentNode;}}}}catch(e){}dijit._setStack(_204);},_onFocusNode:function(node){if(node&&node.tagName&&node.tagName.toLowerCase()=="body"){return;}dijit._onTouchNode(node);if(node==dijit._curFocus){return;}dijit._prevFocus=dijit._curFocus;dijit._curFocus=node;dojo.publish("focusNode",[node]);var w=dijit.getEnclosingWidget(node);if(w&&w._setStateClass){w._focused=true;w._setStateClass();}},_setStack:function(_209){var _20a=dijit._activeStack;dijit._activeStack=_209;for(var _20b=0;_20b<Math.min(_20a.length,_209.length);_20b++){if(_20a[_20b]!=_209[_20b]){break;}}for(var i=_20a.length-1;i>=_20b;i--){var _20d=dijit.byId(_20a[i]);if(_20d){dojo.publish("widgetBlur",[_20d]);if(_20d._onBlur){_20d._onBlur();}}}for(var i=_20b;i<_209.length;i++){var _20d=dijit.byId(_209[i]);if(_20d){dojo.publish("widgetFocus",[_20d]);if(_20d._onFocus){_20d._onFocus();}}}}});dojo.addOnLoad(dijit.registerWin);}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_20e){if(this._hash[_20e.id]){throw new Error("Tried to register widget with id=="+_20e.id+" but that id is already registered");}this._hash[_20e.id]=_20e;},remove:function(id){delete this._hash[id];},forEach:function(func){for(var id in this._hash){func(this._hash[id]);}},filter:function(_212){var res=new dijit.WidgetSet();this.forEach(function(_214){if(_212(_214)){res.add(_214);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_217){return _217.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_218){var id;do{id=_218+"_"+(dijit._widgetTypeCtr[_218]!==undefined?++dijit._widgetTypeCtr[_218]:dijit._widgetTypeCtr[_218]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnUnload(function(){dijit.registry.forEach(function(_21a){_21a.destroy();});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(node){return dijit.registry.byId(node.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(node){while(node){if(node.getAttribute&&node.getAttribute("widgetId")){return dijit.registry.byId(node.getAttribute("widgetId"));}node=node.parentNode;}return null;};}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _21e=dojo.global;var _21f=dojo.doc;var w=0,h=0;if(dojo.isMozilla){var minw,minh,maxw,maxh;if(_21f.body.clientWidth>_21f.documentElement.clientWidth){minw=_21f.documentElement.clientWidth;maxw=_21f.body.clientWidth;}else{maxw=_21f.documentElement.clientWidth;minw=_21f.body.clientWidth;}if(_21f.body.clientHeight>_21f.documentElement.clientHeight){minh=_21f.documentElement.clientHeight;maxh=_21f.body.clientHeight;}else{maxh=_21f.documentElement.clientHeight;minh=_21f.body.clientHeight;}w=(maxw>_21e.innerWidth)?minw:maxw;h=(maxh>_21e.innerHeight)?minh:maxh;}else{if(!dojo.isOpera&&_21e.innerWidth){w=_21e.innerWidth;h=_21e.innerHeight;}else{if(dojo.isIE&&_21f.documentElement&&_21f.documentElement.clientHeight){w=_21f.documentElement.clientWidth;h=_21f.documentElement.clientHeight;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _226=dojo._docScroll();return {w:w,h:h,l:_226.x,t:_226.y};};dijit.placeOnScreen=function(node,pos,_229,_22a){var _22b=dojo.map(_229,function(_22c){return {corner:_22c,pos:pos};});return dijit._place(node,_22b);};dijit._place=function(node,_22e,_22f){var view=dijit.getViewport();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(node);}var best=null;for(var i=0;i<_22e.length;i++){var _233=_22e[i].corner;var pos=_22e[i].pos;if(_22f){_22f(_233);}var _235=node.style.display;var _236=node.style.visibility;node.style.visibility="hidden";node.style.display="";var mb=dojo.marginBox(node);node.style.display=_235;node.style.visibility=_236;var _238=(_233.charAt(1)=="L"?pos.x:Math.max(view.l,pos.x-mb.w)),_239=(_233.charAt(0)=="T"?pos.y:Math.max(view.t,pos.y-mb.h)),endX=(_233.charAt(1)=="L"?Math.min(view.l+view.w,_238+mb.w):pos.x),endY=(_233.charAt(0)=="T"?Math.min(view.t+view.h,_239+mb.h):pos.y),_23c=endX-_238,_23d=endY-_239,_23e=(mb.w-_23c)+(mb.h-_23d);if(best==null||_23e<best.overflow){best={corner:_233,aroundCorner:_22e[i].aroundCorner,x:_238,y:_239,w:_23c,h:_23d,overflow:_23e};}if(_23e==0){break;}}node.style.left=best.x+"px";node.style.top=best.y+"px";return best;};dijit.placeOnScreenAroundElement=function(node,_240,_241,_242){_240=dojo.byId(_240);var _243=_240.style.display;_240.style.display="";var _244=_240.offsetWidth;var _245=_240.offsetHeight;var _246=dojo.coords(_240,true);_240.style.display=_243;var _247=[];for(var _248 in _241){_247.push({aroundCorner:_248,corner:_241[_248],pos:{x:_246.x+(_248.charAt(1)=="L"?0:_244),y:_246.y+(_248.charAt(0)=="T"?0:_245)}});}return dijit._place(node,_247,_242);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isSafari&&!doc._parentWindow){var fix=function(win){win.document._parentWindow=win;for(var i=0;i<win.frames.length;i++){fix(win.frames[i]);}};fix(window.top);}if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _24e=[],_24f=1000,_250=1;this.open=function(args){var _252=args.popup,_253=args.orient||{"BL":"TL","TL":"BL"},_254=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_250++);var _256=dojo.doc.createElement("div");_256.id=id;_256.className="dijitPopup";_256.style.zIndex=_24f+_24e.length;_256.style.visibility="hidden";if(args.parent){_256.dijitPopupParent=args.parent.id;}dojo.body().appendChild(_256);_252.domNode.style.display="";_256.appendChild(_252.domNode);var _257=new dijit.BackgroundIframe(_256);var best=_254?dijit.placeOnScreenAroundElement(_256,_254,_253,_252.orient?dojo.hitch(_252,"orient"):null):dijit.placeOnScreen(_256,args,_253=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);_256.style.visibility="visible";var _259=[];function getTopPopup(){for(var pi=_24e.length-1;pi>0&&_24e[pi].parent===_24e[pi-1].widget;pi--){}return _24e[pi];};_259.push(dojo.connect(_256,"onkeypress",this,function(evt){if(evt.keyCode==dojo.keys.ESCAPE&&args.onCancel){args.onCancel();}else{if(evt.keyCode==dojo.keys.TAB){dojo.stopEvent(evt);var _25c=getTopPopup();if(_25c&&_25c.onCancel){_25c.onCancel();}}}}));if(_252.onCancel){_259.push(dojo.connect(_252,"onCancel",null,args.onCancel));}_259.push(dojo.connect(_252,_252.onExecute?"onExecute":"onChange",null,function(){var _25d=getTopPopup();if(_25d&&_25d.onExecute){_25d.onExecute();}}));_24e.push({wrapper:_256,iframe:_257,widget:_252,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_259});if(_252.onOpen){_252.onOpen(best);}return best;};this.close=function(_25e){while(dojo.some(_24e,function(elem){return elem.widget==_25e;})){var top=_24e.pop(),_261=top.wrapper,_262=top.iframe,_263=top.widget,_264=top.onClose;if(_263.onClose){_263.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_263||!_263.domNode){return;}dojo.style(_263.domNode,"display","none");dojo.body().appendChild(_263.domNode);_262.destroy();dojo._destroyElement(_261);if(_264){_264();}}};}();dijit._frames=new function(){var _265=[];this.pop=function(){var _266;if(_265.length){_266=_265.pop();_266.style.display="";}else{if(dojo.isIE){var html="<iframe src='javascript:\"\"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_266=dojo.doc.createElement(html);}else{var _266=dojo.doc.createElement("iframe");_266.src="javascript:\"\"";_266.className="dijitBackgroundIframe";}_266.tabIndex=-1;dojo.body().appendChild(_266);}return _266;};this.push=function(_268){_268.style.display="";if(dojo.isIE){_268.style.removeExpression("width");_268.style.removeExpression("height");}_265.push(_268);};}();if(dojo.isIE&&dojo.isIE<7){dojo.addOnLoad(function(){var f=dijit._frames;dojo.forEach([f.pop()],f.push);});}dijit.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _26b=dijit._frames.pop();node.appendChild(_26b);if(dojo.isIE){_26b.style.setExpression("width","document.getElementById('"+node.id+"').offsetWidth");_26b.style.setExpression("height","document.getElementById('"+node.id+"').offsetHeight");}this.iframe=_26b;}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(node){if(dojo.isIE){if(dojo.marginBox(node.parentNode).h<=node.parentNode.scrollHeight){node.scrollIntoView(false);}}else{if(dojo.isMozilla){node.scrollIntoView(false);}else{var _26d=node.parentNode;var _26e=_26d.scrollTop+dojo.marginBox(_26d).h;var _26f=node.offsetTop+dojo.marginBox(node).h;if(_26e<_26f){_26d.scrollTop+=(_26f-_26e);}else{if(_26d.scrollTop>node.offsetTop){_26d.scrollTop-=(_26d.scrollTop-node.offsetTop);}}}}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo;var ie=d.isIE;var _272=d.isOpera;var maj=Math.floor;var _274={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_272,dj_opera8:maj(_272)==8,dj_opera9:maj(_272)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla};for(var p in _274){if(_274[p]){var html=dojo.doc.documentElement;if(html.className){html.className+=" "+p;}else{html.className=p;}}}})();}if(!dojo._hasResource["dijit._base.bidi"]){dojo._hasResource["dijit._base.bidi"]=true;dojo.provide("dijit._base.bidi");dojo.addOnLoad(function(){if(!dojo._isBodyLtr()){dojo.addClass(dojo.body(),"dijitRtl");}});}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_278,node,_27a,obj,_27c,_27d){if(obj!=this._obj){this.stop();this._initialDelay=_27d||500;this._subsequentDelay=_27c||0.9;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_278,_27a);this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(node,_27f,_280,_281,_282,_283){return [dojo.connect(node,"onkeypress",this,function(evt){if(evt.keyCode==_27f.keyCode&&(!_27f.charCode||_27f.charCode==evt.charCode)&&(_27f.ctrlKey===undefined||_27f.ctrlKey==evt.ctrlKey)&&(_27f.altKey===undefined||_27f.altKey==evt.ctrlKey)&&(_27f.shiftKey===undefined||_27f.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_27f,_280,node,_281,_27f,_282,_283);}else{if(dijit.typematic._obj==_27f){dijit.typematic.stop();}}}),dojo.connect(node,"onkeyup",this,function(evt){if(dijit.typematic._obj==_27f){dijit.typematic.stop();}})];},addMouseListener:function(node,_287,_288,_289,_28a){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_287,node,_288,node,_289,_28a);}),dc(node,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_287,node,_288,node,_289,_28a);setTimeout(dijit.typematic.stop,50);}})];},addListener:function(_291,_292,_293,_294,_295,_296,_297){return this.addKeyListener(_292,_293,_294,_295,_296,_297).concat(this.addMouseListener(_291,_294,_295,_296,_297));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=document.createElement("div");div.id="a11yTestNode";div.style.cssText="border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+dojo.moduleUrl("dijit","form/templates/blank.gif")+"\");";dojo.body().appendChild(div);function check(){var cs=dojo.getComputedStyle(div);if(cs){var _29a=cs.backgroundImage;var _29b=(cs.borderTopColor==cs.borderRightColor)||(_29a!=null&&(_29a=="none"||_29a=="url(invalid-url:)"));dojo[_29b?"addClass":"removeClass"](dojo.body(),"dijit_a11y");}};check();if(dojo.isIE){setInterval(check,4000);}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{hasWaiRole:function(elem){if(elem.hasAttribute){return elem.hasAttribute("role");}else{return elem.getAttribute("role")?true:false;}},getWaiRole:function(elem){var _29e=elem.getAttribute("role");if(_29e){var _29f=_29e.indexOf(":");return _29f==-1?_29e:_29e.substring(_29f+1);}else{return "";}},setWaiRole:function(elem,role){if(dojo.isFF&&dojo.isFF<3){elem.setAttribute("role","wairole:"+role);}else{elem.setAttribute("role",role);}},removeWaiRole:function(elem){elem.removeAttribute("role");},hasWaiState:function(elem,_2a4){if(dojo.isFF&&dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_2a4);}else{if(elem.hasAttribute){return elem.hasAttribute("aria-"+_2a4);}else{return elem.getAttribute("aria-"+_2a4)?true:false;}}},getWaiState:function(elem,_2a6){if(dojo.isFF&&dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_2a6);}else{var _2a7=elem.getAttribute("aria-"+_2a6);return _2a7?_2a7:"";}},setWaiState:function(elem,_2a9,_2aa){if(dojo.isFF&&dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_2a9,_2aa);}else{elem.setAttribute("aria-"+_2a9,_2aa);}},removeWaiState:function(elem,_2ac){if(dojo.isFF&&dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_2ac);}else{elem.removeAttribute("aria-"+_2ac);}}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},postscript:function(_2ad,_2ae){this.create(_2ad,_2ae);},create:function(_2af,_2b0){this.srcNodeRef=dojo.byId(_2b0);this._connects=[];this._attaches=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_2af){dojo.mixin(this,_2af);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){for(var attr in this.attributeMap){var _2b2=this[this.attributeMap[attr]||"domNode"];var _2b3=this[attr];if(typeof _2b3!="object"&&(_2b3!==""||(_2af&&_2af[attr]))){switch(attr){case "class":dojo.addClass(_2b2,_2b3);break;case "style":if(_2b2.style.cssText){_2b2.style.cssText+="; "+_2b3;}else{_2b2.style.cssText=_2b3;}break;default:_2b2.setAttribute(attr,_2b3);}}}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.doc.createElement("div");},postCreate:function(){},startup:function(){},destroyRecursive:function(_2b4){this.destroyDescendants();this.destroy();},destroy:function(_2b5){this.uninitialize();dojo.forEach(this._connects,function(_2b6){dojo.forEach(_2b6,dojo.disconnect);});this.destroyRendering(_2b5);dijit.registry.remove(this.id);},destroyRendering:function(_2b7){if(this.bgIframe){this.bgIframe.destroy();delete this.bgIframe;}if(this.domNode){dojo._destroyElement(this.domNode);delete this.domNode;}if(this.srcNodeRef){dojo._destroyElement(this.srcNodeRef);delete this.srcNodeRef;}},destroyDescendants:function(){dojo.forEach(this.getDescendants(),function(_2b8){_2b8.destroy();});},uninitialize:function(){return false;},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){var list=dojo.query("[widgetId]",this.domNode);return list.map(dijit.byNode);},nodesWithKeyClick:["input","button"],connect:function(obj,_2bb,_2bc){var _2bd=[];if(_2bb=="ondijitclick"){var w=this;if(!this.nodesWithKeyClick[obj.nodeName]){_2bd.push(dojo.connect(obj,"onkeydown",this,function(e){if(e.keyCode==dojo.keys.ENTER){return (dojo.isString(_2bc))?w[_2bc](e):_2bc.call(w,e);}else{if(e.keyCode==dojo.keys.SPACE){dojo.stopEvent(e);}}}));_2bd.push(dojo.connect(obj,"onkeyup",this,function(e){if(e.keyCode==dojo.keys.SPACE){return dojo.isString(_2bc)?w[_2bc](e):_2bc.call(w,e);}}));}_2bb="onclick";}_2bd.push(dojo.connect(obj,_2bb,this,_2bc));this._connects.push(_2bd);return _2bd;},disconnect:function(_2c1){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_2c1){dojo.forEach(_2c1,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){if(typeof this._ltr=="undefined"){this._ltr=dojo.getComputedStyle(this.domNode).direction!="rtl";}return this._ltr;},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");}});}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,containerNode:null,_skipNodeCache:false,buildRendering:function(){var _2c3=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_2c3)){var _2c5=this.declaredClass,_2c6=this;var tstr=dojo.string.substitute(_2c3,this,function(_2c8,key){if(key.charAt(0)=="!"){_2c8=_2c6[key.substr(1)];}if(typeof _2c8=="undefined"){throw new Error(_2c5+" template:"+key);}if(!_2c8){return "";}return key.charAt(0)=="!"?_2c8:_2c8.toString().replace(/"/g,"&quot;");},this);node=dijit._Templated._createNodesFromText(tstr)[0];}else{node=_2c3.cloneNode(true);}this._attachTemplateNodes(node);var _2ca=this.srcNodeRef;if(_2ca&&_2ca.parentNode){_2ca.parentNode.replaceChild(node,_2ca);}this.domNode=node;if(this.widgetsInTemplate){var _2cb=dojo.parser.parse(node);this._attachTemplateNodes(_2cb,function(n,p){return n[p];});}this._fillContent(_2ca);},_fillContent:function(_2ce){var dest=this.containerNode;if(_2ce&&dest){while(_2ce.hasChildNodes()){dest.appendChild(_2ce.firstChild);}}},_attachTemplateNodes:function(_2d0,_2d1){_2d1=_2d1||function(n,p){return n.getAttribute(p);};var _2d4=dojo.isArray(_2d0)?_2d0:(_2d0.all||_2d0.getElementsByTagName("*"));var x=dojo.isArray(_2d0)?0:-1;for(;x<_2d4.length;x++){var _2d6=(x==-1)?_2d0:_2d4[x];if(this.widgetsInTemplate&&_2d1(_2d6,"dojoType")){continue;}var _2d7=_2d1(_2d6,"dojoAttachPoint");if(_2d7){var _2d8,_2d9=_2d7.split(/\s*,\s*/);while(_2d8=_2d9.shift()){if(dojo.isArray(this[_2d8])){this[_2d8].push(_2d6);}else{this[_2d8]=_2d6;}}}var _2da=_2d1(_2d6,"dojoAttachEvent");if(_2da){var _2db,_2dc=_2da.split(/\s*,\s*/);var trim=dojo.trim;while(_2db=_2dc.shift()){if(_2db){var _2de=null;if(_2db.indexOf(":")!=-1){var _2df=_2db.split(":");_2db=trim(_2df[0]);_2de=trim(_2df[1]);}else{_2db=trim(_2db);}if(!_2de){_2de=_2db;}this.connect(_2d6,_2db,_2de);}}}var role=_2d1(_2d6,"waiRole");if(role){dijit.setWaiRole(_2d6,role);}var _2e1=_2d1(_2d6,"waiState");if(_2e1){dojo.forEach(_2e1.split(/\s*,\s*/),function(_2e2){if(_2e2.indexOf("-")!=-1){var pair=_2e2.split("-");dijit.setWaiState(_2d6,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_2e4,_2e5,_2e6){var _2e7=dijit._Templated._templateCache;var key=_2e5||_2e4;var _2e9=_2e7[key];if(_2e9){return _2e9;}if(!_2e5){_2e5=dijit._Templated._sanitizeTemplateString(dojo._getText(_2e4));}_2e5=dojo.string.trim(_2e5);if(_2e5.match(/\$\{([^\}]+)\}/g)||_2e6){return (_2e7[key]=_2e5);}else{return (_2e7[key]=dijit._Templated._createNodesFromText(_2e5)[0]);}};dijit._Templated._sanitizeTemplateString=function(_2ea){if(_2ea){_2ea=_2ea.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _2eb=_2ea.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_2eb){_2ea=_2eb[1];}}else{_2ea="";}return _2ea;};if(dojo.isIE){dojo.addOnUnload(function(){var _2ec=dijit._Templated._templateCache;for(var key in _2ec){var _2ee=_2ec[key];if(!isNaN(_2ee.nodeType)){dojo._destroyElement(_2ee);}_2ec[key]=null;}});}(function(){var _2ef={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};var tn;dijit._Templated._createNodesFromText=function(text){if(!tn){tn=dojo.doc.createElement("div");tn.style.display="none";dojo.body().appendChild(tn);}var _2f2="none";var _2f3=text.replace(/^\s+/,"");for(var type in _2ef){var map=_2ef[type];if(map.re.test(_2f3)){_2f2=type;text=map.pre+text+map.post;break;}}tn.innerHTML=text;if(tn.normalize){tn.normalize();}var tag={cell:"tr",row:"tbody",section:"table"}[_2f2];var _2f7=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;var _2f8=[];while(_2f7.firstChild){_2f8.push(_2f7.removeChild(_2f7.firstChild));}tn.innerHTML="";return _2f8;};})();dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",value:"",name:"",id:"",alt:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),setDisabled:function(_2f9){this.domNode.disabled=this.disabled=_2f9;if(this.focusNode){this.focusNode.disabled=_2f9;}if(_2f9){this._hovering=false;this._active=false;}dijit.setWaiState(this.focusNode||this.domNode,"disabled",_2f9);this._setStateClass();},_onMouse:function(_2fa){var _2fb=_2fa.target;if(_2fb&&_2fb.getAttribute){this.stateModifier=_2fb.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_2fa.type){case "mouseenter":case "mouseover":this._hovering=true;break;case "mouseout":case "mouseleave":this._hovering=false;break;case "mousedown":this._active=true;var self=this;var _2fd=this.connect(dojo.body(),"onmouseup",function(){self._active=false;self._setStateClass();self.disconnect(_2fd);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){if(!("staticClass" in this)){this.staticClass=(this.stateNode||this.domNode).className;}var _2fe=[this.baseClass];function multiply(_2ff){_2fe=_2fe.concat(dojo.map(_2fe,function(c){return c+_2ff;}));};if(this.checked){multiply("Checked");}if(this.state){multiply(this.state);}if(this.selected){multiply("Selected");}if(this.disabled){multiply("Disabled");}else{if(this._active){multiply(this.stateModifier+"Active");}else{if(this._focused){multiply("Focused");}else{if(this._hovering){multiply(this.stateModifier+"Hover");}}}}(this.stateNode||this.domNode).className=this.staticClass+" "+_2fe.join(" ");},onChange:function(_301){},postCreate:function(){this.setValue(this.value,null);this.setDisabled(this.disabled);this._setStateClass();},setValue:function(_302,_303){this._lastValue=_302;dijit.setWaiState(this.focusNode||this.domNode,"valuenow",this.forWaiValuenow());if(this._lastValueReported==undefined&&_303===null){this._lastValueReported=_302;}if((this.intermediateChanges||_303)&&_302!==this._lastValueReported){this._lastValueReported=_302;this.onChange(_302);}},getValue:function(){return this._lastValue;},undo:function(){this.setValue(this._lastValueReported,false);},_onKeyPress:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){var v=this.getValue();var lv=this._lastValueReported;if((typeof lv!="undefined")&&((v!==null&&v.toString)?v.toString():null)!==lv.toString()){this.undo();dojo.stopEvent(e);return false;}}return true;},forWaiValuenow:function(){return this.getValue();}});}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Contained",null,{getParent:function(){for(var p=this.domNode.parentNode;p;p=p.parentNode){var id=p.getAttribute&&p.getAttribute("widgetId");if(id){var _309=dijit.byId(id);return _309.isContainer?_309:null;}}return null;},_getSibling:function(_30a){var node=this.domNode;do{node=node[_30a+"Sibling"];}while(node&&node.nodeType!=1);if(!node){return null;}var id=node.getAttribute("widgetId");return dijit.byId(id);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");}});dojo.declare("dijit._Container",null,{isContainer:true,addChild:function(_30d,_30e){if(_30e===undefined){_30e="last";}var _30f=this.containerNode||this.domNode;if(_30e&&typeof _30e=="number"){var _310=dojo.query("> [widgetid]",_30f);if(_310&&_310.length>=_30e){_30f=_310[_30e-1];_30e="after";}}dojo.place(_30d.domNode,_30f,_30e);if(this._started&&!_30d._started){_30d.startup();}},removeChild:function(_311){var node=_311.domNode;node.parentNode.removeChild(node);},_nextElement:function(node){do{node=node.nextSibling;}while(node&&node.nodeType!=1);return node;},_firstElement:function(node){node=node.firstChild;if(node&&node.nodeType!=1){node=this._nextElement(node);}return node;},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode||this.domNode).map(dijit.byNode);},hasChildren:function(){var cn=this.containerNode||this.domNode;return !!this._firstElement(cn);},_getSiblingOfChild:function(_316,dir){var node=_316.domNode;var _319=(dir>0?"nextSibling":"previousSibling");do{node=node[_319];}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node?dijit.byNode(node):null;}});dojo.declare("dijit._KeyNavContainer",[dijit._Container],{_keyNavCodes:{},connectKeyNavHandlers:function(_31a,_31b){var _31c=this._keyNavCodes={};var prev=dojo.hitch(this,this.focusPrev);var next=dojo.hitch(this,this.focusNext);dojo.forEach(_31a,function(code){_31c[code]=prev;});dojo.forEach(_31b,function(code){_31c[code]=next;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");if(dojo.isIE){this.connect(this.domNode,"onactivate","_onContainerFocus");this.connect(this.domNode,"ondeactivate","_onContainerBlur");}else{this.connect(this.domNode,"onfocus","_onContainerFocus");this.connect(this.domNode,"onblur","_onContainerBlur");}},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_setTabIndexMinusOne"));},addChild:function(_321,_322){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._setTabIndexMinusOne(_321);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusNext:function(){if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){this.focusedChild.focusNext();return;}var _323=this._getNextFocusableChild(this.focusedChild,1);if(_323.getFocalNodes){this.focusChild(_323,_323.getFocalNodes()[0]);}else{this.focusChild(_323);}},focusPrev:function(){if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){this.focusedChild.focusPrev();return;}var _324=this._getNextFocusableChild(this.focusedChild,-1);if(_324.getFocalNodes){var _325=_324.getFocalNodes();this.focusChild(_324,_325[_325.length-1]);}else{this.focusChild(_324);}},focusChild:function(_326,node){if(_326){if(this.focusedChild&&_326!==this.focusedChild){this._onChildBlur(this.focusedChild);}this.focusedChild=_326;if(node&&_326.focusFocalNode){_326.focusFocalNode(node);}else{_326.focus();}}},_setTabIndexMinusOne:function(_328){if(_328.getFocalNodes){dojo.forEach(_328.getFocalNodes(),function(node){node.setAttribute("tabIndex",-1);});}else{(_328.focusNode||_328.domNode).setAttribute("tabIndex",-1);}},_onContainerFocus:function(evt){this.domNode.setAttribute("tabIndex",-1);if(evt.target===this.domNode){this.focusFirstChild();}else{var _32b=dijit.getEnclosingWidget(evt.target);if(_32b&&_32b.isFocusable()){this.focusedChild=_32b;}}},_onContainerBlur:function(evt){if(this.tabIndex){this.domNode.setAttribute("tabIndex",this.tabIndex);}},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.keyCode];if(func){func();dojo.stopEvent(evt);}},_onChildBlur:function(_32f){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_330,dir){if(_330){_330=this._getSiblingOfChild(_330,dir);}var _332=this.getChildren();for(var i=0;i<_332.length;i++){if(!_330){_330=_332[(dir>0)?0:(_332.length-1)];}if(_330.isFocusable()){return _330;}_330=this._getSiblingOfChild(_330,dir);}}});}if(!dojo._hasResource["dijit.form.Button"]){dojo._hasResource["dijit.form.Button"]=true;dojo.provide("dijit.form.Button");dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:"<div class=\"dijit dijitLeft dijitInline dijitButton\"\r\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\r\n\t><div class='dijitRight'\r\n\t\t><button class=\"dijitStretch dijitButtonNode dijitButtonContents\" dojoAttachPoint=\"focusNode,titleNode\"\r\n\t\t\ttype=\"${type}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\r\n\t\t\t><span class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\" \r\n \t\t\t\t><span class=\"dijitToggleButtonIconChar\">&#10003</span \r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span\r\n\t\t></button\r\n\t></div\r\n></div>\r\n",_onClick:function(e){if(this.disabled){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){dojo.stopEvent(e);var _336=this._onClick(e)!==false;if(this.type=="submit"&&_336){for(var node=this.domNode;node;node=node.parentNode){var _338=dijit.byNode(node);if(_338&&_338._onSubmit){_338._onSubmit(e);break;}if(node.tagName.toLowerCase()=="form"){node.submit();break;}}}},postCreate:function(){if(this.showLabel==false){var _339="";this.label=this.containerNode.innerHTML;_339=dojo.trim(this.containerNode.innerText||this.containerNode.textContent);this.titleNode.title=_339;dojo.addClass(this.containerNode,"dijitDisplayNone");}this.inherited(arguments);},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_33c){this.containerNode.innerHTML=this.label=_33c;if(dojo.isMozilla){var _33d=dojo.getComputedStyle(this.domNode).display;this.domNode.style.display="none";var _33e=this;setTimeout(function(){_33e.domNode.style.display=_33d;},1);}if(this.showLabel==false){this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent);}}});dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container],{baseClass:"dijitDropDownButton",templateString:"<div class=\"dijit dijitLeft dijitInline\"\r\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onclick:_onDropDownClick,onkeydown:_onDropDownKeydown,onblur:_onDropDownBlur,onkeypress:_onKey\"\r\n\t><div class='dijitRight'>\r\n\t<button class=\"dijitStretch dijitButtonNode dijitButtonContents\" type=\"${type}\"\r\n\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\r\n\t\t><div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div\r\n\t\t><span class=\"dijitButtonText\" \tdojoAttachPoint=\"containerNode,popupStateNode\"\r\n\t\tid=\"${id}_label\">${label}</span\r\n\t\t><span class='dijitA11yDownArrow'>&#9660;</span>\r\n\t</button>\r\n</div></div>\r\n",_fillContent:function(){if(this.srcNodeRef){var _33f=dojo.query("*",this.srcNodeRef);dijit.form.DropDownButton.superclass._fillContent.call(this,_33f[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(!this.dropDown){var _340=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_340);delete this.dropDownContainer;}dojo.body().appendChild(this.dropDown.domNode);this.dropDown.domNode.style.display="none";},_onArrowClick:function(e){if(this.disabled){return;}this._toggleDropDown();},_onDropDownClick:function(e){var _343=dojo.isFF&&dojo.isFF<3&&navigator.appVersion.indexOf("Macintosh")!=-1;if(!_343||e.detail!=0||this._seenKeydown){this._onArrowClick(e);}this._seenKeydown=false;},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled){return;}if(e.keyCode==dojo.keys.DOWN_ARROW){if(!this.dropDown||this.dropDown.domNode.style.display=="none"){dojo.stopEvent(e);return this._toggleDropDown();}}},_onBlur:function(){this._closeDropDown();},_toggleDropDown:function(){if(this.disabled){return;}dijit.focus(this.popupStateNode);var _347=this.dropDown;if(!_347){return false;}if(!_347.isShowingNow){if(_347.href&&!_347.isLoaded){var self=this;var _349=dojo.connect(_347,"onLoad",function(){dojo.disconnect(_349);self._openDropDown();});_347._loadCheck(true);return;}else{this._openDropDown();}}else{this._closeDropDown();}},_openDropDown:function(){var _34a=this.dropDown;var _34b=_34a.domNode.style.width;var self=this;dijit.popup.open({parent:this,popup:_34a,around:this.domNode,orient:this.isLeftToRight()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:function(){self._closeDropDown(true);},onCancel:function(){self._closeDropDown(true);},onClose:function(){_34a.domNode.style.width=_34b;self.popupStateNode.removeAttribute("popupActive");this._opened=false;}});if(this.domNode.offsetWidth>_34a.domNode.offsetWidth){var _34d=null;if(!this.isLeftToRight()){_34d=_34a.domNode.parentNode;var _34e=_34d.offsetLeft+_34d.offsetWidth;}dojo.marginBox(_34a.domNode,{w:this.domNode.offsetWidth});if(_34d){_34d.style.left=_34e-this.domNode.offsetWidth+"px";}}this.popupStateNode.setAttribute("popupActive","true");this._opened=true;if(_34a.focus){_34a.focus();}},_closeDropDown:function(_34f){if(this._opened){dijit.popup.close(this.dropDown);if(_34f){this.focus();}this._opened=false;}}});dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\r\n\tcellspacing='0' cellpadding='0'\r\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\">\r\n\t<tr>\r\n\t\t<td\tclass=\"dijitStretch dijitButtonContents dijitButtonNode\"\r\n\t\t\ttabIndex=\"${tabIndex}\"\r\n\t\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\"  dojoAttachPoint=\"titleNode\"\r\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\">\r\n\t\t\t<div class=\"dijitInline ${iconClass}\" dojoAttachPoint=\"iconNode\"></div>\r\n\t\t\t<span class=\"dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\">${label}</span>\r\n\t\t</td>\r\n\t\t<td class='dijitReset dijitRight dijitButtonNode dijitDownArrowButton'\r\n\t\t\tdojoAttachPoint=\"popupStateNode,focusNode\"\r\n\t\t\tdojoAttachEvent=\"ondijitclick:_onArrowClick, onkeypress:_onKey\"\r\n\t\t\tstateModifier=\"DownArrow\"\r\n\t\t\ttitle=\"${optionsTitle}\" name=\"${name}\"\r\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\r\n\t\t><div waiRole=\"presentation\">&#9660;</div>\r\n\t</td></tr>\r\n</table>\r\n",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{id:"",name:""}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){this.inherited(arguments);this._focalNodes=[this.titleNode,this.popupStateNode];dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){if(dojo.isIE){this.connect(node,"onactivate",this._onNodeFocus);}else{this.connect(node,"onfocus",this._onNodeFocus);}}));},focusFocalNode:function(node){this._focusedNode=node;dijit.focus(node);},hasNextFocalNode:function(){return this._focusedNode!==this.getFocalNodes()[1];},focusNext:function(){this._focusedNode=this.getFocalNodes()[this._focusedNode?1:0];dijit.focus(this._focusedNode);},hasPrevFocalNode:function(){return this._focusedNode!==this.getFocalNodes()[0];},focusPrev:function(){this._focusedNode=this.getFocalNodes()[this._focusedNode?0:1];dijit.focus(this._focusedNode);},getFocalNodes:function(){return this._focalNodes;},_onNodeFocus:function(evt){this._focusedNode=evt.currentTarget;},_onBlur:function(evt){this.inherited(arguments);this._focusedNode=null;}});dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,_clicked:function(evt){this.setChecked(!this.checked);},setChecked:function(_355){this.checked=_355;dijit.setWaiState(this.focusNode||this.domNode,"pressed",this.checked);this._setStateClass();this.onChange(_355);}});}if(!dojo._hasResource["topaz.widget.DatepickerPanel_ArrivalNightsSelect"]){dojo._hasResource["topaz.widget.DatepickerPanel_ArrivalNightsSelect"]=true;dojo.provide("topaz.widget.DatepickerPanel_ArrivalNightsSelect");dojo.declare("topaz.widget.DatepickerPanel_ArrivalNightsSelect",[dijit._Widget,dijit._Templated],{declaredClass:"DatepickerPanel_ArrivalNightsSelect",templateString:"<div id=\"${id}\" widgetId=\"${id}\" dojoAttachPoint=\"mainNode\" class=\"datepickerPanel\">\r\n \t<form dojoAttachPoint=\"formNode\" method=\"${formMethod}\" action=\"${formAction}\">\r\n  \t<span class=\"label arrivalLabel\">\r\n\t\t${arrivalLabel}\r\n\t</span> \r\n\t<span class=\"arrivalSelect\" dojoAttachPoint=\"arrivalMonthSelectSpan\">\r\n\t\t<select dojoType=\"Select\" dojoAttachPoint=\"arrivalMonthSelect\" type=\"text\" name=\"month\" class=\"month\"\r\n\t\t\t\tdojoAttachEvent=\"onchange:onArrivalMonthChange\">\r\n\t\t</select>\r\n\t\t<select dojoType=\"Select\" dojoAttachPoint=\"arrivalDaySelect\" type=\"text\" name=\"day\" class=\"day\"\r\n\t\t\t\tdojoAttachEvent=\"onchange:onArrivalDayChange\">\r\n\t\t</select>\r\n\t\t<select dojoType=\"Select\" dojoAttachPoint=\"arrivalYearSelect\" type=\"text\" name=\"year\" class=\"year\"\r\n\t\t\t\tdojoAttachEvent=\"onchange:onArrivalYearChange\">\r\n\t\t</select>\r\n\t</span>\r\n\t<span class=\"label nightstayLabel\">\r\n\t\t${nightstayLabel}\r\n\t</span>\r\n\t<span class=\"nightstaySelect\">\r\n\t\t<select size=\"1\" dojoAttachPoint=\"nightStaySelect\" type=\"text\" name=\"nightstay\"\r\n\t\t\t\tdojoAttachEvent=\"onchange:onNightStayChange\">\r\n\t\t\t<option value=\"1\" selected >1</option>\r\n\t\t\t<option value=\"2\">2</option>\r\n\t\t\t<option value=\"3\">3</option>\r\n\t\t\t<option value=\"4\">4</option>\r\n\t\t\t<option value=\"5\">5</option>\r\n\t\t\t<option value=\"6\">6</option>\r\n\t\t\t<option value=\"7\">7</option>\r\n\t\t\t<option value=\"8\">8</option>\r\n\t\t\t<option value=\"9\">9</option>\r\n\t\t\t<option value=\"10\">10</option>\r\n\t\t\t<option value=\"11\">11</option>\r\n\t\t\t<option value=\"12\">12</option>\r\n\t\t\t<option value=\"13\">13</option>\r\n\t\t\t<option value=\"14\">14</option>\r\n\t\t\t<option value=\"15\">15</option>\r\n\t\t</select>\t\r\n\t</span>\r\n\t<div class=\"promoCode\">\r\n\t\t<span class=\"promoCodeLabel\">\r\n\t\t\t${promoCodeLabel}\r\n\t\t</span>\r\n\t\t<span class=\"promoCodeInput\">\r\n\t\t\t<input type=\"text\" name=\"pcod\" value=\"${promoCode}\">\t\r\n\t\t</span>\r\n\t</div>\r\n   <span\r\n\tclass=\"submitButton\">\r\n\t\t<a href=\"#\" dojoAttachEvent=\"onclick:onSubmit\"><img dojoAttachPoint=\"submitButtonImageNode\" border=\"0\" src=\"${submitButtonImageSrc}\" alt=\"${submitAltText}\"></a>\r\n   </span>\r\n\t<input type=\"hidden\" name=\"siteid\" value=\"${siteId}\">\r\n\t<input type=\"hidden\" name=\"hnum\" value=\"${hotelId}\">\r\n\t</form>\r\n</div>\r\n",mainNode:null,formNode:null,arrivalMonthSelectSpan:null,arrivalMonthSelect:null,arrivalDaySelect:null,arrivalYearSelect:null,nightStaySelect:null,submitButtonImageNode:null,vertical:false,id:"",promoCodeLabel:"Promo Code:",arrivalLabel:"Arrival Date:",nightstayLabel:"Nights:",submitButtonImageSrc:"",submitAltText:"Check Availability",formMethod:"GET",formAction:"http://www.hotelres.com",formActionEnabled:true,dateFormat:"MM/dd/yyyy",monthArray:["Month","January","February","March","April","May","June","July","August","September","October","November","December"],arrivalMonth:null,arrivalDay:null,arrivalYear:null,nightstay:1,promoCode:"",siteId:"",hotelId:"",daysInAdvance:0,_extractday:function(_356){_356+="";return parseInt(_356.substring(3,5),10);},_extractyear:function(_357){_357+="";return parseInt(_357.substring(6,10),10);},_extractmonth:function(_358){_358+="";return parseInt(_358.substring(0,2),10);},_getMonthNumDays:function(_359,_35a){var _35b=0;switch(parseInt(_359,10)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:_35b=31;break;case 2:if((_35a%4)==0){_35b=29;}else{_35b=28;}break;default:_35b=30;break;}return _35b;},_dateAdd:function(_35c,_35d){var _35e=parseInt(this._extractmonth(_35c),10);var _35f=parseInt(this._extractday(_35c),10);var _360=parseInt(this._extractyear(_35c),10);var _361=this._getMonthNumDays(_35e,_360);_35f+=parseInt(_35d,10);while(_35f>_361){_35f=_35f-_361;_35e++;if(_35e>12){_35e=1;_360++;}_361=this._getMonthNumDays(_35e,_360);}_35e=_35e<10?"0"+_35e:""+_35e;_35f=_35f<10?"0"+_35f:""+_35f;return _35e+"/"+_35f+"/"+_360;},_getDateStr:function(strM,strD,strY,_365){if(!_365){_365="MM/dd/yyyy";}return dojo.date.locale.format(this._getDate(strM,strD,strY),{selector:"date",datePattern:_365});},_getDate:function(strM,strD,strY){var _369=new Date();var _36a=parseInt(strM,10)-1;var _36b=parseInt(strD,10);var _36c=parseInt(strY,10);_369.setFullYear(_36c,_36a,_36b);return _369;},getArrivalDate:function(){return this._getDateStr(this.arrivalMonth,this.arrivalDay,this.arrivalYear,"MM/dd/yyyy");},getDepartureDate:function(){return this._dateAdd(this.getArrivalDate(),this.nightstay);},_checkDates:function(){try{var _36d=this.getmonthnumdays(this.arrivalMonth,this.arrivalYear);if(this.arrivalDay>_36d){this.arrivalDay=_36d;}this.populateDays();}catch(err){alert("DP_ANS._checkDates-error: "+err.message);}},onArrivalMonthChange:function(evt){try{console.debug("DP_ANS.onArrivalMonthChange");this.arrivalMonth=parseInt(this.arrivalMonthSelect.value);this._checkDates();}catch(err){console.debug("DP_ANS.onArrivalMonthChange-error: "+err.message);}},onArrivalDayChange:function(evt){console.debug("DP_ANS.onArrivalDayChange");this.arrivalDay=parseInt(this.arrivalDaySelect.value);},onArrivalYearChange:function(evt){console.debug("DP_ANS.onArrivalYearChange");this.arrivalYear=parseInt(this.arrivalYearSelect.value);this._checkDates();},onNightStayChange:function(evt){console.debug("DP_ANS.onNightStayChange");this.nightstay=parseInt(this.nightStaySelect.value);},onSubmit:function(evt){if(this.formActionEnabled){this.formNode.submit();}},addLeadingZeros:function(num){var _374;if(parseInt(num)<10){_374="0"+num;}else{_374=""+num;}return _374;},getmonthnumdays:function(_375,_376){var _377=0;switch(parseInt(_375)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:_377=31;break;case 2:if((parseInt(_376)%4)==0){_377=29;}else{_377=28;}break;default:_377=30;break;}return _377;},populateDays:function(){var _378=this.arrivalDaySelect;this.arrivalDaySelect.innerHTML="";_378.options[0]=new Option("dd","00",false,false);for(i=1;i<=this.getmonthnumdays(this.arrivalMonth,this.arrivalYear);i++){_378.options[i]=new Option(i+"",i,false,false);if(_378.options[i].value==this.arrivalDay){_378.options[i].selected=true;}else{_378.options[i].selected=false;}}},populateDropDowns:function(){try{var _379=new Date();var _37a=this.arrivalMonthSelect;_37a.options[0]=new Option(this.monthArray[0],"0",false,false);_37a.options[1]=new Option(this.monthArray[1],"1",false,false);_37a.options[2]=new Option(this.monthArray[2],"2",false,false);_37a.options[3]=new Option(this.monthArray[3],"3",false,false);_37a.options[4]=new Option(this.monthArray[4],"4",false,false);_37a.options[5]=new Option(this.monthArray[5],"5",false,false);_37a.options[6]=new Option(this.monthArray[6],"6",false,false);_37a.options[7]=new Option(this.monthArray[7],"7",false,false);_37a.options[8]=new Option(this.monthArray[8],"8",false,false);_37a.options[9]=new Option(this.monthArray[9],"9",false,false);_37a.options[10]=new Option(this.monthArray[10],"10",false,false);_37a.options[11]=new Option(this.monthArray[11],"11",false,false);_37a.options[12]=new Option(this.monthArray[12],"12",false,false);var _37b;for(i=0;i<=12;i++){if(_37a.options[i].value==this.arrivalMonth){_37a.options[i].selected=true;_37b=i;}else{_37a.options[i].selected=false;}}this.populateDays();var _37c=this.arrivalYearSelect;_37c.options[0]=new Option("Year","0000",false,false);_37c.options[1]=new Option(_379.getFullYear(),_379.getFullYear(),false,false);if(_37c.options[1].value==this.arrivalYear){_37c.options[1].selected=true;}_37c.options[2]=new Option(_379.getFullYear()+1,_379.getFullYear()+1,false,false);if(_37c.options[2].value==this.arrivalYear){_37c.options[2].selected=true;}_37c.options[3]=new Option(_379.getFullYear()+2,_379.getFullYear()+2,false,false);if(_37c.options[3].value==this.arrivalYear){_37c.options[3].selected=true;}nightstayselect=this.nightStaySelect;nightstayselect.options[0]=new Option(" ","00",false,false);for(i=1;i<=15;i++){nightstayselect.options[i]=new Option(i+"",this.addLeadingZeros(i),false,false);if(nightstayselect.options[i].value==this.nightstay){nightstayselect.options[i].selected=true;}else{nightstayselect.options[i].selected=false;}}}catch(err){console.debug("DP_ANS.populateDropDowns-error: "+err.message);}},postCreate:function(){console.debug("DatepickerPanel_ArrivalNightsSelect.postCreate");},startup:function(){console.debug("DatepickerPanel_ArrivalNightsSelect.startup");try{if(!(this.arrivalMonth&&this.arrivalDay&&this.arrivalYear)){var _37d=new Date();var _37e=dojo.date.add(_37d,"day",this.daysInAdvance);this.arrivalMonth=_37e.getMonth()+1;this.arrivalDay=_37e.getDate();this.arrivalYear=_37e.getFullYear();if(this.vertical){dojo.removeClass(this.mainNode,"datepickerPanel_horizontal");dojo.addClass(this.mainNode,"datepickerPanel_vertical");}else{dojo.removeClass(this.mainNode,"datepickerPanel_vertical");dojo.addClass(this.mainNode,"datepickerPanel_horizontal");}}if(this.submitButtonImageSrc==""||!this.submitButtonImageSrc){this.submitButtonImageSrc=dojo.moduleUrl("topaz","widget/images/datepicker_submit.gif");this.submitButtonImageNode.src=this.submitButtonImageSrc;}this.populateDropDowns();}catch(err){console.debug("DP_ANS.startup-error: "+err.message);}}});}if(!dojo._hasResource["topaz.utils.bahelper"]){dojo._hasResource["topaz.utils.bahelper"]=true;dojo.provide("topaz.utils.bahelper");dojo.declare("BAHelper",null,{included_files:[],getAncestorWithThisMethod:function(_37f,_380){var _381=_37f.parentNode;try{eval("dijit.byId('"+_381.id+"')."+_380+"();");return _381;}catch(err){if(_381!=null){return this.getAncestorWithThisMethod(_381,_380);}else{return null;}}},showCalendarInContextOfRoom:function(_382,_383,_384){try{var X=dijit.byId(_382);if(!_384){_384="Selected room";}var Y=dijit.byId(_382+"_selectedStayDates");Y.setRoomId(_383);Y.setAvailDayLegendDescr(_384+" available");Y.setOtherAvailLegendDescr("Other rooms available");Y.showOtherRoomsLegend();Y.openPopInWindow();Y.redrawCalendars();}catch(err){console.debug("bahelper.showCalendarInContextOfRoom-error: "+err.message);}},showCalendarInContextOfHotel:function(_387,_388,_389){var X=dijit.byId(_387);if(!_389){_389="Selected hotel";}var Y=dijit.byId(_387+"_selectedStayDates");Y.setHotelId(_388);Y.setRoomId("");Y.setAvailDayLegendDescr(_389+" available");Y.setOtherAvailLegendDescr("Other hotels available");Y.openPopInWindow();Y.redrawCalendars();},dojoFxSizeTo:function(args){try{var node=(args.node=dojo.byId(args.node));var _38e=dojo.getComputedStyle;var _38f=args.method||"chain";if(_38f=="chain"){args.duration=(args.duration/2);}var top,_391,left,_393,_394,_395=null;var init=(function(){var _397=node;return function(){var pos=_38e(_397).position;top=(pos=="absolute"?node.offsetTop:parseInt(_38e(node).top)||0);left=(pos=="absolute"?node.offsetLeft:parseInt(_38e(node).left)||0);_394=parseInt(dojo.style(node,"width"));_395=parseInt(dojo.style(node,"height"));if(args.aboutTopLeft){_393=left;_391=top;}else{if(args.aboutBottomRight){_393=args.left;_391=args.top;}else{_393=left-((args.width-_394)/2);_391=top-((args.height-_395)/2);}}if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(_397,true);top=ret.y;left=ret.x;_397.style.position="absolute";_397.style.top=top+"px";_397.style.left=left+"px";}};})();init();var _39a=dojo.animateProperty(dojo.mixin({properties:{height:{start:_395,end:args.height||0,unit:"px"},top:{start:top,end:_391}}},args));var _39b=dojo.animateProperty(dojo.mixin({properties:{width:{start:_394,end:args.width||0,unit:"px"},left:{start:left,end:_393}}},args));var anim=dojo.fx[((args.method=="combine")?"combine":"chain")]([_39a,_39b]);dojo.connect(anim,"beforeBegin",anim,init);return anim;}catch(err){console.debug("bahelper.dojoFxSizeTo-error: "+err.message);}},clearOptions:function(_39d){for(x=_39d.length;x>=0;x--){_39d[x]=null;}},AddToOptionList:function(_39e,_39f,_3a0){_39e[_39e.length]=new Option(_3a0,_39f);},getContainingWidgetObject:function(_3a1){return this.getAncestorWithThisMethod(_3a1,"returnWidgetType");},ieSelectBugProof:function(_3a2){_3a2.innerHTML=(_3a2.innerHTML+"<iframe src=\"about:blank\" scrolling=\"no\" frameborder=\"0\" style=\"filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);\"></iframe>");var _3a3=_3a2.firstChild;_3a3.style.width=_3a2.offsetWidth+"px";_3a3.style.height=_3a2.offsetHeight+"px";_3a3.style.position="relative";_3a3.style.top=_3a2.top-_3a3.style.height;_3a3.style.zIndex="-1";},ArrayCopy:function(_3a4){var _3a5=new Array();var i;for(i in _3a4){_3a5[i]=_3a4[i];}return _3a5;},trim:function(s){while(s.substring(0,1)==" "){s=s.substring(1,s.length);}while(s.substring(s.length-1,s.length)==" "){s=s.substring(0,s.length-1);}return s;},addLeadingZeros:function(_3a8){return parseInt(_3a8,10)<10?"0"+_3a8:""+_3a8;},Left:function(str,n){if(n<=0){return "";}else{if(n>String(str).length){return str;}else{return String(str).substring(0,n);}}},Right:function(str,n){if(n<=0){return "";}else{if(n>String(str).length){return str;}else{var iLen=String(str).length;return String(str).substring(iLen,iLen-n);}}},populateCCtexts:function(_3ae){var i;var _3b0;var _3b1=new Array();for(i=0;i<_3ae.length;i++){switch(_3ae[i]){case "AX":_3b0="American Express";break;case "MC":_3b0="Mastercard";break;case "VI":_3b0="Visa";break;case "DC":_3b0="Discover Card";break;case "DI":_3b0="Diners Club";break;case "JC":_3b0="Japan Credit Bureau";break;case "EN":_3b0="Enroute";break;case "CB":_3b0="Carte Blanche";break;case "EU":_3b0="Euro Card";break;case "ER":_3b0="Encore";break;case "pr":_3b0="Guest will Prepay";break;}_3b1[i]=_3b0;}return _3b1;},replaceSubstring:function(_3b2,from,to){var _3b5="";while(_3b2.length>=from.length&&_3b2.length>0&&from.length>0){if(_3b2.substring(0,from.length)==from){_3b5+=to;_3b2=_3b2.substring(from.length);}else{_3b5+=_3b2.substring(0,1);_3b2=_3b2.substring(1);}}return _3b5+_3b2;},extractday:function(_3b6){_3b6+="";return parseInt(_3b6.substring(3,5),10);},extractyear:function(_3b7){_3b7+="";return parseInt(_3b7.substring(6,10),10);},extractmonth:function(_3b8){_3b8+="";return parseInt(_3b8.substring(0,2),10);},isCCExpOK_B3:function(_3b9){try{var _3ba=true;var y=parseInt(_3b9.elements["item[ccxpire_yr]"].value*1,10);var m=parseInt(_3b9.elements["item[ccxpire_mo]"].value*1,10);var b=document.forms.bang;var _3be=2007;var _3bf=5;if((_3be>y)||(_3be==y&&_3bf>m)){alert("Select a credit card that expires after your arrival date");return false;}return true;}catch(errorObj){console.debug("bahelper.isCCExpOK_B3-error"+errorObj.message);}},checkRooms:function(ppl,_3c1){try{var _3c2=1;var _3c3=0;_3c2=ppl.selectedIndex+1;_3c3=_3c1.selectedIndex;if(_3c3>=_3c2){alert("Rooms must have at least one adult.");return false;}return true;}catch(errorObj){return true;}},checkCreditCard_B3:function(_3c4,_3c5,_3c6){try{var f=document.reservationForm;var _3c8=_3c4.options[_3c4.selectedIndex].value;if(_3c8=="VI"){var _3c9="VISA";}if(_3c8=="AX"){var _3c9="American Express";}if(_3c8=="DC"){var _3c9="Discover";}if(_3c8=="MC"){var _3c9="MasterCard";}var _3ca=stripCharsInBag(_3c5.value,creditCardDelimiters);if(_3c8=="pr"){if(f.elements["prepay"][0]!=undefined){for(a=0;a<f.elements["prepay"].length;a++){if((f.elements["prepay"][a].checked==true)&&(f.elements["prepay"][a].value=="C")){alert("Please provide a valid credit card type and number");return false;}}}return true;}if(!checkString(f.elements["item[ccholder]"],iccholder)){return false;}if(!isCardMatch(_3c8,_3ca)){return warnInvalid(_3c5,iCreditCardPrefix+_3c9+iCreditCardSuffix);}else{if(_3c8=="AX"){_3c5.value=_3ca.substring(0,4)+"-"+_3ca.substring(4,10)+"-"+_3ca.substring(10,15);}else{_3c5.value=_3ca.substring(0,4)+"-"+_3ca.substring(4,8)+"-"+_3ca.substring(8,12)+"-"+_3ca.substring(12,16);}return true;}}catch(errorObj){return true;}},ValidateForm_B3:function(_3cb){console.debug("In bahelper.ValidateForm_B3");try{if(checkString(_3cb.elements["item[fname]"],sfname)&&checkString(_3cb.elements["item[lname]"],slname)&&checkString(_3cb.elements["item[addr1]"],saddress1)&&checkString(_3cb.elements["item[addr2]"],saddress2,true)&&checkString(_3cb.elements["item[city]"],scity)&&checkString(_3cb.elements["item[zip]"],iZip)&&checkString(_3cb.elements["item[state]"],sstate,true)&&checkPhone(_3cb.elements["item[callphone]"])&&checkEmail(_3cb.elements["item[email]"])&&this.checkRooms(_3cb.elements["item[number_adults]"],_3cb.elements["item[number_children]"])&&this.checkCreditCard_B3(_3cb.elements["item[cctype]"],_3cb.elements["item[ccnumb]"],_3cb)&&(this.isCCExpOK_B3(_3cb))){return true;}else{return false;}}catch(errorObj){console.debug("bahelper.ValidateForm_B3-error: "+errorObj.message);return true;}},makeHidden:function(_3cc){document.getElementById("thisObjectID").style.visibility="hidden";},makeVisible:function(_3cd){document.getElementById("thisObjectID").style.visibility="visible";},getXMLobject:function(_3ce){var _3cf;if(document.implementation.createDocument){var _3d0=new DOMParser();_3cf=_3d0.parseFromString(_3ce,"text/xml");}else{if(window.ActiveXObject){_3cf=new ActiveXObject("Microsoft.XMLDOM");_3cf.async="false";_3cf.loadXML(_3ce);}}return _3cf;},getValuefromXML:function(_3d1,_3d2,_3d3){var _3d4;try{_3d4=_3d1.getElementsByTagName(_3d3)[_3d2].childNodes[0].nodeValue;return unescape(_3d4);}catch(e){return false;}},getIndexOfValuefromXML:function(_3d5,_3d6,_3d7){var _3d8;try{var i=0;var _3da=false;while(!_3da&&i<_3d5.getElementsByTagName(_3d6).length){if(_3d7==_3d5.getElementsByTagName(_3d6)[i].childNodes[0].nodeValue){_3d8=i;_3da=true;}else{i++;}}return _3d8;}catch(e){return 0;}},getAttrValueFromXML:function(_3db,_3dc,_3dd){try{var root=_3db.getElementsByTagName(_3dc)[0];return root.getAttribute(_3dd);}catch(err){console.debug("bahelper.getAttrValueFromXML-error: '"+err.message+"', rootName='"+_3dc+"', attr='"+_3dd+"'");return false;}},getCheckedValue:function(_3df){if(!_3df){return "";}var _3e0=_3df.length;if(_3e0==undefined){if(_3df.checked){return _3df.value;}else{return "";}}for(var i=0;i<_3e0;i++){if(_3df[i].checked){return _3df[i].value;}}return "";},setCheckedValue:function(_3e2,_3e3){if(!_3e2){return;}var _3e4=_3e2.length;if(_3e4==undefined){if(_3e3.toString){_3e2.checked=(_3e2.value==_3e3.toString());}else{_3e2.checked=false;}return;}for(var i=0;i<_3e4;i++){_3e2[i].checked=false;if(_3e2[i].value==_3e3.toString()){_3e2[i].checked=true;}}},IsNumeric:function(_3e6){var _3e7="0123456789.";var _3e8=true;var Char;for(i=0;i<_3e6.length&&_3e8==true;i++){Char=_3e6.charAt(i);if(_3e7.indexOf(Char)==-1){_3e8=false;}}return _3e8;},getArrayAverage:function(_3ea){var sum=0;var _3ec=0;if(_3ea.length>=1){if(!this.IsNumeric(_3ea[0])){_3ea.shift();}}for(var i=0;i<_3ea.length;i++){sum+=parseFloat(_3ea[i]);if(_3ea[i]==false||_3ea[i]=="false"||!this.IsNumeric(_3ea[i])){_3ec++;}}var _3ee=_3ea.length-_3ec;if(_3ee>0){return parseFloat(sum/(_3ea.length-_3ec));}else{return 0;}},getCSVfromArray:function(_3ef){var _3f0="";for(var i=0;i<_3ef.length;i++){_3f0+=_3ef[i];if(i<_3ef.length-1){_3f0+=",";}}return _3f0;},getHTMLParameters:function(_3f2,_3f3){console.debug("bahelper.getHTMLParameters: pageLocation="+_3f3);_3f3=_3f3+"";var _3f4=_3f3.split("?",2);var url=_3f4[0];var _3f6;if(!(_3f2 instanceof Array)){_3f2=new Array();}var left,_3f8;if(_3f4.length>1){_3f6=_3f4[1].split("&");for(var i=0;i<_3f6.length;i++){var _3fa=_3f6[i].split("=",2);left=_3fa[0];_3f8=_3fa[1];_3f2[left]=_3f8;}}return _3f2;},include_dom:function(_3fb){var _3fc=document.getElementsByTagName("head").item(0);var js=document.createElement("script");js.setAttribute("language","javascript");js.setAttribute("type","text/javascript");js.setAttribute("src",_3fb);_3fc.appendChild(js);return false;},include_once:function(_3fe){if(!in_array(_3fe,this.included_files)){this.included_files[this.included_files.length]=_3fe;this.include_dom(_3fe);}},in_array:function(_3ff,_400){for(var i=0;i<_400.length;i++){if(_400[i]==_3ff){return true;}}return false;},getPrefix:function(_402,_403){_402=_402+"";var _404=_402.split(_403);return _404[0];},stripMarkup:function(_405,_406){try{if(!_406){_406="";}_405+="";var _407=_405.split("<");var str1,str2,str3;if(_407.length<2){return _406+_405;}else{str1=_405;str2=str1.split("<");var _40b="";var _40c="";for(var i=1;i<str2.length;i++){if(i!=1){_40b+="<";}_40b+=str2[i];}str3=_40b.split(">");_40b="";for(var i=1;i<str3.length;i++){if(i!=1){_40b+=">";}_40b+=str3[i];}return this.stripMarkup(_40b,_406+_40c+str2[0]);}}catch(err){console.debug("bahelper.stripMarkup-error: "+err.message);}},capitalizeString:function(word){return word.substring(0,1).toUpperCase()+word.substring(1);},escape:function(_40f,_410){try{var _411="";var _412="";for(var i=0;i<_40f.length;i++){_412=_40f.substring(i,i+1);console.debug("bahelper.escape: thisChar="+_412+", = '"+_410+"'? "+(_412==_410));if(_412!=_410){_411+=escape(_412);}else{_411+=_412;}}return _411;}catch(err){console.debug("bahelper.escape-error: "+err.message);return _40f;}},constructor:function(){this.included_files=new Array();}});}if(!dojo._hasResource["topaz.data.MapBubble"]){dojo._hasResource["topaz.data.MapBubble"]=true;dojo.provide("topaz.data.MapBubble");dojo.declare("MapBubble",null,{domNode:null,htmlSource:"",loader:null,mode:"html",setLoader:function(_414){this.loader=_414;if(this.loader){switch(this.loader.mode){case "dom":this.domNode=this.loader.generateBubbleDOM();this.mode="dom";break;case "html":this.htmlSource=this.loader.generateBubbleHtml();this.mode="html";break;}}},isHTML:function(){return this.mode=="html";},isDOM:function(){return this.mode=="dom";},getHTML:function(){return this.htmlSource;},getDOM:function(){return this.domNode;},constructor:function(){}});}if(!dojo._hasResource["topaz.widget.MapWidget"]){dojo._hasResource["topaz.widget.MapWidget"]=true;dojo.provide("topaz.widget.MapWidget");dojo.declare("topaz.widget.MapWidget",[dijit._Widget,dijit._Templated],{id:"",declaredClass:"ComparePanelItem",dojoRoot:dojo.baseUrl,map:null,mapId:"map",googleMapNode:null,geocoder:null,mgrOptions:null,mgr:null,markers:[],iconImages:[],iconWidths:[],iconHeights:[],shadowIconWidth:52,shadowIconHeight:32,shadowImgSrc:"../topaz/widget/images/house-shadow.png",lastShownCenter:null,lastShownZoom:4,minMovementThreshold:10,openInfoWindowOnClick:true,useLargeControl:true,panOnBubbleOpen:true,defaultLatitude:37.77916,defaultLongitude:-122.42009,defaultZoomLevel:15,defaultAddress:"San Francisco, CA",useDefaultZoom:true,enableOverview:false,suppressMapPan:false,templateString:"<DIV id=\"${id}\" class=\"MapWidget\">\r\n\t<div id=\"${mapId}\" class=\"googleMapObj\" dojoAttachPoint=\"googleMapNode\">\r\n\t</div>\t\r\n\t<div dojoAttachPoint=\"loadingImageDivNode\" class=\"loadingImage\">\r\n\t\t<img dojoAttachPoint=\"loadingImageNode\" src=\"${loadingImageSrc}\" alt=\"Updating Map...\"/>\r\n\t</div>\r\n</DIV>\r\n",googleMapKey:"",loadingImageSrc:dojo.baseUrl+"../topaz/widget/images/loading.gif",loadingImageDivNode:null,loadingImageNode:null,loadingTimer:null,loadTimeout:20000,closeInfoWindow:function(){this.map.closeInfoWindow();},getZoom:function(){return parseInt(this.map.getZoom(),10);},getDistMiles:function(_415,_416){try{var _417=this.getMarker(_416).getPoint();return 0.000621371192*this.getMarker(_415).getPoint().distanceFrom(_417);}catch(err){console.debug("MapWidget.getDistMiles-error: "+err.message);return 9999.999;}},setLoading:function(){dojo.removeClass(this.loadingImageDivNode,"noshow");this.loadingTimer=setTimeout(dojo.hitch(this,function(){this.resetLoading();}),this.loadTimeout);},resetLoading:function(){dojo.addClass(this.loadingImageDivNode,"noshow");if(this.loadingTimer){clearTimeout(this.loadingTimer);}},getMarker:function(_418){return this.markers["ID~"+_418];},markerExistsAtPoint:function(_419){var _41a=null;var pnt;for(var idx in this.markers){pnt=this.markers[idx].getPoint();if(pnt.equals(_419)){_41a=this.markers[idx];}}return _41a;},getMarkerLong:function(_41d){var _41e=this.getMarker(_41d);var _41f=_41e.getPoint();return _41f.lng();},getMarkerLat:function(_420){var _421=this.getMarker(_420);var _422=_421.getPoint();return _422.lat();},openBubbleForMarker:function(_423,_424){try{var _425=this.getMarker(_423);console.debug("markerId: "+_423+", thisMarker.isHidden() = "+_425.isHidden());if(!_425.isHidden()){var _426=_425.getPoint();if(this.panOnBubbleOpen){this.map.panTo(new GLatLng(_426.lat(),_426.lng()));}_425.openInfoWindowHtml(_424.generateBubbleHtml(_425),{suppressMapPan:this.suppressMapPan});this.onMarkerClick(_425,_424);}}catch(err){console.debug("MapWidget.openBubbleForMarker-error: "+err.message);}},getIcon:function(key){var icon=new GIcon();icon.image=this.iconImages[key];icon.iconSize=new GSize(this.iconWidths[key],this.iconHeights[key]);icon.iconAnchor=new GPoint(this.iconWidths[key]>>1,this.iconHeights[key]>>1);icon.infoWindowAnchor=new GPoint(this.iconWidths[key]>>1,this.iconHeights[key]>>1);icon.shadow=dojo.baseUrl+this.shadowImgSrc;icon.shadowSize=new GSize(this.shadowIconWidth,this.shadowIconHeight);return icon;},setZoom:function(_429){this.map.setZoom(_429);},centerMapToThisPoint:function(lat,lng,_42c,pan){try{if(pan){this.map.setZoom(_42c);this.map.panTo(new GLatLng(lat,lng));}else{if(_42c){this.map.setCenter(new GLatLng(lat,lng),_42c);}else{this.map.setCenter(new GLatLng(lat,lng));}}return true;}catch(err){console.debug("MapWidget.centerMapToThisPoint-error: "+err.message);return false;}},onCenterDone:function(_42e){},centerMapToThisAddress:function(_42f,_430){try{if(!_430){if(this.useDefaultZoom){_430=this.defaultZoomLevel;}}this.geocoder.getLatLng(_42f,dojo.hitch(this,function(_431){try{if(_431){console.debug("thisPoint.lat() = "+_431.lat());console.debug("thisPoint.lng() = "+_431.lng());this.map.panTo(new GLatLng(_431.lat(),_431.lng()));setTimeout(dojo.hitch(this,function(){this.map.setZoom(_430);}),1000);console.debug("Had just setCenter to (lat,lng): "+_431.lat()+","+_431.lng());this.lastShownCenter=this.map.getCenter();this.lastShownZoom=this.map.getZoom();this.onCenterDone(true);}else{this.onCenterDone(false);}}catch(err){console.debug("err: "+err.message+", MapWidget.centerMapToThisAddress-error: Could not locate address '"+_42f+"'...not moving map.");}}));return true;}catch(err){console.debug("MapWidget.centerMapToThisAddress-error: "+err.message);return false;}},onLoad:function(){console.debug("MapWidget.onLoad stub");},setZoomLevel:function(_432){this.map.setZoom(_432);},centerAndZoomToFitMarkers:function(){console.debug("About to MapWidget.centerAndZoomToFitMarkers");try{var _433=this.markers;var _434=-300;var _435=300;var _436=-200;var _437=200;var _438=0;var _439=0;var i;for(i in this.markers){var _43b=this.markers[i].getPoint();if(_43b.lng()>_434){_434=_43b.lng();}if(_43b.lng()<_435){_435=_43b.lng();}if(_43b.lat()<_437){_437=_43b.lat();}if(_43b.lat()>_436){_436=_43b.lat();}}_438=(_434+_435)/2;_439=(_436+_437)/2;var _43c=this.map.getBounds();var _43d=_43c.getNorthEast();var _43e=_43c.getSouthWest();var _43f=this.map.getZoom();this.map.panTo(new GLatLng(_439,_438));while((_43f>1)&&((_43d.lng()<_434)||(_43e.lng()>_435)||(_43d.lat()<_436)||(_43e.lat()>_437))){_43f--;this.map.setZoom(_43f);_43c=this.map.getBounds();_43d=_43c.getNorthEast();_43e=_43c.getSouthWest();}this.map.panTo(new GLatLng(_439,_438));}catch(err){console.debug("MapWidget.centerAndZoomToFitMarkers-error: "+err.message);}},clearMarkers:function(){try{var ctr=500;if(this.markers&&this.markers.length>0){while(this.markers.length>0&&ctr>0){this.markers.pop();ctr--;}}if(ctr==0){console.debug("in MapWidget.clearMarkers: Error - saved program from infinite loop");}this.map.clearOverlays();this.markers=new Object();}catch(err){console.debug("MapWidget.clearMarkers-error: "+err.message);}},markerInMap:function(_441){return this.markers["ID~"+_441]?true:false;},hideMarker:function(_442){try{this.markers["ID~"+_442].hide();}catch(err){console.debug("MapWidget.hideMarker-error: "+err.message);}},showMarker:function(_443){try{this.markers["ID~"+_443].show();}catch(err){console.debug("MapWidget.showMarker-error: "+err.message);}},showAllMarkers:function(){try{for(var _444 in this.markers){this.markers[_444].show();}}catch(err){console.debug("MapWidget.showAllMarkers-error: "+err.message);}},removeMarker:function(_445){try{console.debug("About to removeMarker with id: "+_445);var _446=new GMarker(new GLatLng(28.583316,-81.377106),{icon:this.getIcon("avail")});dojo.mixin(_446,this.markers["ID~"+_445]);this.map.removeOverlay(this.markers["ID~"+_445]);this.markers["ID~"+_445]=null;}catch(err){console.debug("MapWidget.removeMarker-error: "+err.message);}},addMarker:function(_447,_448,_449,_44a,_44b,_44c,_44d,_44e){try{console.debug("MapWidget.addMarker, markerId='"+_447+"'");if(_44e!=true){_44e=false;}if(!_44d){_44d="";}if(!this.markers["ID~"+_447]){console.debug("MapWidget.addMarker: latitude="+_448+", longitude="+_449);var _44f=new GMarker(new GLatLng(parseFloat(_448),parseFloat(_449)),{icon:this.getIcon(_44a),draggable:_44e,title:_44d});GEvent.addListener(_44f,"click",dojo.hitch(this,function(){console.debug("MapWidget, click event happened.  About to run this._onMarkerClick");var _450="";for(var _451 in this.markers){if(this.markers[_451]==_44f){_450=_451;}}this._onMarkerClick(_44f,_44b,_450,_44c,_44a);}));this.markers["ID~"+_447]=_44f;console.debug("About to add marker with id: "+"ID~"+_447+" to markers[] array");this.map.addOverlay(_44f);}else{console.debug("MapWidget.addMarker: markerId '"+_447+"' already in this.markers");}}catch(err){console.debug("MapWidget.addMarker-error: "+err.message);}},refreshMarkers:function(_452){try{console.debug("A");if(!_452||_452==null){if(this.map){_452=this.map.getZoom();}else{_452=this.defaultZoomLevel;}}console.debug("B");if(this.map&&this.markers){this.map.clearOverlays();}console.debug("C");var key;for(key in this.markers){console.debug("D1");this.map.addOverlay(this.markers[key]);console.debug("D2");}console.debug("E");}catch(err){console.debug("MapWidget.refreshMarkers-error: "+err.message);}},showMarkersSubset:function(_454){try{var _455=_454.split(",");var _456=new Array();for(var i=0;i<_455.length;i++){var _458=new GMarker(new GLatLng(0,0),{icon:this.getIcon("avail")});dojo.mixin(_458,this.markers["ID~"+_455[i]]);_456.push(_458);}console.debug("MapWidget.showMarkersSubset");if(this.map){this.map.clearOverlays();}var key;for(var i=0;i<_456.length;i++){this.map.addOverlay(_456[i]);}}catch(err){console.debug("MapWidget.showMarkersSubset-error: "+err.message);}},_onMarkerClick:function(_45a,_45b,_45c,_45d,_45e){console.debug("MapWidget._onMarkerClick stub");this.onMarkerClick(_45a,_45b,_45c,_45d,_45e);},onMarkerClick:function(_45f,_460,_461,_462,_463){if(!_462){_45f.openInfoWindowHtml(_460.generateBubbleHtml(_45f),{suppressMapPan:this.suppressMapPan});}else{_45f.openInfoWindow(_460.generateBubble(_45f),{suppressMapPan:this.suppressMapPan});}},onMapZoomEnd:function(){console.debug("MapWidget.onMapZoomEnd");},onMapMoveEnd:function(){console.debug("MapWidget.onMapMoveEnd");},_onMapDragEnd:function(){console.debug("MapWidget._onMapDragEnd");var args=arguments;var _465=this.map.getCenter();var _466=this.map.getZoom();var _467=this.map.getBounds();var _468=_467.getNorthEast();var _469=_467.getSouthWest();var dist;if(this.minMovementThreshold>0){dist=(_468.lng()-_469.lng())/this.minMovementThreshold;}else{dist=(_468.lng()-_469.lng())/2;}console.debug("dist = "+dist);if(Math.sqrt(Math.pow(this.lastShownCenter.lat()-_465.lat(),2)+Math.pow(this.lastShownCenter.lng()-_465.lng(),2))<dist&&(this.lastShownZoom==_466)){console.debug("Movement NOT big enough");this.onMapDragEnd(false,args);}else{console.debug("Movement IS big enough");this.onMapDragEnd(true,args);}this.lastShownCenter=this.map.getCenter();this.lastShownZoom=this.map.getZoom();},onMapDragEnd:function(_46b,args){console.debug("MapWidget.onMapDragEnd("+_46b+",args) stub");},onInfoWindowClose:function(){console.debug("MapWidget.onInfoWindowClose stub");},setZoomLimits:function(minz,maxz){try{G_PHYSICAL_MAP.getMinimumResolution=function(){return minz;};G_NORMAL_MAP.getMinimumResolution=function(){return minz;};G_SATELLITE_MAP.getMinimumResolution=function(){return minz;};G_HYBRID_MAP.getMinimumResolution=function(){return minz;};G_PHYSICAL_MAP.getMaximumResolution=function(){return maxz;};G_NORMAL_MAP.getMaximumResolution=function(){return maxz;};G_SATELLITE_MAP.getMaximumResolution=function(){return maxz;};G_HYBRID_MAP.getMaximumResolution=function(){return maxz;};if(this.getZoom()<minz){this.map.setZoom(minz);}if(this.getZoom()>maxz){this.map.setZoom(maxz);}}catch(err){console.debug("MapWidget.setZoomLimits-error: "+err.message);}},onClick:function(){},startup:function(){this.markers=new Object();this.iconImages=new Array();this.iconWidths=new Array();this.iconHeights=new Array();try{if(GBrowserIsCompatible()){this.map=new GMap2(document.getElementById(this.mapId));if(this.useLargeControl){this.map.addControl(new GLargeMapControl());}else{this.map.addControl(new GSmallMapControl());}this.map.addControl(new GMapTypeControl());GEvent.addListener(this.map.getInfoWindow(),"closeclick",dojo.hitch(this,function(){this.onInfoWindowClose("closeclick");}));GEvent.addListener(this.map,"infowindowclose",dojo.hitch(this,function(){this.onInfoWindowClose("infowindowclose");}));GEvent.addListener(this.map,"click",dojo.hitch(this,function(){this.onClick();}));if(this.useDefaultZoom){this.centerMapToThisPoint(this.defaultLatitude,this.defaultLongitude,this.defaultZoomLevel);}else{this.centerMapToThisPoint(this.defaultLatitude,this.defaultLongitude);}this.lastShownCenter=this.map.getCenter();this.lastShownZoom=this.map.getZoom();this.geocoder=new GClientGeocoder();if(this.enableOverview=="true"||this.enableOverview){this.map.addControl(new GOverviewMapControl());}this.map.enableDoubleClickZoom();GEvent.addListener(this.map,"moveend",dojo.hitch(this,function(){this.onMapMoveEnd(arguments);}));GEvent.addListener(this.map,"dragend",dojo.hitch(this,function(){this._onMapDragEnd(arguments);}));GEvent.addListener(this.map,"zoomend",dojo.hitch(this,function(){this.onMapZoomEnd(arguments);}));this.onLoad();}}catch(err){console.debug("MapWidget.startup-error - "+err.message);}},constructor:function(){console.debug("MapWidget constructor");}});}if(!dojo._hasResource["topaz.widget.SortedListPanel"]){dojo._hasResource["topaz.widget.SortedListPanel"]=true;dojo.provide("topaz.widget.SortedListPanel");dojo.declare("topaz.widget.SortedListPanel",[dijit._Widget,dijit._Templated,dijit._Container],{declaredClass:"SortedListPanel",widgetsInTemplate:true,templateString:"<DIV id=\"${id}\" dojoAttachPoint=\"mainNode\" class=\"SortedListPanel\">\r\n\t<DIV class=\"sortByIcons\"><SPAN class=\"sortByIcons\">Sort by <SPAN dojoAttachPoint=\"sortByIconsNode\"></SPAN></SPAN></DIV>\r\n\t<DIV>\t\t\r\n\t\t<OL id=\"${id}_list\" type=\"1\" dojoAttachPoint=\"listNode\" style=\"min-height: 20px;\">\r\n\t\t</OL>\r\n\t</DIV>\r\n</DIV>\r\n",dojoRoot:dojo.baseUrl,mainNode:null,listNode:null,dndListRef:null,items:[],_tempArray:[],sortKey:"valueIndex",sortDescending:true,id:"",dndMode:false,dndSource:false,dndAccept:"",dndAcceptArr:[],loadedJsonList:null,loadedJsonSortKeys:null,attrKey:"",attrToDisplay:"",sortByIconKeys:[],sortByIndex:-1,getItemCount:function(){var cnt;if(this.items){cnt=this.items.length;}else{cnt=0;}return cnt;},resort:function(){this.onSortByIconClick(this.sortKey);},getItemFromJsonWithKey:function(key){var _471=this.loadedJsonList.items;eval("var found = false;");var i=0;while(!found&&i<_471.length){eval("found = thisArray[i]."+this.attrKey+" == key;");if(!found){i++;}}return _471[i];},setKeyAttribute:function(_473){this.attrKey=_473;},setDisplayAttribute:function(_474){this.attrToDisplay=_474;},clear:function(){var i=0;if(this.listNode){if(this.listNode.childNodes){var _476=this.listNode.childNodes;while(_476.length>0&&i<1000){this.listNode.removeChild(_476[0]);i++;}}}delete this.items;this.items=new Array();return (i<1000);},refresh:function(){},_onListItemClick:function(evt){var _478;if(dojo.isIE||dojo.isOpera){_478=evt.srcElement;}else{_478=evt.originalTarget;}console.debug("Either a list item was clicked or the list itself was clicked. DOM id="+_478.id);var _479=this.id+"";var _47a=_478.id+"";if(_47a.indexOf("dojo")>=0){_47a=_478.childNodes[0].id;}var _47b=dojo.byId(_47a);var _47c=_47a.substring(_479.length+1);if(_47c!="list"&&_47c!=""){this.onListItemClick(_47c,_47b);}},onListItemClick:function(id,_47e){console.debug("SortedListPanel.onListItemClick("+id+") stub");},setSortKey:function(_47f){try{var _480=false;for(var i=0;i<this.sortByIconKeys.length;i++){if(this.sortByIconKeys[i]==_47f){this.sortByIndex=i;this.sortKey=_47f;_480=true;}}if(_480){for(var i=0;i<this.sortByIconKeys.length;i++){dojo.removeClass(dojo.byId(this.id+"_"+this.sortByIconKeys[i]),"noshow");try{dojo.addClass(dojo.byId("selected"+"_"+this.id+"_"+this.sortByIconKeys[i]),"noshow");}catch(err){}}dojo.removeClass(dojo.byId("selected"+"_"+this.id+"_"+this.sortByIconKeys[this.sortByIndex]),"noshow");dojo.addClass(dojo.byId(this.id+"_"+this.sortByIconKeys[this.sortByIndex]),"noshow");}else{console.debug("SortedListPanel.setSortKey: Sort key \""+_47f+"\" not found.");}}catch(err){console.debug("SortedListPanel.setSortKey-error: "+err.message);}},_onSortByIconClick:function(evt){var _483;if(dojo.isIE||dojo.isOpera){_483=evt.srcElement;}else{_483=evt.originalTarget;}for(var i=0;i<this.sortByIconKeys.length;i++){dojo.removeClass(dojo.byId(this.id+"_"+this.sortByIconKeys[i]),"noshow");try{dojo.addClass(dojo.byId("selected"+"_"+this.id+"_"+this.sortByIconKeys[i]),"noshow");}catch(err){}}console.debug("originalTarget.id = "+_483.id);dojo.removeClass(dojo.byId("selected"+"_"+_483.id),"noshow");dojo.addClass(dojo.byId(_483.id),"noshow");console.debug("A sort-by icon was clicked. DOM id="+_483.id);var _485=_483.id+"";var _486=this.id+"";var _487=_485.substring(_486.length+1);for(i=0;i<this.sortByIconKeys.length;i++){if(this.sortByIconKeys[i]==_487){this.sortByIndex=i;}}this.onSortByIconClick(_487);},onSortByIconClick:function(_488){console.debug("SortedListPanel.onSortByIconClick("+_488+") stub");},addSortByIcon:function(_489,_48a,_48b,_48c){try{var _48d=this.sortByIconsNode;var _48e=document.createElement("SPAN");var _48f=document.createElement("IMG");var _490=document.createElement("IMG");_48f.id=this.id+"_"+_489;_48f.src=_48a;_48f.alt=_48b;_490.id="selected"+"_"+this.id+"_"+_489;_490.src=_48c;_490.alt=">"+_48b+"<";dojo.addClass(_490,"noshow");dojo.connect(_48f,"onclick",this,"_onSortByIconClick");_48e.appendChild(_48f);_48e.appendChild(_490);_48d.appendChild(_48e);this.sortByIconKeys.push(_489);}catch(err){console.debug("SortedListPanel.addSortByIcon-error: "+err.message);}},_addToDndList:function(key,_492){try{var _493=document.createElement("LI");var _494=this.listNode;_493.setAttribute("id",this.id+"_"+key);var _495=document.createElement("DIV");_495.setAttribute("id",this.id+"_"+key);if(_492["className"]){dojo.addClass(_495,_492["className"]);}if(this.attrToDisplay!=""){if(_492[this.attrToDisplay]){_495.innerHTML=_492[this.attrToDisplay];_493.appendChild(_495);if(this.dndMode){_493.className="dojoDndItem";this.dndListRef.insertNodes(false,[_493.innerHTML]);dojo.connect(_493,"onclick",this,"_onListItemClick");}else{_494.appendChild(_493);}}else{console.debug("SortedListPanel._addToDndList-B-error: newObj["+this.attrToDisplay+"] is undefined");}}else{console.debug("Failed to add item in SortedListPanel(id="+this.id+"). Attribute to display not set. Use setDisplayAttribute()");}}catch(err){console.debug("SortedListPanel._addToDndList-error: "+err.message);}},addItem:function(key,_497,_498){try{if(this.attrKey!=""){this.items[_497[this.attrKey]]=_497;if(!_498){this._addToDndList(key,_497);}else{this.onItemAddedToArray(key);}}else{console.debug("Failed to add item in SortedListPanel(id="+this.id+"). Attribute for key not set.  Use setKeyAttribute() function");}}catch(err){console.debug("SortedListPanel.addItem-error: "+err.message);}},onItemAddedToArray:function(key){console.debug("SortedListPanel.onItemAddedToArray("+key+") stub");},getListKeysCSV:function(){try{var i=0;var _49b="";var _49c=this.listNode.childNodes;var _49d;var _49e=this.id+"_";for(var i=0;i<_49c.length;i++){_49d=_49c[i].childNodes[0].id+"";_49b+=_49d.substring(_49e.length);if(i<_49c.length-1){_49b+=",";}}return _49b;}catch(err){console.debug("SortedListPanel.getListKeysCSV-error: "+err.message);return "";}},isFoundInList:function(key){var _4a0=this.id+"_"+key;var _4a1=document.getElementById(_4a0);var i=0;var _4a3=false;var _4a4=this.listNode.childNodes;if(this.listNode.childNodes){while(!_4a3&&i<_4a4.length){console.debug("SortedListPanel.isFoundInList: arrLI[i].childNodes[0].id == absKey, "+_4a4[i].childNodes[0].id+" ?= "+_4a0);if(_4a4[i].childNodes[0].id==_4a0){_4a3=true;}else{i++;}}}return i;},findItem:function(key){var _4a6=this.id+"_"+key;var _4a7=document.getElementById(_4a6);var i=0;var _4a9=false;var _4aa=this.listNode.childNodes;if(this.listNode.childNodes){while(!_4a9&&i<_4aa.length){console.debug("SortedListPanel.isFoundInList: arrLI[i].childNodes[0].id == absKey, "+_4aa[i].childNodes[0].id+" ?= "+_4a6);if(_4aa[i].childNodes[0].id==_4a6){_4a9=true;return _4aa[i].childNodes[0];}else{i++;}}}return null;},removeItem:function(key){try{delete this.items[key];var _4ac=this.id+"_"+key;var _4ad=document.getElementById(_4ac);var i=0;var _4af=false;var _4b0=this.listNode.childNodes;if(this.listNode.childNodes){while(!_4af&&i<_4b0.length){console.debug("arrLI[i].childNodes[0].id == absKey, "+_4b0[i].childNodes[0].id+" ?= "+_4ac);if(_4b0[i].childNodes[0].id==_4ac){this.listNode.removeChild(_4b0[i]);_4af=true;this.onItemRemoved(key);}else{i++;}}}return _4af;}catch(err){console.debug("SortedListPanel.removeItem-error: "+err.message);}},onItemRemoved:function(key){console.debug("SortedListPanel.onItemRemoved("+key+") stub");},_sortByKeyAsc:function(a,b){var x=a[this.sortKey];var y=b[this.sortKey];return ((x<y)?-1:((x>y)?1:0));},_sortByKeyDesc:function(a,b){var x,y;if(parseFloat(a[this.sortKey])>0&&parseFloat(b[this.sortKey])>0){x=parseFloat(a[this.sortKey]);y=parseFloat(b[this.sortKey]);}else{x=a[this.sortKey];y=b[this.sortKey];}return ((x<y)?1:((x>y)?-1:0));},_associativeArrayLength:function(_4ba){length=0;for(var _4bb in _4ba){length++;}return length;},sortItems:function(){try{console.debug("SortedListPanel("+this.id+").sortItems");this.sortKey=this.sortByIconKeys[this.sortByIndex];console.debug("SortedListPanel: About to sort list. this.sortKey = "+this.sortKey);var _4bc=this.listNode.childNodes;while(_4bc.length>0){this.listNode.removeChild(_4bc[0]);}this._tempArray=new Array();for(thisItemKey in this.items){this._tempArray.push(this.items[thisItemKey]);}if(this.sortDescending){this._tempArray.sort(dojo.hitch(this,this._sortByKeyDesc));}else{this._tempArray.sort(dojo.hitch(this,this._sortByKeyAsc));}for(var i=0;i<this._tempArray.length;i++){if(this._tempArray[i]){this._addToDndList(this._tempArray[i][this.attrKey],this._tempArray[i]);}}while(this._tempArray.length>0){this._tempArray.pop();}this._tempArray=null;}catch(err){console.debug("SortedListPanel.sortItems-error: "+err.message);}},_onDndDrop:function(_4be,_4bf,copy){try{var _4c1=baHelper.getPrefix(_4be.parent.id,"_");console.debug("SortedListPanel("+this.id+")_onDndDrop, srcWidgetId="+_4c1+", baHelper.getPrefix(this.id,\"_\")="+baHelper.getPrefix(this.id,"_"));if(_4c1==baHelper.getPrefix(this.id,"_")){var _4c2=_4be.getAllNodes();var _4c3=_4be.parent.id+"";var _4c4=_4c3.split("_list");var _4c5=_4c4[0];var _4c6=dijit.byId(_4c5);var _4c7;var _4c8;var _4c6;var key;var _4ca=new Array();console.debug("nodes.length = "+_4bf.length);_4c8=_4c5+"";_4c6=dijit.byId(_4c5);for(var i=0;i<_4bf.length;i++){_4c7=_4bf[i].childNodes[0].id+"";key=_4c7.substring(_4c8.length+1);if(_4c6.items){if(_4c6.items[key]){console.debug("Adding items[key] where key='"+key+"' to droppedItems");_4ca.push(_4c6.items[key]);}}}var _4cc=dojo.dnd.manager().target;this.onDndDrop(_4be,_4cc,_4bf,copy,_4c5,_4ca);}}catch(err){console.debug("SortedListPanel("+this.id+")._onDndDrop-error: "+err.message);}},onDndDrop:function(_4cd,_4ce,_4cf,copy,_4d1,_4d2){console.debug("SortedListPanel.onDndDrop stub. this.id="+this.id+", target.parent.id="+_4ce.parent.id+", sourceWidgetId='"+_4d1+"'");},postCreate:function(){console.debug("SortedListPanel.postCreate");dojo.subscribe("/dnd/drop",this,this._onDndDrop);},_nodeCreator:function(item){try{var node=dojo.doc.createElement("LI");node.id=dojo.dnd.getUniqueId();node.innerHTML=item;return {node:node,data:item,type:this.dndAcceptArr};}catch(err){console.debug("SortedListPanel._nodeCreator-error: "+err.message);}},startup:function(){try{console.debug("SortedListPanel.startup");if(this.dndAccept){this.dndAcceptArr=this.dndAccept.split(",");}this.dndListRef=new dojo.dnd.Source(this.listNode.id,{isSource:this.dndSource,creator:dojo.hitch(this,this._nodeCreator),accept:this.dndAcceptArr});this.dndListRef.copyOnly=false;if(this.listNode==null){this.listNode=dijit.byId(this.id+"_list");console.debug("this.listNode = dijit.byId('"+this.id+"_list');");}else{dojo.connect(this.listNode,"onclick",this,"_onListItemClick");}}catch(err){console.debug("SortedListPanel.startup-error: "+err.message);}},constructor:function(){this.items=new Array();this.dndAcceptArr=new Array();this.sortByIconKeys=new Array();console.debug("SortedListPanel constructor");}});}if(!dojo._hasResource["topaz.data.HotelData"]){dojo._hasResource["topaz.data.HotelData"]=true;dojo.provide("topaz.data.HotelData");dojo.declare("HotelData",null,{siteId:globalSiteId,hNum:"43",hName:"",hCode:"",hotelType:"",address:"",city:"",state:"",zip:"",country:"",longitude:"",latitude:"",childCutoffAge:0,parkingAvail:true,parkingPrice:0,rollawayAvail:false,rollawayPrice:0,cribAvail:false,cribPrice:5,checkInTime:"",checkOutTime:"",cancelPolicy:"",cancelPolicyString:"",extraPersonPrice:0,extraRollawayFormula:"",taxPct:1,acceptedCreditCardsCSV:"",holdPolicy:"N",phoneMain:"",phoneRes800:"",phoneRes:"",phoneResFax:"",freqStayProgramName:"Frequent Stay Program",hotelGeneralDesc:"",amenitiesDesc:"",directionsDesc:"",locationDesc:"",decorstyleDesc:"",roomTypesDesc:"",restaurantDesc:"",reservationNotes:"",packagesDesc:"",numBeds:0,numBaths:0,area:"",maxOccupancy:8,imageURLs:[],dataLoaded:false,dataLoadTimer:null,getHotelId:function(){return this.hNum;},loadHotelInformation:function(){this.loader.ajaxHotelInformationRequest(this.loader.populateHotelData,this);},loadHotelInformationSynchronously:function(){this.loader.synchroHotelInformationRequest(this.loader.populateHotelData,this);},onLoaderSuccess:function(_4d5){},onLoaderFailure:function(_4d6){},onLoaderDone:function(_4d7){if(_4d7){console.debug("HotelData.onLoaderDone -- Hotel Name: "+this.hName);this.onLoaderSuccess(this);}else{console.debug("HotelData: There was an error");this.onLoaderFailure(null);}},constructor:function(hnum){this.hNum=hnum;this.loader=new HotelInfoLoader(this.siteId,this.hNum);this.imageURLs=new Array();}});}if(!dojo._hasResource["topaz.loader.hotelres.MapBubbleLoader"]){dojo._hasResource["topaz.loader.hotelres.MapBubbleLoader"]=true;dojo.provide("topaz.loader.hotelres.MapBubbleLoader");dojo.declare("MapBubbleLoader",null,{runCount:0,availabilityObject:null,hotelData:null,gmarkerObj:null,searchPageReference:null,mapBubbleReady:true,hotelId:"",propertyName:"",imageUrl:"",availText:"",bookable:false,arrivalMonth:"",arrivalDay:"",arrivalYear:"",nightstay:1,valueIndex:0,rateIndex:0,hotelType:"",location:"",address:"",hotelDesc:"*Hotel Description*",trackingCode:"",bookingPagePath:"",onMapBubbleReady:function(self){console.debug("MapBubbleLoader.onMapBubbleReady stub");},_setMembers:function(){},_getDate:function(strM,strD,strY){var _4dd=new Date();var _4de=parseInt(strM,10)-1;var _4df=parseInt(strD,10);var _4e0=parseInt(strY,10);_4dd.setFullYear(_4e0,_4de,_4df);return _4dd;},_getDateStr:function(strM,strD,strY,_4e4){try{if(!_4e4){_4e4="MM/dd/yyyy";}return dojo.date.locale.format(this._getDate(strM,strD,strY),{selector:"date",datePattern:_4e4});}catch(err){console.debug("MapBubbleLoader._getDateStr-error: "+err.message);}},getMMDDYYYY:function(_4e5){try{_4e5+="";if(_4e5.substring(2,3)=="/"){return _4e5;}else{if(_4e5.substring(4,5)=="-"){var mth,dy,yr;mth=parseInt(_4e5.substring(5,7),10);dy=parseInt(_4e5.substring(8,10),10);yr=parseInt(_4e5.substring(0,4),10);return this._getDateStr(mth,dy,yr);}}}catch(err){console.debug("MapBubbleLoader.getMMDDYYYY-error: "+err.message);}},generateBubbleHtml:function(){try{this._setMembers();if(this.mapBubbleReady){var txt="";txt="<div class=\"googleMapBubble\" id=\"MB_"+this.hotelId+"\"> "+"<div class=\"bubblePropertyPhoto\"> "+"<img alt=\"Hotel Photo\" width=\"100\" height=\"100\" class=\"propertyPhoto\" src=\""+this.imageUrl+"\">"+"</div> "+"<div class=\"bubblePropertyName\"> "+"<span class=\"name\">"+this.propertyName+"</span> "+"<span class=\"address\">"+this.address+"</span> "+"<span class=\"location\">("+this.location+")</span>"+"</div> "+"<div class=\"bubbleIndices\">"+"<a href=\"http://www.hotelres.com/valueindex.php\" target=\"_blank\">Value Index</a>: <img src=\"http://www.hotelres.com/images/sc_"+this.valueIndex.toFixed(1)+".gif\">"+"<br><br>"+"Price: <br><img src=\"http://www.hotelres.com/images/rate_"+this.rateIndex.toFixed(1)+"_range.gif\">"+"</div>"+"<div class=\"bubbleAvailabilitySection\"> ";if(this.bookable){txt+="<span class=\"availabilityText\"> ";}else{txt+="<span class=\"availabilityText\" style=\"color: red;\"> ";}txt+=this.availText+"</span>"+"<br>";txt+="<a target=\"_blank\" href=\"http://www.hotelres.com/hoteltop.php?siteid=47&hnum="+this.hotelId+"&month="+this.arrivalMonth+"&day="+this.arrivalDay+"&year="+this.arrivalYear+"&nightstay="+this.nightstay+"&trk="+this.trackingCode+"\"><img border=\"0\" src=\"images/select.gif\" alt=\"Select\"></a>";txt+="</div> ";txt+="</div> ";return txt;}else{alert("Map bubble not ready");}}catch(err){console.debug("MapBubbleLoader.generateBubbleHtml-error: "+err.message);}},setAvailObj:function(_4ea){this.availabilityObject=_4ea;this.onAvailObjSet();},onAvailObjSet:function(){},setHotelData:function(_4eb){this.hotelData=_4eb;},setHotelId:function(hnum){this.hotelId=hnum;},constructor:function(_4ed,_4ee){console.debug("MapBubbleLoader constructor");try{this.hotelData=_4ee;this.availabilityObject=_4ed;this._setMembers();}catch(err){console.debug("MapBubbleLoader constructor error: "+err.message);}}});}if(!dojo._hasResource["dojox.collections._base"]){dojo._hasResource["dojox.collections._base"]=true;dojo.provide("dojox.collections._base");dojox.collections.DictionaryEntry=function(k,v){this.key=k;this.value=v;this.valueOf=function(){return this.value;};this.toString=function(){return String(this.value);};};dojox.collections.Iterator=function(arr){var a=arr;var _4f3=0;this.element=a[_4f3]||null;this.atEnd=function(){return (_4f3>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_4f3++];return this.element;};this.map=function(fn,_4f5){return dojo.map(a,fn,_4f5);};this.reset=function(){_4f3=0;this.element=a[_4f3];};};dojox.collections.DictionaryIterator=function(obj){var a=[];var _4f8={};for(var p in obj){if(!_4f8[p]){a.push(obj[p]);}}var _4fa=0;this.element=a[_4fa]||null;this.atEnd=function(){return (_4fa>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_4fa++];return this.element;};this.map=function(fn,_4fc){return dojo.map(a,fn,_4fc);};this.reset=function(){_4fa=0;this.element=a[_4fa];};};}if(!dojo._hasResource["dojox.collections.ArrayList"]){dojo._hasResource["dojox.collections.ArrayList"]=true;dojo.provide("dojox.collections.ArrayList");dojox.collections.ArrayList=function(arr){var _4fe=[];if(arr){_4fe=_4fe.concat(arr);}this.count=_4fe.length;this.add=function(obj){_4fe.push(obj);this.count=_4fe.length;};this.addRange=function(a){if(a.getIterator){var e=a.getIterator();while(!e.atEnd()){this.add(e.get());}this.count=_4fe.length;}else{for(var i=0;i<a.length;i++){_4fe.push(a[i]);}this.count=_4fe.length;}};this.clear=function(){_4fe.splice(0,_4fe.length);this.count=0;};this.clone=function(){return new dojox.collections.ArrayList(_4fe);};this.contains=function(obj){for(var i=0;i<_4fe.length;i++){if(_4fe[i]==obj){return true;}}return false;};this.forEach=function(fn,_506){dojo.forEach(_4fe,fn,_506);};this.getIterator=function(){return new dojox.collections.Iterator(_4fe);};this.indexOf=function(obj){for(var i=0;i<_4fe.length;i++){if(_4fe[i]==obj){return i;}}return -1;};this.insert=function(i,obj){_4fe.splice(i,0,obj);this.count=_4fe.length;};this.item=function(i){return _4fe[i];};this.remove=function(obj){var i=this.indexOf(obj);if(i>=0){_4fe.splice(i,1);}this.count=_4fe.length;};this.removeAt=function(i){_4fe.splice(i,1);this.count=_4fe.length;};this.reverse=function(){_4fe.reverse();};this.sort=function(fn){if(fn){_4fe.sort(fn);}else{_4fe.sort();}};this.setByIndex=function(i,obj){_4fe[i]=obj;this.count=_4fe.length;};this.toArray=function(){return [].concat(_4fe);};this.toString=function(_512){return _4fe.join((_512||","));};};}if(!dojo._hasResource["topaz.data.Availability"]){dojo._hasResource["topaz.data.Availability"]=true;dojo.provide("topaz.data.Availability");dojo.declare("Availability",null,{vacancyString:"",comment:"",vacancy:false,tooLateToBook:false,minRestriction:"",numberAvailable:0,rateString:"",rates:null,hotelid:0,arrDate:"",depDate:"",numDays:0,roomType:"",roomIdFull:"",ratePlan:"",promoCode:"",duration:"P1DT0H0M0S",getHotelId:function(){return this.hotelid;},getDurationString:function(){var _513;switch(this.duration){case "P1DT0H0M0S":_513="/night";break;case "P7DT0H0M0S":_513="/week";break;case "P28DT0H0M0S":case "P29DT0H0M0S":case "P30DT0H0M0S":case "P31DT0H0M0S":_513="/month";break;}return _513;},setRate:function(_514,_515){this.rates.insert(_514,_515);},getRate:function(_516){return this.rates.item(_516);},getRateForDate:function(_517){},getRatesCSV:function(){var _518="";try{this.rates.remove("false");this.rates.remove(false);var _519=this.rates.toArray();for(var i=0;i<_519.length;i++){_518+=_519[i];if(i<_519.length-1){_518+=",";}}}catch(err){console.debug("Availability.getRatesCSV-error: "+err.message);}return _518;},getRatesAverage:function(){try{var _51b=this.rates.toArray();return baHelper.getArrayAverage(_51b);}catch(err){console.debug("Availability.getRatesAverage-error: "+err.message);}},echo:function(){var _51c=this.getRatesAverage();console.debug("Availability OBJECT: "+"\r"+"vacancyString: "+this.vacancyString+"\r"+"comment: "+this.comment+"\r"+"vacancy: "+this.vacancy+"\r"+"tooLateToBook: "+this.tooLateToBook+"\r"+"minRestriction: "+this.minRestriction+"\r"+"numberAvailable: "+this.numberAvailable+"\r"+"rateString: "+this.rateString+"\r"+"rates: "+(this.rates==null?"null":"NOT null")+"\r"+"(rateCSV): "+this.getRatesCSV()+"\r"+"rate average: "+_51c+"/night\r"+"hotelid: "+this.hotelid+"\r"+"arrDate: "+this.arrDate+"\r"+"depDate: "+this.depDate+"\r"+"numDays: "+this.numDays+"\r"+"roomType: "+this.roomType+"\r"+"ratePlan: "+this.ratePlan+"\r"+"promoCode: "+this.promoCode);},constructor:function(_51d,_51e,_51f,_520,_521,_522){this.hotelid=_51d;this.arrDate=_51e;this.depDate=_51f;this.roomType=_520;this.ratePlan=_521;this.promoCode=_522;this.rates=new dojox.collections.ArrayList();}});}if(!dojo._hasResource["topaz.loader.bookability.AvailabilityLoader"]){dojo._hasResource["topaz.loader.bookability.AvailabilityLoader"]=true;dojo.provide("topaz.loader.bookability.AvailabilityLoader");dojo.declare("AvailabilityLoader",null,{arrDate:"",depDate:"",nightstay:1,siteId:"",hotelId:"",roomId:"",promoCode:"",domainName:hostname,returnHotelAvailabilityData:function(_523){return _523;},returnRoomAvailabilityData:function(_524){console.debug("returnRoomAvailabilityData stub");console.debug("stub: availObject.vacancyString = "+availObject.vacancyString);console.debug("stub: availObject rates average = "+baHelper.getArrayAverage(availObject.rates.toArray()));return _524;},setAttributes:function(_525,_526,_527,_528,_529,_52a){this.hotelId=_525;this.nightstay=_527;this.arrDate=_526;this.depDate=_528;this.roomId=_529;this.promoCode=_52a;},ajaxHotelAvailabilityRequest:function(_52b){var args=arguments;var _52d=dojo.xhrPost({url:urlProtocol+this.domainName+"/b07/criteriaoutput.php?siteid="+this.siteId+"&xml=<availabilityquery showall=\"true\"><arrivedate>"+this.arrDate+"</arrivedate><departdate>"+this.depDate+"</departdate><nights>"+this.nightstay+"</nights></availabilityquery>",contentType:"text/xml",handleAs:"xml",timeout:40000,load:dojo.hitch(this,function(_52e,_52f){try{var _530=[_52e,_52f];for(var i=1;i<args.length;i++){_530.push(args[i]);}_52b.apply(this,_530);}catch(err){console.debug("AvailabilityLoader.ajaxHotelAvailabilityRequest-callback-error: "+err.message);}})});},ajaxRoomAvailabilityRequest:function(_532){var args=arguments;var _534=dojo.xhrPost({url:urlProtocol+this.domainName+"/b07/hoteltop.php?siteid="+this.siteId+"&xml=<roomavailabilityquery showall=\"true\"><hotelid>"+escape(this.hotelId)+"</hotelid><arrivedate>"+this.arrDate+"</arrivedate><nights>"+this.nightstay+"</nights><departdate>"+this.depDate+"</departdate><promocode>"+this.promoCode+"</promocode></roomavailabilityquery>",contentType:"text/xml",handleAs:"xml",timeout:40000,load:dojo.hitch(this,function(_535,_536){try{var _537=[_535,_536];for(var i=1;i<args.length;i++){_537.push(args[i]);}_532.apply(this,_537);}catch(err){console.debug("AvailabilityLoader.ajaxRoomAvailabilityRequest-callback-error: "+err.message);}})});},setHotelAvailObj:function(_539,_53a,_53b,_53c,_53d,_53e,_53f){var _540;var _541;console.debug(_539.xml);var root=_539.getElementsByTagName("availabilityqueryresult")[0];_540=root.getElementsByTagName("hotel");for(var i=0;i<_540.length;i++){var _544=baHelper.getValuefromXML(_540[i],0,"hotelid");var _545=_544+"~"+_53c.promoCode+"~"+_53c.arrDate+"~"+_53c.depDate;try{_541=new Availability(_544,_53c.arrDate,_53c.depDate,"","","");_541.vacancy="true"==baHelper.getValuefromXML(_540[i],0,"vacancy");_541.vacancyString=baHelper.getValuefromXML(_540[i],0,"availablestring");_541.tooLateToBook="true"==baHelper.getValuefromXML(_540[i],0,"aftercutoff");_541.comment="Test comment "+i;if(_541.vacancyString&&_541.vacancyString!="false"&&_541.vacancyString!=""){console.debug("tempAvailObj.vacancyString = '"+_541.vacancyString+"' so setting TIMESTAMP for HOTEL");_541.echo();_53c.setTimestamp("HOTEL",_545);_53c.hotelAvailMatrix[_545]=_541;}if(_53d==unescape(_540[i].getElementsByTagName("hotelid")[0].firstChild.nodeValue)){_53b=_541;this.returnHotelAvailabilityData=dojo.hitch(_53e,_53f);this.returnHotelAvailabilityData(_53b);}}catch(err){console.debug("B-setHotelAvailObj-error: "+err.message);}}},setRoomAvailObj:function(_546,_547,_548,_549,_54a,_54b,_54c,_54d){try{var _54e=false;var root=_546.getElementsByTagName("roomavailabilityresult")[0];var _550=root.getElementsByTagName("discount");var _551=baHelper.getValuefromXML(root,0,"hotelid");var _552=baHelper.getValuefromXML(root,0,"promocode");if(!_552){_552="";}var i,j;var _555=0;for(i=0;i<_550.length;i++){var _556=_550[i].getElementsByTagName("room")[0];var _557=baHelper.getValuefromXML(_556,0,"roomid");var _558=_557.split(":");var _559=_558[0];var _55a="";if(_558.length>1){_55a=_558[1];}if(_54b==_55a){_555=i;}}var _55b=_550[_555].getElementsByTagName("room");for(j=0;j<_55b.length;j++){var _557=baHelper.getValuefromXML(_55b[j],0,"roomid");var _558=_557.split(":");var _559=_558[0];var _55a="";if(_558.length>1){_55a=_558[1];}var _55c=_551+"~"+_552+"~"+_559+"~"+_55a+"~"+_549.arrDate+"~"+_549.depDate;try{tempAvailObj=new Availability(_551,_549.arrDate,_549.depDate,_559,_55a,_552);tempAvailObj.vacancy="true"==baHelper.getValuefromXML(_55b[j],0,"vacancy");tempAvailObj.vacancyString=baHelper.getValuefromXML(_55b[j],0,"comment");tempAvailObj.comment=baHelper.getValuefromXML(_55b[j],0,"comment");if((tempAvailObj.comment+"")=="Call Us"){tempAvailObj.tooLateToBook=true;}else{tempAvailObj.tooLateToBook=false;}var _55d=tempAvailObj.comment+"";if(_55d.indexOf("Minimum")>0){tempAvailObj.minRestriction=_55d;}tempAvailObj.numberAvailable=baHelper.getValuefromXML(_55b[j],0,"roomsavailable");tempAvailObj.roomIdFull=_557;var _55e=""+baHelper.getValuefromXML(_55b[j],0,"rate");var _55f=_55e.split(",",31);for(var k=0;k<_55f.length;k++){tempAvailObj.rates.insert(k,_55f[k]);}if(tempAvailObj.vacancyString&&tempAvailObj.vacancyString!="false"&&tempAvailObj.vacancyString!=""){tempAvailObj.rates.remove("false");tempAvailObj.rates.remove(false);console.debug("tempAvailObj.vacancyString = '"+tempAvailObj.vacancyString+"' so setting TIMESTAMP for ROOM");_549.setTimestamp("ROOM",_55c);_549.roomAvailMatrix[_55c]=tempAvailObj;_549.roomAvailMatrix[_55c].rates.remove("false");_549.roomAvailMatrix[_55c].rates.remove(false);}if(_54a==_559&&_54b==_55a){_54e=true;if(!_548){console.debug("availObject was null. instantiated new Avail. object");_548=new Availability();}dojo.mixin(_548,tempAvailObj);console.debug("availObject.vacancyString = "+_548.vacancyString);console.debug("availObject.numberAvailable = "+_548.numberAvailable);console.debug("availObject rates average = "+baHelper.getArrayAverage(_548.rates.toArray()));this.returnRoomAvailabilityData=dojo.hitch(_54c,_54d);this.returnRoomAvailabilityData(_548);}}catch(err){console.debug("B-setRoomAvailObj-error: "+err.message);}}if(_54e&&_548!=null){var _55b=_546.getElementsByTagName("room");var _55e=""+baHelper.getValuefromXML(_55b,0,"rate");var _55f=_55e.split(",",15);for(var i=0;i<_55f.length;i++){_548.rates.insert(i,_55f[i]);}}else{_549.baObjReference.onRoomNotAvailableForPackage(_54a);}}catch(err){console.debug("setRoomAvailObj-error: "+err.message);}},constructor:function(_561){this.siteId=_561;}});}if(!dojo._hasResource["topaz.control.AvailabilityController"]){dojo._hasResource["topaz.control.AvailabilityController"]=true;dojo.provide("topaz.control.AvailabilityController");dojo.declare("AvailabilityController",null,{loader:null,domainName:hostname,arrDate:null,depDate:null,nightstay:1,siteId:0,hotelId:0,roomType:0,ratePlan:"",promoCode:"",secondsToExpiration:900,hotelAvailMatrix:[],hotelAvailMatrixTimestamp:[],roomAvailMatrix:[],roomAvailMatrixTimestamp:[],baObjReference:null,returnHotelAvailabilityData:null,returnRoomAvailabilityData:null,setBookabilityReference:function(_562){this.baObjReference=_562;},setBookingPageReference:function(_563){this.baObjReference=_563;},setTimestamp:function(_564,_565){var Now=new Date();var _567=Now.getTime();switch(_564){case "HOTEL":this.hotelAvailMatrixTimestamp[_565]=_567;break;case "ROOM":this.roomAvailMatrixTimestamp[_565]=_567;break;}},availabilityExpired:function(_568,_569){var Now=new Date();var _56b=Now.getTime();var _56c;switch(_568){case "HOTEL":_56c=this.hotelAvailMatrixTimestamp[_569];break;case "ROOM":_56c=this.roomAvailMatrixTimestamp[_569];break;}if(!_56c||_56c==undefined){_56c=0;}if(!_56c||_56b-_56c>(this.secondsToExpiration*1000)){switch(_568){case "HOTEL":this.hotelAvailMatrixTimestamp[_569]=_56b;break;case "ROOM":this.roomAvailMatrixTimestamp[_569]=_56b;break;}return true;}else{return false;}},returnHotelAvailabilityData:function(_56d){return _56d;},returnRoomAvailabilityData:function(_56e){return _56e;},forceExpireAvail:function(_56f,_570,_571,_572,_573,_574,_575,_576){try{switch(_56f){case "HOTEL":var _577=_570+"~"+_576+"~"+_571+"~"+_572;this.hotelAvailMatrix[_577]=null;this.hotelAvailMatrixTimestamp[_577]=0;console.debug("Force-expired HOTEL: matrixKey =  "+_577);break;case "ROOM":var _577=_570+"~"+_576+"~"+_574+"~"+_575+"~"+_571+"~"+_572;this.roomAvailMatrix[_577]=null;this.roomAvailMatrixTimestamp[_577]=0;console.debug("Force-expired ROOM: matrixKey =  "+_577);break;}}catch(err){console.debug("AvailabilityController.forceExpireAvail-error: "+err.message);}},getAvailability:function(_578,_579,_57a,_57b,_57c,_57d,_57e,_57f,_580,_581,_582){try{this.arrDate=_57a;this.depDate=_57b;this.hotelId=_579;this.nightstay=_57c;this.promoCode=_57f;var _583=new Availability();var _584;console.debug("About to getAvailability for context="+_578);switch(_578){case "HOTEL":_584=_579+"~"+_57f+"~"+_57a+"~"+_57b;console.debug("Getting availability for HOTEL: matrixKey =  "+_584);testCtr++;if((_582!=undefined&&_582)||this.availabilityExpired(_578,_584)){console.debug("Hotel ("+_579+") Availability expired or null..making ajax call");this.loader.setAttributes(_579,_57a,_57c,_57b,_57d,_57f);this.loader.ajaxHotelAvailabilityRequest(this.loader.setHotelAvailObj,_583,this,_579,_580,_581);}else{console.debug("Hotel ("+_579+") Availability neither expired nor null");dojo.mixin(_583,this.hotelAvailMatrix[_584]);this.returnHotelAvailabilityData=dojo.hitch(_580,_581);this.returnHotelAvailabilityData(_583);}break;case "ROOM":_584=_579+"~"+_57f+"~"+_57d+"~"+_57e+"~"+_57a+"~"+_57b;if(_582||this.availabilityExpired(_578,_584)){this.loader.returnRoomAvailabilityData=dojo.hitch(_580,_581);this.loader.setAttributes(_579,_57a,_57c,_57b,_57d,_57f);this.loader.ajaxRoomAvailabilityRequest(this.loader.setRoomAvailObj,_583,this,_57d,_57e,_580,_581);}else{dojo.mixin(_583,this.roomAvailMatrix[_584]);this.returnRoomAvailabilityData=dojo.hitch(_580,_581);this.returnRoomAvailabilityData(_583);}break;}}catch(err){console.debug("getAvailability-error: "+err.message);}},isHotelBookable:function(_585){try{var _586=false;if(!_585.tooLateToBook&&(_585.minRestriction=="")&&_585.vacancy){_586=true;}return _586;}catch(err){alert("AvailabilityController.isHotelBookable-error: "+err.message);}},getHotelAvailabilityString:function(_587){try{if(_587.tooLateToBook){tempStr="<span class=\"notAvailable\">Too late to book online. Call us.</span>";}else{if(_587.minRestriction!=""){tempStr="<span class=\"notAvailable\">"+_587.minRestriction+"</span>";}else{if(_587.vacancy){tempStr="<span class=\"available\">"+_587.vacancyString+"</span>";}else{tempStr="<span class=\"notAvailable\">"+_587.vacancyString+"</span>";}}}return tempStr;}catch(err){alert("AvailabilityController.getHotelAvailabilityString-error: "+err.message);}},isRoomBookable:function(_588){try{var _589=_588.comment+"";if(_588.tooLateToBook&&_588.tooLateToBook!="false"){return false;}if(_588.minRestriction!=""){return false;}if(!_588.vacancy){return false;}if(_589=="Call Us"){return false;}if(_589=="No Vacancy"||_589=="Not Available"){return false;}if(_589.indexOf("Minimum")>=0){return false;}return true;}catch(err){console.debug("AvailabilityController.isRoomBookable-error:"+err.message);}},getRoomAvailabilityString:function(_58a){try{var _58b="";var _58c=_58a.comment+"";if(_58a.tooLateToBook&&_58a.tooLateToBook!="false"){_58b="<span class=\"notAvailable\">Cannot book online. Please call us.</span>";}else{if(_58a.minRestriction!=""){_58b="<span class=\"notAvailable\">"+_58a.minRestriction+"<br>"+_58a.comment+"</span>";}else{if(_58c=="Call Us"){_58b="<span class=\"notAvailable\">"+_58c+"</span>";}else{if(_58c=="No Vacancy"||_58c=="Not Available"){_58b="<span class=\"notAvailable\">"+_58c+"</span>";}else{if(_58c.indexOf("Minimum")>=0){_58b="<span class=\"notAvailable\">"+_58c+"</span>";}else{_58b="<span class=\"available\">"+_58a.vacancyString+"</span>";}}}}}return _58b;}catch(err){console.debug("AvailabilityController.getRoomAvailabilityString-error:"+err.message);}},constructor:function(site){this.siteId=site;this.loader=new AvailabilityLoader(site);this.hotelAvailMatrix=new Array();this.hotelAvailMatrixTimestamp=new Array();this.roomAvailMatrix=new Array();this.roomAvailMatrixTimestamp=new Array();}});}if(!dojo._hasResource["topaz.loader.hotelres.AvailabilityLoader"]){dojo._hasResource["topaz.loader.hotelres.AvailabilityLoader"]=true;dojo.provide("topaz.loader.hotelres.AvailabilityLoader");dojo.declare("AvailabilityLoader",null,{arrDate:"",depDate:"",nightstay:1,siteId:"",hotelId:"",roomId:"",promoCode:"",domainName:hostname,returnHotelAvailabilityData:function(_58e){return _58e;},returnRoomAvailabilityData:function(_58f){console.debug("returnRoomAvailabilityData stub");console.debug("stub: availObject.vacancyString = "+availObject.vacancyString);console.debug("stub: availObject rates average = "+baHelper.getArrayAverage(availObject.rates.toArray()));return _58f;},setAttributes:function(_590,_591,_592,_593,_594,_595){this.hotelId=_590;this.nightstay=_592;this.arrDate=_591;this.depDate=_593;this.roomId=_594;this.promoCode=_595;},ajaxHotelAvailabilityRequest:function(_596){var args=arguments;var _598=urlProtocol+this.domainName+"/b07/criteriaoutput.php?siteid="+this.siteId+"&xml=<availabilityquery showall=\"true\"><arrivedate>"+this.arrDate+"</arrivedate><departdate>"+this.depDate+"</departdate><nights>"+this.nightstay+"</nights></availabilityquery>";var _599=dojo.xhrPost({url:_598,contentType:"text/xml",handleAs:"xml",timeout:40000,load:dojo.hitch(this,function(_59a,_59b){try{var _59c=[_59a,_59b];for(var i=1;i<args.length;i++){_59c.push(args[i]);}_596.apply(this,_59c);}catch(err){console.debug("AvailabilityLoader.ajaxHotelAvailabilityRequest-callback-error: "+err.message);}})});},ajaxRoomAvailabilityRequest:function(_59e){var args=arguments;var _5a0=dojo.xhrPost({url:urlProtocol+this.domainName+"/b07/hoteltop.php?siteid="+this.siteId+"&xml=<roomavailabilityquery showall=\"true\"><hotelid>"+escape(this.hotelId)+"</hotelid><arrivedate>"+this.arrDate+"</arrivedate><nights>"+this.nightstay+"</nights><departdate>"+this.depDate+"</departdate><promocode>"+this.promoCode+"</promocode></roomavailabilityquery>",contentType:"text/xml",handleAs:"xml",timeout:40000,load:dojo.hitch(this,function(_5a1,_5a2){try{var _5a3=[_5a1,_5a2];for(var i=1;i<args.length;i++){_5a3.push(args[i]);}_59e.apply(this,_5a3);}catch(err){console.debug("AvailabilityLoader.ajaxRoomAvailabilityRequest-callback-error: "+err.message);}})});},setHotelAvailObj:function(_5a5,_5a6,_5a7,_5a8,_5a9,_5aa,_5ab){var _5ac;var _5ad;console.debug(_5a5.xml);var root=_5a5.getElementsByTagName("availabilityqueryresult")[0];_5ac=root.getElementsByTagName("hotel");for(var i=0;i<_5ac.length;i++){var _5b0=baHelper.getValuefromXML(_5ac[i],0,"hotelid");var _5b1=_5b0+"~"+_5a8.promoCode+"~"+_5a8.arrDate+"~"+_5a8.depDate;try{_5ad=new Availability(_5b0,_5a8.arrDate,_5a8.depDate,"","","");_5ad.vacancy="true"==baHelper.getValuefromXML(_5ac[i],0,"vacancy");_5ad.vacancyString=baHelper.getValuefromXML(_5ac[i],0,"availablestring");_5ad.tooLateToBook="true"==baHelper.getValuefromXML(_5ac[i],0,"aftercutoff");_5ad.comment="Test comment "+i;if(_5ad.vacancyString&&_5ad.vacancyString!="false"&&_5ad.vacancyString!=""){console.debug("tempAvailObj.vacancyString = '"+_5ad.vacancyString+"' so setting TIMESTAMP for HOTEL");_5ad.echo();_5a8.setTimestamp("HOTEL",_5b1);_5a8.hotelAvailMatrix[_5b1]=_5ad;}if(_5a9==unescape(_5ac[i].getElementsByTagName("hotelid")[0].firstChild.nodeValue)){_5a7=_5ad;this.returnHotelAvailabilityData=dojo.hitch(_5aa,_5ab);this.returnHotelAvailabilityData(_5a7);}}catch(err){console.debug("B-setHotelAvailObj-error: "+err.message);}}},setRoomAvailObj:function(_5b2,_5b3,_5b4,_5b5,_5b6,_5b7,_5b8,_5b9){try{var _5ba=false;var root=_5b2.getElementsByTagName("roomavailabilityresult")[0];var _5bc=root.getElementsByTagName("discount");var _5bd=baHelper.getValuefromXML(root,0,"hotelid");var _5be=baHelper.getValuefromXML(root,0,"promocode");if(!_5be){_5be="";}var i,j;var _5c1=0;for(i=0;i<_5bc.length;i++){var _5c2=_5bc[i].getElementsByTagName("room")[0];var _5c3=baHelper.getValuefromXML(_5c2,0,"roomid");var _5c4=_5c3.split(":");var _5c5=_5c4[0];var _5c6="";if(_5c4.length>1){_5c6=_5c4[1];}if(_5b7==_5c6){_5c1=i;}}var _5c7=_5bc[_5c1].getElementsByTagName("room");for(j=0;j<_5c7.length;j++){var _5c3=baHelper.getValuefromXML(_5c7[j],0,"roomid");var _5c4=_5c3.split(":");var _5c5=_5c4[0];var _5c6="";if(_5c4.length>1){_5c6=_5c4[1];}var _5c8=_5bd+"~"+_5be+"~"+_5c5+"~"+_5c6+"~"+_5b5.arrDate+"~"+_5b5.depDate;try{tempAvailObj=new Availability(_5bd,_5b5.arrDate,_5b5.depDate,_5c5,_5c6,_5be);tempAvailObj.vacancy="true"==baHelper.getValuefromXML(_5c7[j],0,"vacancy");tempAvailObj.vacancyString=baHelper.getValuefromXML(_5c7[j],0,"comment");tempAvailObj.comment=baHelper.getValuefromXML(_5c7[j],0,"comment");if((tempAvailObj.comment+"")=="Call Us"){tempAvailObj.tooLateToBook=true;}else{tempAvailObj.tooLateToBook=false;}var _5c9=tempAvailObj.comment+"";if(_5c9.indexOf("Minimum")>0){tempAvailObj.minRestriction=_5c9;}tempAvailObj.numberAvailable=baHelper.getValuefromXML(_5c7[j],0,"roomsavailable");tempAvailObj.roomIdFull=_5c3;var _5ca=""+baHelper.getValuefromXML(_5c7[j],0,"rate");var _5cb=_5ca.split(",",31);for(var k=0;k<_5cb.length;k++){tempAvailObj.rates.insert(k,_5cb[k]);}if(tempAvailObj.vacancyString&&tempAvailObj.vacancyString!="false"&&tempAvailObj.vacancyString!=""){tempAvailObj.rates.remove("false");tempAvailObj.rates.remove(false);console.debug("tempAvailObj.vacancyString = '"+tempAvailObj.vacancyString+"' so setting TIMESTAMP for ROOM");_5b5.setTimestamp("ROOM",_5c8);_5b5.roomAvailMatrix[_5c8]=tempAvailObj;_5b5.roomAvailMatrix[_5c8].rates.remove("false");_5b5.roomAvailMatrix[_5c8].rates.remove(false);}if(_5b6==_5c5&&_5b7==_5c6){_5ba=true;if(!_5b4){console.debug("availObject was null. instantiated new Avail. object");_5b4=new Availability();}dojo.mixin(_5b4,tempAvailObj);console.debug("availObject.vacancyString = "+_5b4.vacancyString);console.debug("availObject.numberAvailable = "+_5b4.numberAvailable);console.debug("availObject rates average = "+baHelper.getArrayAverage(_5b4.rates.toArray()));this.returnRoomAvailabilityData=dojo.hitch(_5b8,_5b9);this.returnRoomAvailabilityData(_5b4);}}catch(err){console.debug("B-setRoomAvailObj-error: "+err.message);}}if(_5ba&&_5b4!=null){var _5c7=_5b2.getElementsByTagName("room");var _5ca=""+baHelper.getValuefromXML(_5c7,0,"rate");var _5cb=_5ca.split(",",15);for(var i=0;i<_5cb.length;i++){_5b4.rates.insert(i,_5cb[i]);}}else{_5b5.baObjReference.onRoomNotAvailableForPackage(_5b6);}}catch(err){console.debug("setRoomAvailObj-error: "+err.message);}},constructor:function(_5cd){this.siteId=_5cd;}});}dojo.i18n._preloadLocalizations("dojo.nls.topaz_hotelres",["es-es","es","hu","it-it","de","pt-br","pl","fr-fr","zh-cn","pt","en-us","zh","ru","xx","fr","zh-tw","it","cs","en-gb","de-de","ja-jp","ko-kr","ko","en","ROOT","ja"]);

