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

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

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1=dojo.doc;if(_1.selection){var s=_1.selection;if(s.type=="Text"){return !s.createRange().htmlText.length;}else{return !s.createRange().length;}}else{var _3=dojo.global;var _4=_3.getSelection();if(dojo.isString(_4)){return !_4;}else{return _4.isCollapsed||!_4.toString();}}},getBookmark:function(){var _5,_6=dojo.doc.selection;if(_6){var _7=_6.createRange();if(_6.type.toUpperCase()=="CONTROL"){if(_7.length){_5=[];var i=0,_9=_7.length;while(i<_9){_5.push(_7.item(i++));}}else{_5=null;}}else{_5=_7.getBookmark();}}else{if(window.getSelection){_6=dojo.global.getSelection();if(_6){_7=_6.getRangeAt(0);_5=_7.cloneRange();}}else{console.warn("No idea how to store the current selection for this browser!");}}return _5;},moveToBookmark:function(_a){var _b=dojo.doc;if(_b.selection){var _c;if(dojo.isArray(_a)){_c=_b.body.createControlRange();dojo.forEach(_a,function(n){_c.addElement(n);});}else{_c=_b.selection.createRange();_c.moveToBookmark(_a);}_c.select();}else{var _e=dojo.global.getSelection&&dojo.global.getSelection();if(_e&&_e.removeAllRanges){_e.removeAllRanges();_e.addRange(_a);}else{console.warn("No idea how to restore selection for this browser!");}}},getFocus:function(_f,_10){return {node:_f&&dojo.isDescendant(dijit._curFocus,_f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_10||dojo.global,dijit.getBookmark):null,openedForWindow:_10};},focus:function(_11){if(!_11){return;}var _12="node" in _11?_11.node:_11,_13=_11.bookmark,_14=_11.openedForWindow;if(_12){var _15=(_12.tagName.toLowerCase()=="iframe")?_12.contentWindow:_12;if(_15&&_15.focus){try{_15.focus();}catch(e){}}dijit._onFocusNode(_12);}if(_13&&dojo.withGlobal(_14||dojo.global,dijit.isCollapsed)){if(_14){_14.focus();}try{dojo.withGlobal(_14||dojo.global,dijit.moveToBookmark,null,[_13]);}catch(e){}}},_activeStack:[],registerWin:function(_16){if(!_16){_16=window;}dojo.connect(_16.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var doc=_16.document;if(doc){if(dojo.isIE){doc.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(evt.srcElement);}});doc.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(evt.srcElement);});}else{doc.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);doc.addEventListener("blur",function(evt){dijit._onBlurNode(evt.target);},true);}}doc=null;},_onBlurNode:function(_1d){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(_1e){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _1f=[];try{while(_1e){if(_1e.dijitPopupParent){_1e=dijit.byId(_1e.dijitPopupParent).domNode;}else{if(_1e.tagName&&_1e.tagName.toLowerCase()=="body"){if(_1e===dojo.body()){break;}_1e=dijit.getDocumentWindow(_1e.ownerDocument).frameElement;}else{var id=_1e.getAttribute&&_1e.getAttribute("widgetId");if(id){_1f.unshift(id);}_1e=_1e.parentNode;}}}}catch(e){}dijit._setStack(_1f);},_onFocusNode:function(_21){if(!_21){return;}if(_21.nodeType==9){return;}if(_21.nodeType==9){var _22=dijit.getDocumentWindow(_21).frameElement;if(!_22){return;}_21=_22;}dijit._onTouchNode(_21);if(_21==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_21;dojo.publish("focusNode",[_21]);},_setStack:function(_23){var _24=dijit._activeStack;dijit._activeStack=_23;for(var _25=0;_25<Math.min(_24.length,_23.length);_25++){if(_24[_25]!=_23[_25]){break;}}for(var i=_24.length-1;i>=_25;i--){var _27=dijit.byId(_24[i]);if(_27){_27._focused=false;_27._hasBeenBlurred=true;if(_27._onBlur){_27._onBlur();}if(_27._setStateClass){_27._setStateClass();}dojo.publish("widgetBlur",[_27]);}}for(i=_25;i<_23.length;i++){_27=dijit.byId(_23[i]);if(_27){_27._focused=true;if(_27._onFocus){_27._onFocus();}if(_27._setStateClass){_27._setStateClass();}dojo.publish("widgetFocus",[_27]);}}}});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(_28){if(this._hash[_28.id]){throw new Error("Tried to register widget with id=="+_28.id+" but that id is already registered");}this._hash[_28.id]=_28;},remove:function(id){delete this._hash[id];},forEach:function(_2a){for(var id in this._hash){_2a(this._hash[id]);}},filter:function(_2c){var res=new dijit.WidgetSet();this.forEach(function(_2e){if(_2c(_2e)){res.add(_2e);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_31){return _31.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_32){var id;do{id=_32+"_"+(_32 in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_32]:dijit._widgetTypeCtr[_32]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.registry.forEach(function(_34){_34.destroy();});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_36){return dijit.registry.byId(_36.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_37){while(_37){if(_37.getAttribute&&_37.getAttribute("widgetId")){return dijit.registry.byId(_37.getAttribute("widgetId"));}_37=_37.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_38){var _39=dojo.style(_38);return (_39.visibility!="hidden")&&(_39.visibility!="collapsed")&&(_39.display!="none")&&(dojo.attr(_38,"type")!="hidden");};dijit.isTabNavigable=function(_3a){if(dojo.hasAttr(_3a,"disabled")){return false;}var _3b=dojo.hasAttr(_3a,"tabindex");var _3c=dojo.attr(_3a,"tabindex");if(_3b&&_3c>=0){return true;}var _3d=_3a.nodeName.toLowerCase();if(((_3d=="a"&&dojo.hasAttr(_3a,"href"))||dijit._tabElements[_3d])&&(!_3b||_3c>=0)){return true;}return false;};dijit._getTabNavigable=function(_3e){var _3f,_40,_41,_42,_43,_44;var _45=function(_46){dojo.query("> *",_46).forEach(function(_47){var _48=dijit._isElementShown(_47);if(_48&&dijit.isTabNavigable(_47)){var _49=dojo.attr(_47,"tabindex");if(!dojo.hasAttr(_47,"tabindex")||_49==0){if(!_3f){_3f=_47;}_40=_47;}else{if(_49>0){if(!_41||_49<_42){_42=_49;_41=_47;}if(!_43||_49>=_44){_44=_49;_43=_47;}}}}if(_48&&_47.nodeName.toUpperCase()!="SELECT"){_45(_47);}});};if(dijit._isElementShown(_3e)){_45(_3e);}return {first:_3f,last:_40,lowest:_41,highest:_43};};dijit.getFirstInTabbingOrder=function(_4a){var _4b=dijit._getTabNavigable(dojo.byId(_4a));return _4b.lowest?_4b.lowest:_4b.first;};dijit.getLastInTabbingOrder=function(_4c){var _4d=dijit._getTabNavigable(dojo.byId(_4c));return _4d.last?_4d.last:_4d.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_4e){this.pairs=[];this.returnWrappers=_4e||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_4f,_50,_51,_52,_53){this.pairs[((_53)?"unshift":"push")]([_4f,_50,_51,_52]);},match:function(){for(var i=0;i<this.pairs.length;i++){var _55=this.pairs[i];if(_55[1].apply(this,arguments)){if((_55[3])||(this.returnWrappers)){return _55[2];}else{return _55[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(_56){for(var i=0;i<this.pairs.length;i++){var _58=this.pairs[i];if(_58[0]==_56){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _59=dojo.global;var _5a=dojo.doc;var w=0,h=0;var de=_5a.documentElement;var dew=de.clientWidth,deh=de.clientHeight;if(dojo.isMozilla){var _60,_61,_62,_63;var dbw=_5a.body.clientWidth;if(dbw>dew){_60=dew;_62=dbw;}else{_62=dew;_60=dbw;}var dbh=_5a.body.clientHeight;if(dbh>deh){_61=deh;_63=dbh;}else{_63=deh;_61=dbh;}w=(_62>_59.innerWidth)?_60:_62;h=(_63>_59.innerHeight)?_61:_63;}else{if(!dojo.isOpera&&_59.innerWidth){w=_59.innerWidth;h=_59.innerHeight;}else{if(dojo.isIE&&de&&deh){w=dew;h=deh;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _66=dojo._docScroll();return {w:w,h:h,l:_66.x,t:_66.y};};dijit.placeOnScreen=function(_67,pos,_69,_6a){var _6b=dojo.map(_69,function(_6c){return {corner:_6c,pos:pos};});return dijit._place(_67,_6b);};dijit._place=function(_6d,_6e,_6f){var _70=dijit.getViewport();if(!_6d.parentNode||String(_6d.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_6d);}var _71=null;dojo.some(_6e,function(_72){var _73=_72.corner;var pos=_72.pos;if(_6f){_6f(_6d,_72.aroundCorner,_73);}var _75=_6d.style;var _76=_75.display;var _77=_75.visibility;_75.visibility="hidden";_75.display="";var mb=dojo.marginBox(_6d);_75.display=_76;_75.visibility=_77;var _79=(_73.charAt(1)=="L"?pos.x:Math.max(_70.l,pos.x-mb.w)),_7a=(_73.charAt(0)=="T"?pos.y:Math.max(_70.t,pos.y-mb.h)),_7b=(_73.charAt(1)=="L"?Math.min(_70.l+_70.w,_79+mb.w):pos.x),_7c=(_73.charAt(0)=="T"?Math.min(_70.t+_70.h,_7a+mb.h):pos.y),_7d=_7b-_79,_7e=_7c-_7a,_7f=(mb.w-_7d)+(mb.h-_7e);if(_71==null||_7f<_71.overflow){_71={corner:_73,aroundCorner:_72.aroundCorner,x:_79,y:_7a,w:_7d,h:_7e,overflow:_7f};}return !_7f;});_6d.style.left=_71.x+"px";_6d.style.top=_71.y+"px";if(_71.overflow&&_6f){_6f(_6d,_71.aroundCorner,_71.corner);}return _71;};dijit.placeOnScreenAroundNode=function(_80,_81,_82,_83){_81=dojo.byId(_81);var _84=_81.style.display;_81.style.display="";var _85=_81.offsetWidth;var _86=_81.offsetHeight;var _87=dojo.coords(_81,true);_81.style.display=_84;return dijit._placeOnScreenAroundRect(_80,_87.x,_87.y,_85,_86,_82,_83);};dijit.placeOnScreenAroundRectangle=function(_88,_89,_8a,_8b){return dijit._placeOnScreenAroundRect(_88,_89.x,_89.y,_89.width,_89.height,_8a,_8b);};dijit._placeOnScreenAroundRect=function(_8c,x,y,_8f,_90,_91,_92){var _93=[];for(var _94 in _91){_93.push({aroundCorner:_94,corner:_91[_94],pos:{x:x+(_94.charAt(1)=="L"?0:_8f),y:y+(_94.charAt(0)=="T"?0:_90)}});}return dijit._place(_8c,_93,_92);};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(_99,_9a,_9b,_9c){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){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 _9f=[],_a0=1000,_a1=1;this.prepare=function(_a2){dojo.body().appendChild(_a2);var s=_a2.style;if(s.display=="none"){s.display="";}s.visibility="hidden";s.position="absolute";s.top="-9999px";};this.open=function(_a4){var _a5=_a4.popup,_a6=_a4.orient||{"BL":"TL","TL":"BL"},_a7=_a4.around,id=(_a4.around&&_a4.around.id)?(_a4.around.id+"_dropdown"):("popup_"+_a1++);var _a9=dojo.doc.createElement("div");dijit.setWaiRole(_a9,"presentation");_a9.id=id;_a9.className="dijitPopup";_a9.style.zIndex=_a0+_9f.length;_a9.style.left=_a9.style.top="0px";_a9.style.visibility="hidden";if(_a4.parent){_a9.dijitPopupParent=_a4.parent.id;}dojo.body().appendChild(_a9);var s=_a5.domNode.style;s.display="";s.visibility="";s.position="";_a9.appendChild(_a5.domNode);var _ab=new dijit.BackgroundIframe(_a9);var _ac=_a7?dijit.placeOnScreenAroundElement(_a9,_a7,_a6,_a5.orient?dojo.hitch(_a5,"orient"):null):dijit.placeOnScreen(_a9,_a4,_a6=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);_a9.style.visibility="visible";var _ad=[];var _ae=function(){for(var pi=_9f.length-1;pi>0&&_9f[pi].parent===_9f[pi-1].widget;pi--){}return _9f[pi];};_ad.push(dojo.connect(_a9,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&_a4.onCancel){dojo.stopEvent(evt);_a4.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _b1=_ae();if(_b1&&_b1.onCancel){_b1.onCancel();}}}}));if(_a5.onCancel){_ad.push(dojo.connect(_a5,"onCancel",null,_a4.onCancel));}_ad.push(dojo.connect(_a5,_a5.onExecute?"onExecute":"onChange",null,function(){var _b2=_ae();if(_b2&&_b2.onExecute){_b2.onExecute();}}));_9f.push({wrapper:_a9,iframe:_ab,widget:_a5,parent:_a4.parent,onExecute:_a4.onExecute,onCancel:_a4.onCancel,onClose:_a4.onClose,handlers:_ad});if(_a5.onOpen){_a5.onOpen(_ac);}return _ac;};this.close=function(_b3){while(dojo.some(_9f,function(_b4){return _b4.widget==_b3;})){var top=_9f.pop(),_b6=top.wrapper,_b7=top.iframe,_b8=top.widget,_b9=top.onClose;if(_b8.onClose){_b8.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_b8||!_b8.domNode){return;}this.prepare(_b8.domNode);_b7.destroy();dojo._destroyElement(_b6);if(_b9){_b9();}}};}();dijit._frames=new function(){var _ba=[];this.pop=function(){var _bb;if(_ba.length){_bb=_ba.pop();_bb.style.display="";}else{if(dojo.isIE){var _bc=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _bd="<iframe src='"+_bc+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_bb=dojo.doc.createElement(_bd);}else{_bb=dojo.doc.createElement("iframe");_bb.src="javascript:\"\"";_bb.className="dijitBackgroundIframe";}_bb.tabIndex=-1;dojo.body().appendChild(_bb);}return _bb;};this.push=function(_be){_be.style.display="";if(dojo.isIE){_be.style.removeExpression("width");_be.style.removeExpression("height");}_ba.push(_be);};}();if(dojo.isIE<7){dojo.addOnLoad(function(){var f=dijit._frames;dojo.forEach([f.pop()],f.push);});}dijit.BackgroundIframe=function(_c0){if(!_c0.id){throw new Error("no id");}if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _c1=dijit._frames.pop();_c0.appendChild(_c1);if(dojo.isIE){_c1.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+_c0.id+"').offsetWidth");_c1.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+_c0.id+"').offsetHeight");}this.iframe=_c1;}};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(_c2){_c2=dojo.byId(_c2);var _c3=_c2.ownerDocument.body;var _c4=_c3.parentNode;if(dojo.isFF==2||_c2==_c3||_c2==_c4){_c2.scrollIntoView(false);return;}var rtl=!dojo._isBodyLtr();var _c6=dojo.doc.compatMode!="BackCompat";var _c7=(_c6&&!dojo.isSafari)?_c4:_c3;function addPseudoAttrs(_c8){var _c9=_c8.parentNode;var _ca=_c8.offsetParent;if(_ca==null){_c8=_c7;_ca=_c4;_c9=null;}_c8._offsetParent=(_ca==_c3)?_c7:_ca;_c8._parent=(_c9==_c3)?_c7:_c9;_c8._start={H:_c8.offsetLeft,V:_c8.offsetTop};_c8._scroll={H:_c8.scrollLeft,V:_c8.scrollTop};_c8._renderedSize={H:_c8.offsetWidth,V:_c8.offsetHeight};var bp=dojo._getBorderExtents(_c8);_c8._borderStart={H:bp.l,V:bp.t};_c8._borderSize={H:bp.w,V:bp.h};_c8._clientSize=(_c8._offsetParent==_c4&&dojo.isSafari&&_c6)?{H:_c4.clientWidth,V:_c4.clientHeight}:{H:_c8.clientWidth,V:_c8.clientHeight};_c8._scrollBarSize={V:null,H:null};for(var dir in _c8._scrollBarSize){var _cd=_c8._renderedSize[dir]-_c8._clientSize[dir]-_c8._borderSize[dir];_c8._scrollBarSize[dir]=(_c8._clientSize[dir]>0&&_cd>=15&&_cd<=17)?_cd:0;}_c8._isScrollable={V:null,H:null};for(dir in _c8._isScrollable){var _ce=dir=="H"?"V":"H";_c8._isScrollable[dir]=_c8==_c7||_c8._scroll[dir]||_c8._scrollBarSize[_ce];}};var _cf=_c2;while(_cf!=null){addPseudoAttrs(_cf);var _d0=_cf._parent;if(_d0){_d0._child=_cf;}_cf=_d0;}for(var dir in _c7._renderedSize){_c7._renderedSize[dir]=Math.min(_c7._clientSize[dir],_c7._renderedSize[dir]);}var _d2=_c2;while(_d2!=_c7){_cf=_d2._parent;if(_cf.tagName=="TD"){var _d3=_cf._parent._parent._parent;if(_d3._offsetParent==_d2._offsetParent&&_cf._offsetParent!=_d2._offsetParent){_cf=_d3;}}var _d4=_d2==_c7||(_cf._offsetParent!=_d2._offsetParent);for(dir in _d2._start){var _d5=dir=="H"?"V":"H";if(rtl&&dir=="H"&&(dojo.isSafari||dojo.isIE)&&_cf._clientSize.H>0){var _d6=_cf.scrollWidth-_cf._clientSize.H;if(_d6>0){_cf._scroll.H-=_d6;}}if(dojo.isIE&&_cf._offsetParent.tagName=="TABLE"){_cf._start[dir]-=_cf._offsetParent._borderStart[dir];_cf._borderStart[dir]=_cf._borderSize[dir]=0;}if(_cf._clientSize[dir]==0){_cf._renderedSize[dir]=_cf._clientSize[dir]=_cf._child._clientSize[dir];if(rtl&&dir=="H"){_cf._start[dir]-=_cf._renderedSize[dir];}}else{_cf._renderedSize[dir]-=_cf._borderSize[dir]+_cf._scrollBarSize[dir];}_cf._start[dir]+=_cf._borderStart[dir];var _d7=_d2._start[dir]-(_d4?0:_cf._start[dir])-_cf._scroll[dir];var _d8=_d7+_d2._renderedSize[dir]-_cf._renderedSize[dir];var _d9,_da=(dir=="H")?"scrollLeft":"scrollTop";var _db=(dir=="H"&&rtl);var _dc=_db?-_d8:_d7;var _dd=_db?-_d7:_d8;if(_dc<=0){_d9=_dc;}else{if(_dd<=0){_d9=0;}else{if(_dc<_dd){_d9=_dc;}else{_d9=_dd;}}}var _de=0;if(_d9!=0){var _df=_cf[_da];_cf[_da]+=_db?-_d9:_d9;_de=_cf[_da]-_df;_d7-=_de;_dd-=_db?-_de:_de;}_cf._renderedSize[dir]=_d2._renderedSize[dir]+_cf._scrollBarSize[dir]-((_cf._isScrollable[dir]&&_dd>0)?_dd:0);_cf._start[dir]+=(_d7>=0||!_cf._isScrollable[dir])?_d7:0;}_d2=_cf;}};}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 _e2=d.isOpera;var maj=Math.floor;var ff=d.isFF;var _e5=d.boxModel.replace(/-/,"");var _e6={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_e2,dj_opera8:maj(_e2)==8,dj_opera9:maj(_e2)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla,dj_ff2:maj(ff)==2,dj_ff3:maj(ff)==3};_e6["dj_"+_e5]=true;var _e7=dojo.doc.documentElement;for(var p in _e6){if(_e6[p]){if(_e7.className){_e7.className+=" "+p;}else{_e7.className=p;}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){_e7.className+=" dijitRtl";for(var p in _e6){if(_e6[p]){_e7.className+=" "+p+"-rtl";}}}});})();}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,_eb,_ec,_ed,obj,_ef,_f0){if(obj!=this._obj){this.stop();this._initialDelay=_f0||500;this._subsequentDelay=_ef||0.9;this._obj=obj;this._evt=evt;this._node=_ec;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_eb,_ed);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(_f1,_f2,_f3,_f4,_f5,_f6){if(_f2.keyCode){_f2.charOrCode=_f2.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_f2.charCode){_f2.charOrCode=String.fromCharCode(_f2.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(_f1,"onkeypress",this,function(evt){if(evt.charOrCode==_f2.charOrCode&&(_f2.ctrlKey===undefined||_f2.ctrlKey==evt.ctrlKey)&&(_f2.altKey===undefined||_f2.altKey==evt.ctrlKey)&&(_f2.shiftKey===undefined||_f2.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_f2,_f3,_f1,_f4,_f2,_f5,_f6);}else{if(dijit.typematic._obj==_f2){dijit.typematic.stop();}}}),dojo.connect(_f1,"onkeyup",this,function(evt){if(dijit.typematic._obj==_f2){dijit.typematic.stop();}})];},addMouseListener:function(_f9,_fa,_fb,_fc,_fd){var dc=dojo.connect;return [dc(_f9,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);}),dc(_f9,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_f9,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(_f9,"mousemove",this,function(evt){dojo.stopEvent(evt);}),dc(_f9,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_104,_105,_106,_107,_108,_109,_10a){return this.addKeyListener(_105,_106,_107,_108,_109,_10a).concat(this.addMouseListener(_104,_107,_108,_109,_10a));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.doc.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.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");";dojo.body().appendChild(div);var cs=dojo.getComputedStyle(div);if(cs){var _10d=cs.backgroundImage;var _10e=(cs.borderTopColor==cs.borderRightColor)||(_10d!=null&&(_10d=="none"||_10d=="url(invalid-url:)"));dojo[_10e?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(elem,role){var _111=this.getWaiRole(elem);if(role){return (_111.indexOf(role)>-1);}else{return (_111.length>0);}},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""));},setWaiRole:function(elem,role){var _115=dojo.attr(elem,"role")||"";if(dojo.isFF<3||!this._XhtmlRoles.test(_115)){dojo.attr(elem,"role",dojo.isFF<3?"wairole:"+role:role);}else{if((" "+_115+" ").indexOf(" "+role+" ")<0){var _116=dojo.trim(_115.replace(this._XhtmlRoles,""));var _117=dojo.trim(_115.replace(_116,""));dojo.attr(elem,"role",_117+(_117?" ":"")+role);}}},removeWaiRole:function(elem,role){var _11a=dojo.attr(elem,"role");if(!_11a){return;}if(role){var _11b=dojo.isFF<3?"wairole:"+role:role;var t=dojo.trim((" "+_11a+" ").replace(" "+_11b+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_11e){if(dojo.isFF<3){return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa",_11e);}else{return elem.hasAttribute?elem.hasAttribute("aria-"+_11e):!!elem.getAttribute("aria-"+_11e);}},getWaiState:function(elem,_120){if(dojo.isFF<3){return elem.getAttributeNS("http://www.w3.org/2005/07/aaa",_120);}else{var _121=elem.getAttribute("aria-"+_120);return _121?_121:"";}},setWaiState:function(elem,_123,_124){if(dojo.isFF<3){elem.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_123,_124);}else{elem.setAttribute("aria-"+_123,_124);}},removeWaiState:function(elem,_126){if(dojo.isFF<3){elem.removeAttributeNS("http://www.w3.org/2005/07/aaa",_126);}else{elem.removeAttribute("aria-"+_126);}}});}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.require("dijit._base");dojo.connect(dojo,"connect",function(_127,_128){if(_127&&dojo.isFunction(_127._onConnect)){_127._onConnect(_128);}});dijit._connectOnUseEventHandler=function(_129){};(function(){var _12a={};var _12b=function(dc){if(!_12a[dc]){var r=[];var _12e;var _12f=dojo.getObject(dc).prototype;for(var _130 in _12f){if(dojo.isFunction(_12f[_130])&&(_12e=_130.match(/^_set([a-zA-Z]*)Attr$/))&&_12e[1]){r.push(_12e[1].charAt(0).toLowerCase()+_12e[1].substr(1));}}_12a[dc]=r;}return _12a[dc]||[];};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(_131,_132){this.create(_131,_132);},create:function(_133,_134){this.srcNodeRef=dojo.byId(_134);this._connects=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_133){this.params=_133;dojo.mixin(this,_133);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();for(attr in this.params){this._onConnect(attr);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _136=function(attr,_138){if((_138.params&&attr in _138.params)||_138[attr]){_138.attr(attr,_138[attr]);}};for(var attr in this.attributeMap){_136(attr,this);}dojo.forEach(_12b(this.declaredClass),function(a){if(!(a in this.attributeMap)){_136(a,this);}},this);},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.doc.createElement("div");},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_13b){this.destroyDescendants(_13b);this.destroy(_13b);},destroy:function(_13c){this.uninitialize();dojo.forEach(this._connects,function(_13d){dojo.forEach(_13d,dojo.disconnect);});dojo.forEach(this._supportingWidgets||[],function(w){if(w.destroy){w.destroy();}});this.destroyRendering(_13c);dijit.registry.remove(this.id);},destroyRendering:function(_13f){if(this.bgIframe){this.bgIframe.destroy(_13f);delete this.bgIframe;}if(this.domNode){if(!_13f){dojo._destroyElement(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_13f){dojo._destroyElement(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_140){dojo.forEach(this.getDescendants(),function(_141){if(_141.destroy){_141.destroy(_140);}});},uninitialize:function(){return false;},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},_onConnect:function(_143){if(_143 in this._deferredConnects){var _144=this[this._deferredConnects[_143]||"domNode"];this.connect(_144,_143.toLowerCase(),this[_143]);delete this._deferredConnects[_143];}},_setClassAttr:function(_145){var _146=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(_146,this["class"]);this["class"]=_145;dojo.addClass(_146,_145);},_setStyleAttr:function(_147){var _148=this[this.attributeMap["style"]||"domNode"];if(_148.style.cssText){_148.style.cssText+="; "+_147;}else{_148.style.cssText=_147;}this["style"]=_147;},setAttribute:function(attr,_14a){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,_14a);},_attrToDom:function(attr,_14c){var _14d=this.attributeMap[attr];dojo.forEach(dojo.isArray(_14d)?_14d:[_14d],function(_14e){var _14f=this[_14e.node||_14e||"domNode"];var type=_14e.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_14c)){_14c=dojo.hitch(this,_14c);}if(/^on[A-Z][a-zA-Z]*$/.test(attr)){attr=attr.toLowerCase();}dojo.attr(_14f,attr,_14c);break;case "innerHTML":_14f.innerHTML=_14c;break;case "class":dojo.removeClass(_14f,this[attr]);dojo.addClass(_14f,_14c);break;}},this);this[attr]=_14c;},attr:function(name,_152){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x]);}return this;}var _155=this._getAttrNames(name);if(args==2){if(this[_155.s]){return this[_155.s](_152)||this;}else{if(name in this.attributeMap){this._attrToDom(name,_152);}this[name]=_152;}return this;}else{if(this[_155.g]){return this[_155.g]();}else{return this[name];}}},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"};},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){if(this.containerNode){var list=dojo.query("[widgetId]",this.containerNode);return list.map(dijit.byNode);}else{return [];}},nodesWithKeyClick:["input","button"],connect:function(obj,_15b,_15c){var d=dojo;var dco=d.hitch(d,"connect",obj);var _15f=[];if(_15b=="ondijitclick"){if(!this.nodesWithKeyClick[obj.nodeName]){var m=d.hitch(this,_15c);_15f.push(dco("onkeydown",this,function(e){if(!d.isFF&&e.keyCode==d.keys.ENTER){return m(e);}else{if(e.keyCode==d.keys.SPACE){d.stopEvent(e);}}}),dco("onkeyup",this,function(e){if(e.keyCode==d.keys.SPACE){return m(e);}}));if(d.isFF){_15f.push(dco("onkeypress",this,function(e){if(e.keyCode==d.keys.ENTER){return m(e);}}));}}_15b="onclick";}_15f.push(dco(_15b,this,_15c));this._connects.push(_15f);return _15f;},disconnect:function(_164){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_164){dojo.forEach(_164,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){return dojo._isBodyLtr();},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},placeAt:function(_166,_167){if(_166["declaredClass"]&&_166["addChild"]){_166.addChild(this,_167);}else{dojo.place(this.domNode,_166,_167);}return this;}});})();}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(text,size,ch,end){if(!ch){ch="0";}var out=String(text),pad=dojo.string.rep(ch,Math.ceil((size-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_171,map,_173,_174){_174=_174||dojo.global;_173=(!_173)?function(v){return v;}:dojo.hitch(_174,_173);return _171.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_176,key,_178){var _179=dojo.getObject(key,false,map);if(_178){_179=dojo.getObject(_178,false,_174).call(_174,_179,key);}return _173(_179,key).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["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(tmpl){var _17d=this.declaredClass,_17e=this;return dojo.string.substitute(tmpl,this,function(_17f,key){if(key.charAt(0)=="!"){_17f=_17e[key.substr(1)];}if(typeof _17f=="undefined"){throw new Error(_17d+" template:"+key);}if(_17f==null){return "";}return key.charAt(0)=="!"?_17f:_17f.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _181=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_181)){node=dijit._Templated._createNodesFromText(this._stringRepl(_181))[0];}else{node=_181.cloneNode(true);}this.domNode=node;this._attachTemplateNodes(node);var _183=this.srcNodeRef;if(_183&&_183.parentNode){_183.parentNode.replaceChild(node,_183);}if(this.widgetsInTemplate){var cw=(this._supportingWidgets=dojo.parser.parse(node));this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(_183);},_fillContent:function(_187){var dest=this.containerNode;if(_187&&dest){while(_187.hasChildNodes()){dest.appendChild(_187.firstChild);}}},_attachTemplateNodes:function(_189,_18a){_18a=_18a||function(n,p){return n.getAttribute(p);};var _18d=dojo.isArray(_189)?_189:(_189.all||_189.getElementsByTagName("*"));var x=dojo.isArray(_189)?0:-1;var _18f={};for(;x<_18d.length;x++){var _190=(x==-1)?_189:_18d[x];if(this.widgetsInTemplate&&_18a(_190,"dojoType")){continue;}var _191=_18a(_190,"dojoAttachPoint");if(_191){var _192,_193=_191.split(/\s*,\s*/);while((_192=_193.shift())){if(dojo.isArray(this[_192])){this[_192].push(_190);}else{this[_192]=_190;}}}var _194=_18a(_190,"dojoAttachEvent");if(_194){var _195,_196=_194.split(/\s*,\s*/);var trim=dojo.trim;while((_195=_196.shift())){if(_195){var _198=null;if(_195.indexOf(":")!=-1){var _199=_195.split(":");_195=trim(_199[0]);_198=trim(_199[1]);}else{_195=trim(_195);}if(!_198){_198=_195;}this.connect(_190,_195,_198);}}}var role=_18a(_190,"waiRole");if(role){dijit.setWaiRole(_190,role);}var _19b=_18a(_190,"waiState");if(_19b){dojo.forEach(_19b.split(/\s*,\s*/),function(_19c){if(_19c.indexOf("-")!=-1){var pair=_19c.split("-");dijit.setWaiState(_190,pair[0],pair[1]);}});}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_19e,_19f,_1a0){var _1a1=dijit._Templated._templateCache;var key=_19f||_19e;var _1a3=_1a1[key];if(_1a3){if(!_1a3.ownerDocument||_1a3.ownerDocument==dojo.doc){return _1a3;}dojo._destroyElement(_1a3);}if(!_19f){_19f=dijit._Templated._sanitizeTemplateString(dojo._getText(_19e));}_19f=dojo.string.trim(_19f);if(_1a0||_19f.match(/\$\{([^\}]+)\}/g)){return (_1a1[key]=_19f);}else{return (_1a1[key]=dijit._Templated._createNodesFromText(_19f)[0]);}};dijit._Templated._sanitizeTemplateString=function(_1a4){if(_1a4){_1a4=_1a4.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _1a5=_1a4.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_1a5){_1a4=_1a5[1];}}else{_1a4="";}return _1a4;};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _1a6=dijit._Templated._templateCache;for(var key in _1a6){var _1a8=_1a6[key];if(!isNaN(_1a8.nodeType)){dojo._destroyElement(_1a8);}delete _1a6[key];}});}(function(){var _1a9={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.ownerDocument!=dojo.doc){dojo._destroyElement(tn);tn=undefined;}if(!tn){tn=dojo.doc.createElement("div");tn.style.display="none";dojo.body().appendChild(tn);}var _1ac="none";var _1ad=text.replace(/^\s+/,"");for(var type in _1a9){var map=_1a9[type];if(map.re.test(_1ad)){_1ac=type;text=map.pre+text+map.post;break;}}tn.innerHTML=text;if(tn.normalize){tn.normalize();}var tag={cell:"tr",row:"tbody",section:"table"}[_1ac];var _1b1=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;var _1b2=[];while(_1b1.firstChild){_1b2.push(_1b1.removeChild(_1b1.firstChild));}tn.innerHTML="";return _1b2;};})();dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["movies.widget.CinemaSelection"]){dojo._hasResource["movies.widget.CinemaSelection"]=true;dojo.provide("movies.widget.CinemaSelection");dojo.declare("movies.widget.CinemaSelection",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"CinemaSelection\" style=\"position: absolute;\">\n<div class=\"CinemaSelectionShadow\">\n<div class=\"CinemaSelection\">\n<p class=\"nearestcinemas\">nearest cinemas to <strong><span dojoAttachPoint=\"locationName\"></span></strong> showing <strong><span dojoAttachPoint=\"searchScope\"></span></strong> - select a cinema:</p>\n<table>\n<tbody dojoAttachPoint=\"cinemaTable\">\n<tr>\n<th class=\"cinemaname\">cinema name</td>\n<th class=\"isow\"></td>\n<th class=\"distance\"></td>\n</tr>\n<tr>\n<td class=\"cinemaname\">cinema 1</td>\n<td class=\"isow\"></td>\n<td class=\"distance\">0.1 mi</td>\n</tr>\n</tbody>\n</table>\n<p class=\"key\">= Orange Wednesdays Cinema</p>\n</div>\n</div>\n</div>\n",currentItemIndex:null,previousItemIndex:null,parent:null,items:null,_locationName:null,_lat:null,_lng:null,setParent:function(_1b3){this.parent=_1b3;},moveToPreviousItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex-1;if(newIndex==-1){newIndex=this.items.length-1;}}this.moveToItemIndex(newIndex);},moveToNextItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex+1;if(newIndex==this.items.length){newIndex=0;}}this.moveToItemIndex(newIndex);},moveToFirstItem:function(){this.moveToItemIndex(0);},moveToLastItem:function(){this.moveToItemIndex(this.items.length-1);},moveToItemIndex:function(_1b4){_1b4=parseInt(_1b4);if(_1b4!=this.currentItemIndex){this.currentItemIndex=_1b4;if(this.previousItemIndex!=null){row=dojo.byId(this.id+"_row_"+this.previousItemIndex);row.className="";if(row.childNodes[1].childNodes.length==1){row.childNodes[1].firstChild.setAttribute("src",this.parent.getDomainPrefix()+"/images/furniture/movies/filmfinder/owgreybg.gif");}}row=dojo.byId(this.id+"_row_"+this.currentItemIndex);row.className="selected";if(row.childNodes[1].childNodes.length==1){row.childNodes[1].firstChild.setAttribute("src",this.parent.getDomainPrefix()+"/images/furniture/movies/filmfinder/owgreybghighlighted.gif");}this.previousItemIndex=this.currentItemIndex;}},mouseover:function(_1b5){idComponents=_1b5.currentTarget.id.split("_");this.moveToItemIndex(idComponents[3]);_1b5.stopPropagation();},getCinemaNameAndCode:function(){if(this.currentItemIndex!=null){var _1b6=new Array();_1b6=new Array();_1b6["cinemaname"]=this.items[this.currentItemIndex]["cinemaname"];_1b6["cinemacode"]=this.items[this.currentItemIndex]["cinemacode"];return _1b6;}else{return null;}},click:function(_1b7){idComponents=_1b7.currentTarget.id.split("_");this.parent.selectCinemaFromCinemaSelectList(this.items[idComponents[3]]["cinemaname"],this.items[idComponents[3]]["cinemacode"]);_1b7.stopPropagation();},populate:function(_1b8,_1b9,lat,lng,_1bc){this._location=_1b8;this._lat=lat;this._lng=lng;this.previousItemIndex=null;this.currentItemIndex=null;this.items=_1bc;tableElement=this.cinemaTable;while(tableElement.childNodes.length>0){tableElement.removeChild(tableElement.childNodes[tableElement.childNodes.length-1]);}for(index=0;index<_1bc.length;index++){film=_1bc[index];cinemaName=film["cinemaname"];distance=film["distance"];isOrangeWednesdays=(film["isow"]=="true"?true:false);rowElement=dojo.doc.createElement("tr");rowElement.setAttribute("id",this.id+"_row_"+index);dojo.connect(rowElement,"onmouseover",this,"mouseover");dojo.connect(rowElement,"onclick",this,"click");colElement=dojo.doc.createElement("td");if(dojo.isIE){colElement.className="cinemaname";}else{colElement.setAttribute("class","cinemaname");}colElement.appendChild(dojo.doc.createTextNode(cinemaName));rowElement.appendChild(colElement);colElement=dojo.doc.createElement("td");if(dojo.isIE){colElement.className="isow";}else{colElement.setAttribute("class","isow");}if(isOrangeWednesdays){imgElement=dojo.doc.createElement("img");imgElement.setAttribute("src",this.parent.getDomainPrefix()+"/images/furniture/movies/filmfinder/owgreybg.gif");colElement.appendChild(imgElement);}rowElement.appendChild(colElement);colElement=dojo.doc.createElement("td");if(dojo.isIE){colElement.className="distance";}else{colElement.setAttribute("class","distance");}colElement.appendChild(dojo.doc.createTextNode(distance));rowElement.appendChild(colElement);tableElement.appendChild(rowElement);}this.locationName.innerHTML=_1b8+" ";this.searchScope.innerHTML=_1b9+" ";}});}if(!dojo._hasResource["movies.widget.BrandSelect"]){dojo._hasResource["movies.widget.BrandSelect"]=true;dojo.provide("movies.widget.BrandSelect");dojo.declare("movies.widget.BrandSelect",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"CinemaSelection\" style=\"position: absolute;\">\n    <div class=\"CinemaSelectionShadow\">\n        <div class=\"CinemaSelection brandmode\">\n            <p class=\"nearestcinemas\" dojoAttachPoint=\"introtext\"></p>\n            <table>\n            <tbody dojoAttachPoint=\"cinemaTable\">\n            <tr>\n            <th class=\"cinemaname\">cinema name</td>\n            <th class=\"isow\"></td>\n            </tr>\n            </tbody>\n            </table>\n            <p class=\"nearestcinemas\" dojoAttachPoint=\"outrotext\"></p>\n            <p class=\"key\">= Orange Wednesdays Cinema</p>\n        </div>\n    </div>\n</div>\n\n",currentItemIndex:null,previousItemIndex:null,parent:null,items:null,_brand:null,setParent:function(_1bd){this.parent=_1bd;},moveToPreviousItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex-1;if(newIndex==-1){newIndex=this.items.length-1;}}this.moveToItemIndex(newIndex);},moveToNextItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex+1;if(newIndex==this.items.length){newIndex=0;}}this.moveToItemIndex(newIndex);},moveToFirstItem:function(){this.moveToItemIndex(0);},moveToLastItem:function(){this.moveToItemIndex(this.items.length-1);},moveToItemIndex:function(_1be){_1be=parseInt(_1be);if(_1be!=this.currentItemIndex){this.currentItemIndex=_1be;if(this.previousItemIndex!=null){row=dojo.byId(this.id+"_row_"+this.previousItemIndex);row.className="";if(row.childNodes[1].childNodes.length==1){row.childNodes[1].firstChild.setAttribute("src",this.parent.getDomainPrefix()+"/images/furniture/movies/filmfinder/owgreybg.gif");}}row=dojo.byId(this.id+"_row_"+this.currentItemIndex);row.className="selected";if(row.childNodes[1].childNodes.length==1){row.childNodes[1].firstChild.setAttribute("src",this.parent.getDomainPrefix()+"/images/furniture/movies/filmfinder/owgreybghighlighted.gif");}this.previousItemIndex=this.currentItemIndex;}},mouseover:function(_1bf){idComponents=_1bf.currentTarget.id.split("_");this.moveToItemIndex(idComponents[3]);_1bf.stopPropagation();},getCinemaNameAndCode:function(){if(this.currentItemIndex!=null){var _1c0=new Array();_1c0=new Array();_1c0["cinemaname"]=this.items[this.currentItemIndex]["cinemaname"];_1c0["cinemacode"]=this.items[this.currentItemIndex]["cinemacode"];return _1c0;}else{return null;}},click:function(_1c1){idComponents=_1c1.currentTarget.id.split("_");this.parent.selectCinemaFromCinemaSelectList(this.items[idComponents[3]]["cinemaname"],this.items[idComponents[3]]["cinemacode"]);_1c1.stopPropagation();},populate:function(_1c2,_1c3,_1c4){this._brand=_1c2;this.previousItemIndex=null;this.currentItemIndex=null;this.items=_1c3;tableElement=this.cinemaTable;while(tableElement.childNodes.length>0){tableElement.removeChild(tableElement.childNodes[tableElement.childNodes.length-1]);}for(index=0;index<_1c3.length;index++){film=_1c3[index];cinemaName=film["cinemaname"];isOrangeWednesdays=(film["isow"]=="true"?true:false);rowElement=dojo.doc.createElement("tr");rowElement.setAttribute("id",this.id+"_row_"+index);dojo.connect(rowElement,"onmouseover",this,"mouseover");dojo.connect(rowElement,"onclick",this,"click");colElement=dojo.doc.createElement("td");if(dojo.isIE){colElement.className="cinemaname";}else{colElement.setAttribute("class","cinemaname");}colElement.appendChild(dojo.doc.createTextNode(cinemaName));rowElement.appendChild(colElement);colElement=dojo.doc.createElement("td");if(dojo.isIE){colElement.className="isow";}else{colElement.setAttribute("class","isow");}if(isOrangeWednesdays){imgElement=dojo.doc.createElement("img");imgElement.setAttribute("src",this.parent.getDomainPrefix()+"/images/furniture/movies/filmfinder/owgreybg.gif");colElement.appendChild(imgElement);}rowElement.appendChild(colElement);tableElement.appendChild(rowElement);}if(_1c4){this.introtext.innerHTML="popular  <strong>"+_1c2+"</strong>  cinemas:";this.outrotext.innerHTML="add your location to find your nearest  <strong>"+_1c2+"</strong> cinema";}else{this.introtext.innerHTML="cinema matches for '<strong>"+_1c2+"</strong>':";this.outrotext.innerHTML="";}}});}if(!dojo._hasResource["movies.widget.LocationSelection"]){dojo._hasResource["movies.widget.LocationSelection"]=true;dojo.provide("movies.widget.LocationSelection");dojo.declare("movies.widget.LocationSelection",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"LocationSelection\" style=\"position: absolute;\">\n<div class=\"LocationSelectionShadow\">\n<div class=\"LocationSelection\">\n<p>locations matching '<span dojoAttachPoint=\"locationName\"></span>' - select a location</p>\n<ul dojoAttachPoint=\"locations\">\n</ul>\n</div>\n</div>\n</div>\n",currentItemIndex:null,previousItemIndex:null,parent:null,items:null,setParent:function(_1c5){this.parent=_1c5;},getValue:function(){if(this.currentItemIndex!=null){return (this.items[this.currentItemIndex]["locationname"]);}else{return (null);}},getLat:function(){if(this.currentItemIndex!=null){return (this.items[this.currentItemIndex]["lat"]);}else{return (null);}},getLong:function(){if(this.currentItemIndex!=null){return (this.items[this.currentItemIndex]["long"]);}else{return (null);}},moveToItemIndex:function(_1c6){_1c6=parseInt(_1c6);if(_1c6!=this.currentItemIndex){this.previousItemIndex=this.currentItemIndex;this.currentItemIndex=_1c6;if(this.previousItemIndex!=null){dojo.byId(this.id+"_item_"+this.previousItemIndex).className="";}dojo.byId(this.id+"_item_"+this.currentItemIndex).className="selected";}},moveToPreviousItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex-1;if(newIndex==-1){newIndex=this.items.length-1;}}this.moveToItemIndex(newIndex);},moveToNextItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex+1;if(newIndex==this.items.length){newIndex=0;}}this.moveToItemIndex(newIndex);},moveToFirstItem:function(){this.moveToItemIndex(0);},moveToLastItem:function(){this.moveToItemIndex(this.items.length-1);},mouseover:function(_1c7){idComponents=_1c7.currentTarget.id.split("_");this.moveToItemIndex(idComponents[3]);_1c7.stopPropagation();dojo.stopEvent(_1c7);},click:function(_1c8){idComponents=_1c8.currentTarget.id.split("_");this.parent.selectLocationFromLocationSelectList(this.items[idComponents[3]]["locationname"],this.items[idComponents[3]]["lat"],this.items[idComponents[3]]["long"]);this.parent.setValue(this.items[idComponents[3]]["locationname"]);_1c8.stopPropagation();},populate:function(_1c9,_1ca){this.previousItemIndex=null;this.currentItemIndex=null;this.items=_1ca;listElement=this.locations;numRows=listElement.childNodes.length;while(numRows>0){listElement.removeChild(listElement.childNodes[numRows-1]);numRows=listElement.childNodes.length;}for(index=0;index<_1ca.length;index++){if(index<10){itemElement=dojo.doc.createElement("li");itemElement.appendChild(dojo.doc.createTextNode(_1ca[index]["locationname"]));itemElement.setAttribute("id",this.id+"_item_"+index);dojo.connect(itemElement,"onmouseover",this,"mouseover");dojo.connect(itemElement,"onclick",this,"click");listElement.appendChild(itemElement);}}this.locationName.innerHTML=_1c9;}});}if(!dojo._hasResource["movies.widget.IncompletePostcode"]){dojo._hasResource["movies.widget.IncompletePostcode"]=true;dojo.provide("movies.widget.IncompletePostcode");dojo.declare("movies.widget.IncompletePostcode",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"IncompletePostcode\" style=\"position: absolute;\">\n<div class=\"IncompletePostcodeShadow\">\n<div class=\"IncompletePostcode\">\n<img src=\"http://web.orange.co.uk/images/furniture/movies/filmfinder/incompletepostcodespinner.gif\"/>\n<p>A list of nearby cinemas will appear here once you've put in your town or postcode</p>\n</div>\n</div>\n</div>\n\n",parent:null,setParent:function(_1cb){this.parent=_1cb;}});}if(!dojo._hasResource["movies.widget.InvalidPostcode"]){dojo._hasResource["movies.widget.InvalidPostcode"]=true;dojo.provide("movies.widget.InvalidPostcode");dojo.declare("movies.widget.InvalidPostcode",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"InvalidPostcode\" style=\"position: absolute;\">\n<div class=\"InvalidPostcodeShadow\">\n<div class=\"InvalidPostcode\">\n<p>Hmmm... we can't find a postcode or location matching '<span dojoAttachPoint=\"postcode\"></span>'</p>\n</div>\n</div>\n</div>\n\n",setPostcode:function(_1cc){this.postcode.innerHTML=_1cc;}});}if(!dojo._hasResource["movies.widget.EmptyPostcode"]){dojo._hasResource["movies.widget.EmptyPostcode"]=true;dojo.provide("movies.widget.EmptyPostcode");dojo.declare("movies.widget.EmptyPostcode",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"EmptyPostcode\" style=\"position: absolute;\">\n<div class=\"EmptyPostcodeShadow\">\n<div class=\"EmptyPostcode\">\n<p>Enter a town/city name or postcode here to select a cinema.</p>\n</div>\n</div>\n</div>\n\n"});}if(!dojo._hasResource["movies.widget.NoCinemasShowingFilm"]){dojo._hasResource["movies.widget.NoCinemasShowingFilm"]=true;dojo.provide("movies.widget.NoCinemasShowingFilm");dojo.declare("movies.widget.NoCinemasShowingFilm",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"NoCinemasShowingFilm\" style=\"position: absolute;\">\n<div class=\"NoCinemasShowingFilmShadow\">\n<div class=\"NoCinemasShowingFilm\">\n<p>Hmmm... we can't find any cinemas showing your selected film</p>\n</div>\n</div>\n</div>\n\n"});}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:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),_setDisabledAttr:function(_1cd){this.disabled=_1cd;dojo.attr(this.focusNode,"disabled",_1cd);dijit.setWaiState(this.focusNode,"disabled",_1cd);if(_1cd){this._hovering=false;this._active=false;this.focusNode.removeAttribute("tabIndex");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_1ce){dojo.deprecated("setDisabled("+_1ce+") is deprecated. Use attr('disabled',"+_1ce+") instead.","","2.0");this.attr("disabled",_1ce);},_scroll:true,_onFocus:function(e){if(this._scroll){dijit.scrollIntoView(this.domNode);}this.inherited(arguments);},_onMouse:function(_1d0){var _1d1=_1d0.currentTarget;if(_1d1&&_1d1.getAttribute){this.stateModifier=_1d1.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_1d0.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _1d2=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_1d2);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _1d3=this.baseClass.split(" ");function multiply(_1d4){_1d3=_1d3.concat(dojo.map(_1d3,function(c){return c+_1d4;}),"dijit"+_1d4);};if(this.checked){multiply("Checked");}if(this.state){multiply(this.state);}if(this.selected){multiply("Selected");}if(this.disabled){multiply("Disabled");}else{if(this.readOnly){multiply("ReadOnly");}else{if(this._active){multiply(this.stateModifier+"Active");}else{if(this._focused){multiply("Focused");}if(this._hovering){multiply(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_1d7={};dojo.forEach(tn.className.split(" "),function(c){_1d7[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _1d7[c];});}dojo.forEach(_1d3,function(c){_1d7[c]=true;});var _1db=[];for(var c in _1d7){_1db.push(c);}tn.className=_1db.join(" ");this._stateClasses=_1d3;},compare:function(val1,val2){if((typeof val1=="number")&&(typeof val2=="number")){return (isNaN(val1)&&isNaN(val2))?0:(val1-val2);}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_1df){},_onChangeActive:false,_handleOnChange:function(_1e0,_1e1){this._lastValue=_1e0;if(this._lastValueReported==undefined&&(_1e1===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_1e0;}if((this.intermediateChanges||_1e1||_1e1===undefined)&&((typeof _1e0!=typeof this._lastValueReported)||this.compare(_1e0,this._lastValueReported)!=0)){this._lastValueReported=_1e0;if(this._onChangeActive){this.onChange(_1e0);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._layoutHackHandle){clearTimeout(this._layoutHackHandle);}this.inherited(arguments);},setValue:function(_1e2){dojo.deprecated("dijit.form._FormWidget:setValue("+_1e2+") is deprecated.  Use attr('value',"+_1e2+") instead.","","2.0");this.attr("value",_1e2);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");},_layoutHack:function(){if(dojo.isFF==2&&!this._layoutHackHandle){var node=this.domNode;var old=node.style.opacity;node.style.opacity="0.999";this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){this._layoutHackHandle=null;node.style.opacity=old;}),0);}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.mixin(dojo.clone(dijit.form._FormWidget.prototype.attributeMap),{value:""}),postCreate:function(){if(dojo.isIE||dojo.isSafari){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_1e5,_1e6){this.value=_1e5;this._handleOnChange(_1e5,_1e6);},_getValueAttr:function(_1e7){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_valueChanged:function(){var v=this.attr("value");var lv=this._lastValueReported;return ((v!==null&&(v!==undefined)&&v.toString)?v.toString():"")!==((lv!==null&&(lv!==undefined)&&lv.toString)?lv.toString():"");},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}else{if(dojo.isSafari){te=document.createEvent("Events");te.initEvent("keypress",true,true);te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.target.dispatchEvent(te);}}}},_onKeyPress:function(e){if(e.charOrCode==dojo.keys.ESCAPE&&!e.ctrlKey&&!e.altKey&&this._valueChanged()){this.undo();dojo.stopEvent(e);return false;}else{if(this.intermediateChanges){var _1ed=this;setTimeout(function(){_1ed._handleOnChange(_1ed.attr("value"),false);},0);}}return true;}});}if(!dojo._hasResource["dijit.form.TextBox"]){dojo._hasResource["dijit.form.TextBox"]=true;dojo.provide("dijit.form.TextBox");dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",templateString:"<input class=\"dijit dijitReset dijitLeft\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse,onblur:_onMouse,onkeypress:_onKeyPress'\n\tautocomplete=\"off\" type=\"${type}\"\n\t/>\n",baseClass:"dijitTextBox",attributeMap:dojo.mixin(dojo.clone(dijit.form._FormValueWidget.prototype.attributeMap),{maxLength:"focusNode"}),_getValueAttr:function(){return this.parse(this.attr("displayedValue"),this.constraints);},_setValueAttr:function(_1ee,_1ef,_1f0){var _1f1;if(_1ee!==undefined){_1f1=this.filter(_1ee);if(_1f1!==null&&((typeof _1f1!="number")||!isNaN(_1f1))){if(typeof _1f0!="string"){_1f0=this.format(_1f1,this.constraints);}}else{_1f0="";}}if(_1f0!=null&&_1f0!=undefined){this.textbox.value=_1f0;}dijit.form.TextBox.superclass._setValueAttr.call(this,_1f1,_1ef);},displayedValue:"",getDisplayedValue:function(){dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.","","2.0");return this.attr("displayedValue");},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value);},setDisplayedValue:function(_1f2){dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");this.attr("displayedValue",_1f2);},_setDisplayedValueAttr:function(_1f3){this.textbox.value=_1f3;this._setValueAttr(this.attr("value"));},format:function(_1f4,_1f5){return ((_1f4==null||_1f4==undefined)?"":(_1f4.toString?_1f4.toString():_1f4));},parse:function(_1f6,_1f7){return _1f6;},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this._layoutHack();},filter:function(val){if(typeof val!="string"){return val;}if(this.trim){val=dojo.trim(val);}if(this.uppercase){val=val.toUpperCase();}if(this.lowercase){val=val.toLowerCase();}if(this.propercase){val=val.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});}return val;},_setBlurValue:function(){this._setValueAttr(this.attr("value"),(this.isValid?this.isValid():true));},_onBlur:function(){this._setBlurValue();this.inherited(arguments);}});dijit.selectInputText=function(_1fa,_1fb,stop){var _1fd=dojo.global;var _1fe=dojo.doc;_1fa=dojo.byId(_1fa);if(isNaN(_1fb)){_1fb=0;}if(isNaN(stop)){stop=_1fa.value?_1fa.value.length:0;}_1fa.focus();if(_1fe["selection"]&&dojo.body()["createTextRange"]){if(_1fa.createTextRange){var _1ff=_1fa.createTextRange();with(_1ff){collapse(true);moveStart("character",_1fb);moveEnd("character",stop);select();}}}else{if(_1fd["getSelection"]){var _200=_1fd.getSelection();if(_1fa.setSelectionRange){_1fa.setSelectionRange(_1fb,stop);}}}};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_202){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_202&&_202.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_206){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("|"),_206);};dojo.regexp.group=function(_209,_20a){return "("+(_20a?"?:":"")+_209+")";};}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_20c,_20d){var c=document.cookie;if(arguments.length==1){var _20f=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));return _20f?decodeURIComponent(_20f[1]):undefined;}else{_20d=_20d||{};var exp=_20d.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_20d.expires=d;}if(exp&&exp.toUTCString){_20d.expires=exp.toUTCString();}_20c=encodeURIComponent(_20c);var _212=name+"="+_20c,_213;for(_213 in _20d){_212+="; "+_213;var _214=_20d[_213];if(_214!==true){_212+="="+_214;}}document.cookie=_212;}};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};}if(!dojo._hasResource["movies.widget.LocationSearchAndCinemaSelection"]){dojo._hasResource["movies.widget.LocationSearchAndCinemaSelection"]=true;dojo.provide("movies.widget.LocationSearchAndCinemaSelection");dojo.declare("movies.widget.LocationSearchAndCinemaSelection",[dijit.form.TextBox],{_validLocationSelected:false,_cinemaSelectWidget:null,_brandSelectWidget:null,_incompletePostcodeWidget:null,_invalidPostcodeWidget:null,_emptyPostcodeWidget:null,_locationSelectWidget:null,_noCinemasShowingFilmWidget:null,_activeChildWidget:null,_lastActiveChildWidget:null,maxLength:50,searchDelay:230,defaultValue:"town or postcode",_cinemaCode:null,_lat:null,_lng:null,_locationname:null,_lastCinemaLocation:null,_locationXhr:null,_cinemaXhr:null,_parent:null,startup:function(){var _215=dojo.cookie("locationname");if(_215==undefined||_215=="null"){this.setValue(this.defaultValue);this._locationname=dojo.cookie("locationname");}else{this.textbox.style.color="#333";this.setValue(_215);this._lat=dojo.cookie("lat");this._lng=dojo.cookie("long");}var _216=this.id+"_brandselect";this._brandSelectWidget=new movies.widget.BrandSelect({id:_216});this._brandSelectWidget.setParent(this);var _217=this.id+"_cinemaselect";this._cinemaSelectWidget=new movies.widget.CinemaSelection({id:_217});this._cinemaSelectWidget.setParent(this);var _218=this.id+"_incompletepostcode";this._incompletePostcodeWidget=new movies.widget.IncompletePostcode({id:_218});this._incompletePostcodeWidget.setParent(this);var _219=this.id+"_invalidpostcode";this._invalidPostcodeWidget=new movies.widget.InvalidPostcode({id:_219});var _21a=this.id+"_emptypostcode";this._emptyPostcodeWidget=new movies.widget.EmptyPostcode({id:_21a});var _21b=this.id+"_locationselect";this._locationSelectWidget=new movies.widget.LocationSelection({id:_21b});this._locationSelectWidget.setParent(this);var _21c=this.id+"_nocinemasshowingfilm";this._noCinemasShowingFilmWidget=new movies.widget.NoCinemasShowingFilm({id:_21c});},makeLocationXhrCall:function(_21d){this._locationXhr=dojo.xhrGet(_21d);},makeCinemaXhrCall:function(_21e){this._cinemaXhr=dojo.xhrGet(_21e);},setParent:function(_21f){this._parent=_21f;},getFilmCode:function(){return this._parent.getFilmCode();},getLocationName:function(){return this._locationname;},getLat:function(){return this._lat;},getLong:function(){return this._lng;},_onBlur:function(){if(this._cinemaXhr){this._cinemaXhr.cancel();}if(this._locationXhr){this._locationXhr.cancel();}if(this.getValue()==""){this.setValue(this.defaultValue);this.textbox.style.color="#999";}this._closeCurrentPopup();},_onFocus:function(){this.textbox.style.color="#333";if(this.getValue()==this.defaultValue){this.setValue("");this.textbox.focus();}if(this._lastActiveChildWidget){this._displayPopup(this._lastActiveChildWidget);}this._startSearchFromInput();},_onKeyPress:function(evt){var key=evt.charOrCode;if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){return;}doSearch=false;switch(evt.keyCode){case dojo.keys.ESCAPE:this._closeCurrentPopup();break;case dojo.keys.TAB:if(evt.shiftKey){this._parent.focusFilmSelection();return;}case dojo.keys.ENTER:dojo.stopEvent(evt);if(this._activeChildWidget=="cinemaselect"&&this._cinemaSelectWidget.currentItemIndex!=null){cinemaInfo=this._cinemaSelectWidget.getCinemaNameAndCode();if(cinemaInfo!=null){this.selectCinemaFromCinemaSelectList(cinemaInfo["cinemaname"],cinemaInfo["cinemacode"]);}this._parent.focusSubmitButton();}else{if(this._activeChildWidget=="locationselect"&&this._locationSelectWidget.currentItemIndex!=null){this.selectLocationFromLocationSelectList(this._locationSelectWidget.getValue(),this._locationSelectWidget.getLat(),this._locationSelectWidget.getLong());this.setValue(this._locationSelectWidget.getValue());}else{if(this._activeChildWidget=="brandselect"&&this._brandSelectWidget.currentItemIndex!=null){cinemaInfo=this._brandSelectWidget.getCinemaNameAndCode();if(cinemaInfo!=null){this.selectCinemaFromCinemaSelectList(cinemaInfo["cinemaname"],cinemaInfo["cinemacode"]);}this._parent.focusSubmitButton();}else{return true;}}}break;case dojo.keys.UP_ARROW:dojo.stopEvent(evt);if(this._activeChildWidget=="cinemaselect"){this._cinemaSelectWidget.moveToPreviousItem();cinemaInfo=this._cinemaSelectWidget.getCinemaNameAndCode();if(cinemaInfo!=null){this.setValue(cinemaInfo["cinemaname"]);}}else{if(this._activeChildWidget=="locationselect"){this._locationSelectWidget.moveToPreviousItem();this.setValue(this._locationSelectWidget.getValue());}else{if(this._activeChildWidget=="brandselect"){this._brandSelectWidget.moveToPreviousItem();cinemaInfo=this._brandSelectWidget.getCinemaNameAndCode();if(cinemaInfo!=null){this.setValue(cinemaInfo["cinemaname"]);}}}}break;case dojo.keys.DOWN_ARROW:dojo.stopEvent(evt);if(this._activeChildWidget=="cinemaselect"){this._cinemaSelectWidget.moveToNextItem();cinemaInfo=this._cinemaSelectWidget.getCinemaNameAndCode();if(cinemaInfo!=null){this.setValue(cinemaInfo["cinemaname"]);}}else{if(this._activeChildWidget=="locationselect"){this._locationSelectWidget.moveToNextItem();this.setValue(this._locationSelectWidget.getValue());}else{if(this._activeChildWidget=="brandselect"){this._brandSelectWidget.moveToNextItem();cinemaInfo=this._brandSelectWidget.getCinemaNameAndCode();if(cinemaInfo!=null){this.setValue(cinemaInfo["cinemaname"]);}}}}break;case dojo.keys.LEFT_ARROW:case dojo.keys.RIGHT_ARROW:break;case dojo.keys.PAGE_UP:dojo.stopEvent(evt);if(this._activeChildWidget=="cinemaselect"){this._cinemaSelectWidget.moveToFirstItem();}if(this._activeChildWidget=="locationselect"){this._locationSelectWidget.moveToFirstItem();}break;case dojo.keys.PAGE_DOWN:dojo.stopEvent(evt);if(this._activeChildWidget=="cinemaselect"){this._cinemaSelectWidget.moveToLastItem();}if(this._activeChildWidget=="locationselect"){this._locationSelectWidget.moveToLastItem();}break;default:if(dojo.isIE||evt.charCode!=0){doSearch=true;}if((evt.keyCode==dojo.keys.DELETE)||(evt.keyCode==dojo.keys.BACKSPACE)){doSearch=true;}break;}if(this.searchTimer){clearTimeout(this.searchTimer);}if(doSearch){this._cinemaCode=null;this._lat=null;this._lng=null;this.searchTimer=setTimeout(dojo.hitch(this,this._startSearchFromInput),this.searchDelay);}},_startSearchFromInput:function(){this._parent.loadCss();if(this._cinemaCode==null){val=this.focusNode.value;if(val.length>0){if(val.length<3){this._displayPopup("incompletepostcode");}else{if(this._locationXhr){this._locationXhr.cancel();}this._locationXhr=this.makeLocationXhrCall({url:"/movies/ajax.php?rm=LocationsByStartsWith&q="+this.getValue(),handleAs:"json",timeout:2000,load:dojo.hitch(this,function(_222,_223){if(_222["brand_match"]=="true"){this._brandSelectWidget.populate(this.getValue(),_222["items"],_222["exact_brand"]);this._displayPopup("brandselect");}else{var _224=_222["items"];if(_224.length>0){if(_224.length==1){if(!((_224[0]["locationname"].toLowerCase()==this._lastCinemaLocation)&&(this._activeChildWidget=="cinemaselect"))){this._lastCinemaLocation=_224[0]["locationname"].toLowerCase();this.selectLocationFromLocationSelectList(_224[0]["locationname"],_224[0]["lat"],_224[0]["long"]);}}else{this._locationSelectWidget.populate(this.getValue(),_224);this._displayPopup("locationselect");}}else{this._invalidPostcodeWidget.setPostcode(dojo.trim(this.getValue()));this._displayPopup("invalidpostcode");}}}),error:dojo.hitch(this,function(_225,_226){})});}}else{this._closeCurrentPopup();}}},_displayPopup:function(name){this._closeCurrentPopup();if(this._activeChildWidget!=name){switch(name){case "brandselect":this._locationname="";this._lat="";this._lon="";dijit.popup.open({popup:this._brandSelectWidget,around:this.domNode,parent:this});break;case "cinemaselect":dijit.popup.open({popup:this._cinemaSelectWidget,around:this.domNode,parent:this});break;case "incompletepostcode":this._incompletePostcodeWidget.startup();dijit.popup.open({popup:this._incompletePostcodeWidget,around:this.domNode,parent:this});break;case "invalidpostcode":dijit.popup.open({popup:this._invalidPostcodeWidget,around:this.domNode,parent:this});break;case "emptypostcode":dijit.popup.open({popup:this._emptyPostcodeWidget,around:this.domNode,parent:this});break;case "locationselect":dijit.popup.open({popup:this._locationSelectWidget,around:this.domNode,parent:this});break;case "nocinemasshowingfilm":dijit.popup.open({popup:this._noCinemasShowingFilmWidget,around:this.domNode,parent:this});break;}this._activeChildWidget=name;}},_closeCurrentPopup:function(){if(this._activeChildWidget=="cinemaselect"){this._lastActiveChildWidget="cinemaselect";dijit.popup.close(this._cinemaSelectWidget);}if(this._activeChildWidget=="brandselect"){this._lastActiveChildWidget="brandselect";dijit.popup.close(this._brandSelectWidget);}if(this._activeChildWidget=="incompletepostcode"){dijit.popup.close(this._incompletePostcodeWidget);}if(this._activeChildWidget=="invalidpostcode"){dijit.popup.close(this._invalidPostcodeWidget);}if(this._activeChildWidget=="emptypostcode"){dijit.popup.close(this._emptyPostcodeWidget);}if(this._activeChildWidget=="locationselect"){dijit.popup.close(this._locationSelectWidget);}if(this._activeChildWidget=="nocinemasshowingfilm"){dijit.popup.close(this._noCinemasShowingFilmWidget);}this._activeChildWidget=null;},closeDropdowns:function(){this._closeCurrentPopup();},selectLocationFromLocationSelectList:function(_228,lat,lng){this._lat=lat;this._lng=lng;this._locationname=_228;if(this._cinemaXhr){this._cinemaXhr.cancel();}filmCode=this.getFilmCode();theUrl="/movies/ajax.php?rm=CinemasByLocation&lat="+lat+"&long="+lng;if(filmCode){theUrl+="&filmcode="+filmCode;searchScope="your selected movie";}else{searchScope="any movies";}this._cinemaXhr=this.makeCinemaXhrCall({url:theUrl,handleAs:"json",timeout:2000,load:dojo.hitch(this,function(_22b,_22c){var _22d=_22b["items"];if(_22d.length>0){if(_228.indexOf(",")>-1){locationNameElements=_228.split(",");_228=locationNameElements[0];}this._cinemaSelectWidget.populate(_228,searchScope,lat,lng,_22d);this._displayPopup("cinemaselect");this._validLocationSelected=true;}else{this._displayPopup("nocinemasshowingfilm");}}),error:dojo.hitch(this,function(_22e,_22f){})});this.textbox.focus();},selectCinemaFromCinemaSelectList:function(_230,_231){this.setValue(_230);this._cinemaCode=_231;this._closeCurrentPopup();},getCinemaName:function(){var _232;if(this.getValue()==this.defaultValue){_232="";}else{_232=this.getValue();}return _232;},getCinemaCode:function(){return this._cinemaCode;},notifyEntryRequired:function(){this.textbox.focus();if((this.getValue()=="")||(this.getValue()==this.defaultValue)){this._displayPopup("emptypostcode");}},getDomainPrefix:function(){return (this._parent.getDomainPrefix());}});}if(!dojo._hasResource["movies.widget.NoMatchingFilms"]){dojo._hasResource["movies.widget.NoMatchingFilms"]=true;dojo.provide("movies.widget.NoMatchingFilms");dojo.declare("movies.widget.NoMatchingFilms",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"NoMatchingFilms\" style=\"position: absolute;\">\n<div class=\"NoMatchingFilmsShadow\">\n<div class=\"NoMatchingFilms\">\n<p>No matching films found. Why not try browsing by what's new?</p>\n<p class=\"otheroptions\"><a dojoAttachEvent='onclick:displayLatest' href=\"\">show all latest releases</a></p>\n</div>\n</div>\n</div>\n",parent:null,setParent:function(_233){this.parent=_233;},displayLatest:function(evt){this.parent._displayLatestFilmsPopup();dojo.stopEvent(evt);}});}if(!dojo._hasResource["movies.widget.MatchingFilms"]){dojo._hasResource["movies.widget.MatchingFilms"]=true;dojo.provide("movies.widget.MatchingFilms");dojo.declare("movies.widget.MatchingFilms",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"MatchingFilms\" style=\"position: absolute;\">\n<div class=\"MatchingFilmsShadow\">\n<div class=\"MatchingFilms\">\n<h2 dojoAttachPoint=\"popuptitle\" dojoAttachEvent=\"onclick:close\">choose a movie:</h2>\n<ul dojoAttachPoint=\"films\">\n</ul>\n<p class=\"otheroptions\" dojoAttachPoint=\"otheroptions\"></p>\n</div>\n</div>\n</div>\n",currentItemIndex:null,previousItemIndex:null,parent:null,items:null,ignorevenue:false,setIgnoreVenue:function(_235){this.ignorevenue=_235;},setParent:function(_236){this.parent=_236;},setPopupTitle:function(_237){this.popuptitle.innerHTML=_237;},close:function(){this.parent._closeCurrentPopup();},getValue:function(){if(this.currentItemIndex!=null){return (this.items[this.currentItemIndex]["filmname"]);}else{return (null);}},moveToItemIndex:function(_238){_238=parseInt(_238);if(_238!=this.currentItemIndex){this.previousItemIndex=this.currentItemIndex;this.currentItemIndex=_238;if(this.previousItemIndex!=null){dojo.byId(this.id+"_item_"+this.previousItemIndex).className="";}dojo.byId(this.id+"_item_"+this.currentItemIndex).className="selected";}},moveToPreviousItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex-1;if(newIndex==-1){newIndex=this.items.length-1;}}this.moveToItemIndex(newIndex);},moveToNextItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex+1;if(newIndex==this.items.length){newIndex=0;}}this.moveToItemIndex(newIndex);},moveToFirstItem:function(){this.moveToItemIndex(0);},moveToLastItem:function(){this.moveToItemIndex(this.items.length-1);},mouseover:function(_239){idComponents=_239.currentTarget.id.split("_");this.moveToItemIndex(idComponents[3]);_239.stopPropagation();dojo.stopEvent(_239);},click:function(_23a){idComponents=_23a.currentTarget.id.split("_");this.parent.selectFilmFromMatchingFilmsList(this.items[idComponents[3]]["filmname"],this.items[idComponents[3]]["filmcode"],this.items[idComponents[3]]["filmreadableid"]);_23a.stopPropagation();},getFilmNameAndCode:function(){if(this.currentItemIndex!=null){var _23b=new Array();_23b=new Array();_23b["filmname"]=this.items[this.currentItemIndex]["filmname"];_23b["filmcode"]=this.items[this.currentItemIndex]["filmcode"];_23b["filmreadableid"]=this.items[this.currentItemIndex]["filmreadableid"];return (_23b);}else{return (null);}},populate:function(_23c){this.previousItemIndex=null;this.currentItemIndex=null;this.items=_23c;listElement=this.films;numRows=listElement.childNodes.length;while(numRows>0){listElement.removeChild(listElement.childNodes[numRows-1]);numRows=listElement.childNodes.length;}for(index=0;index<_23c.length&&index<10;index++){itemElement=dojo.doc.createElement("li");itemElement.appendChild(dojo.doc.createTextNode(_23c[index]["filmname"]));itemElement.setAttribute("id",this.id+"_item_"+index);dojo.connect(itemElement,"onmouseover",this,"mouseover");dojo.connect(itemElement,"onclick",this,"click");listElement.appendChild(itemElement);}if(this.otheroptions.childNodes.length){this.otheroptions.removeChild(this.otheroptions.childNodes[0]);}var _23d=this.parent.getCinemaCode();if(_23c.length>10&&_23d){itemElement=dojo.doc.createElement("a");itemElement.appendChild(dojo.doc.createTextNode("browse all films at this cinema"));itemElement.setAttribute("href",this.parent.getDomainPrefix()+"/p/film/cinema/"+_23d);this.otheroptions.appendChild(itemElement);}else{if(this.ignorevenue==true){itemElement=dojo.doc.createElement("a");itemElement.appendChild(dojo.doc.createTextNode("only show films on at this cinema"));dojo.connect(itemElement,"onclick",this,"displayCinemaFilms");itemElement.setAttribute("href","");this.otheroptions.appendChild(itemElement);}else{if(_23d){itemElement=dojo.doc.createElement("a");itemElement.appendChild(dojo.doc.createTextNode("show box office favourites"));dojo.connect(itemElement,"onclick",this,"displayTopMovies");itemElement.setAttribute("href","");this.otheroptions.appendChild(itemElement);}else{itemElement=dojo.doc.createElement("a");itemElement.appendChild(dojo.doc.createTextNode("show all latest releases"));dojo.connect(itemElement,"onclick",this,"displayLatest");itemElement.setAttribute("href","");this.otheroptions.appendChild(itemElement);}}}},displayTopMovies:function(evt){this.parent._showTopFilms(true);dojo.stopEvent(evt);},displayLatest:function(evt){this.parent._displayLatestFilmsPopup();dojo.stopEvent(evt);},displayCinemaFilms:function(evt){this.parent._showTopFilms(false);dojo.stopEvent(evt);}});}if(!dojo._hasResource["movies.widget.LatestFilms"]){dojo._hasResource["movies.widget.LatestFilms"]=true;dojo.provide("movies.widget.LatestFilms");dojo.declare("movies.widget.LatestFilms",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"LatestFilms\" style=\"position: absolute;\">\n<div class=\"LatestFilmsShadow\">\n    <div class=\"LatestFilms\">\n        <h2 dojoAttachPoint=\"popuptitle\" dojoAttachEvent=\"click: close\">latest releases - choose a movie:</h2>\n        <ul dojoAttachPoint=\"films\">\n        </ul>\n    </div>\n</div>\n",currentItemIndex:null,previousItemIndex:null,parent:null,items:null,setParent:function(_241){this.parent=_241;},setPopupTitle:function(_242){this.popuptitle.innerHTML=_242;},close:function(){this.parent._closeCurrentPopup();},getValue:function(){if(this.currentItemIndex!=null){return (this.items[this.currentItemIndex]["filmname"]);}else{return (null);}},moveToItemIndex:function(_243){_243=parseInt(_243);if(_243!=this.currentItemIndex){this.previousItemIndex=this.currentItemIndex;this.currentItemIndex=_243;if(this.previousItemIndex!=null){dojo.byId(this.id+"_item_"+this.previousItemIndex).className="";}dojo.byId(this.id+"_item_"+this.currentItemIndex).className="selected";}},moveToPreviousItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex-1;if(newIndex==-1){newIndex=this.items.length-1;}}this.moveToItemIndex(newIndex);},moveToNextItem:function(){newIndex=0;if(this.currentItemIndex!=null){newIndex=this.currentItemIndex+1;if(newIndex==this.items.length){newIndex=0;}}this.moveToItemIndex(newIndex);},moveToFirstItem:function(){this.moveToItemIndex(0);},moveToLastItem:function(){this.moveToItemIndex(this.items.length-1);},mouseover:function(_244){idComponents=_244.currentTarget.id.split("_");this.moveToItemIndex(idComponents[3]);_244.stopPropagation();},click:function(_245){idComponents=_245.currentTarget.id.split("_");if(idComponents.length>1){this.parent.selectFilmFromMatchingFilmsList(this.items[idComponents[3]]["filmname"],this.items[idComponents[3]]["filmcode"],this.items[idComponents[3]]["filmreadableid"]);}else{this.parent._showTopFilms();}_245.stopPropagation();},getFilmNameAndCode:function(){if(this.currentItemIndex!=null){var _246=new Array();_246=new Array();_246["filmname"]=this.items[this.currentItemIndex]["filmname"];_246["filmcode"]=this.items[this.currentItemIndex]["filmcode"];_246["filmreadableid"]=this.items[this.currentItemIndex]["filmreadableid"];return (_246);}else{return (null);}},populate:function(_247){this.previousItemIndex=null;this.currentItemIndex=null;this.items=_247;listElement=this.films;numRows=listElement.childNodes.length;while(numRows>0){listElement.removeChild(listElement.childNodes[numRows-1]);numRows=listElement.childNodes.length;}if(_247.length){for(index=0;index<_247.length;index++){itemElement=dojo.doc.createElement("li");itemElement.appendChild(dojo.doc.createTextNode(_247[index]["filmname"]));itemElement.setAttribute("id",this.id+"_item_"+index);dojo.connect(itemElement,"onmouseover",this,"mouseover");dojo.connect(itemElement,"onclick",this,"click");listElement.appendChild(itemElement);}}else{itemElement=dojo.doc.createElement("li");itemElement.appendChild(dojo.doc.createTextNode("Sorry, there are no latest release to show"));dojo.connect(itemElement,"onclick",this,"click");listElement.appendChild(itemElement);}}});}if(!dojo._hasResource["movies.widget.EmptyFilm"]){dojo._hasResource["movies.widget.EmptyFilm"]=true;dojo.provide("movies.widget.EmptyFilm");dojo.declare("movies.widget.EmptyFilm",[dijit._Widget,dijit._Templated],{templateString:"<div id=\"EmptyFilm\" style=\"position: absolute;\">\n<div class=\"EmptyFilmShadow\">\n<div class=\"EmptyFilm\">\n<p>Enter a film name here.</p>\n<p class=\"otheroptions\"><a dojoAttachEvent='onclick:displayLatest' href=\"\">show all latest releases</a></p>\n</div>\n</div>\n</div>\n\n",_parent:null,setParent:function(_248){this._parent=_248;},displayLatest:function(evt){this._parent._displayLatestFilmsPopup();dojo.stopEvent(evt);}});}if(!dojo._hasResource["movies.widget.FilmSelection"]){dojo._hasResource["movies.widget.FilmSelection"]=true;dojo.provide("movies.widget.FilmSelection");dojo.declare("movies.widget.FilmSelection",[dijit.form.TextBox],{_validLocationSelected:false,_matchingFilmsWidget:null,_noMatchingFilmsWidget:null,_latestFilmsWidget:null,_emptyFilmWidget:null,_activeChildWidget:null,maxLength:30,searchDelay:200,defaultValue:"enter film here",_filmCode:null,_filmReadableId:null,_parent:null,_filmXhr:null,_option:null,_hasDropdownButton:true,templateString:"<table class=\"FilmSelection\" width=\"202\"><tr><td width=\"171\"><input class=\"\" dojoAttachPoint='textbox,focusNode' name=\"${name}\"\n\tdojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse,onfocus:_onMouse, onblur:_onMouse,onkeypress:_onKeyPress'\n\tautocomplete=\"off\"\n\t/></td><td width=\"31\"><img dojoAttachEvent=\"onclick:_toggleDropdown\" src=\"/images/furniture/movies/filmfinder/filmcomborightoff.gif\" dojoAttachPoint=\"dropdownbutton\"/></td></tr></table>\n",startup:function(){if(dojo.query("#film_finder_film_text")[0]){this.setValue(dojo.query("#film_finder_film_text")[0].value);this.textbox.style.color="#333";this._filmCode=dojo.query("#film_finder_film_code")[0].value;this._filmReadableId=dojo.query("#film_finder_film_id")[0].value;}else{this.setValue(this.defaultValue);}var _24a=this.id+"_nomatchingfilms";this._noMatchingFilmsWidget=new movies.widget.NoMatchingFilms({id:_24a});this._noMatchingFilmsWidget.setParent(this);var _24b=this.id+"_matchingfilms";this._matchingFilmsWidget=new movies.widget.MatchingFilms({id:_24b});this._matchingFilmsWidget.setParent(this);var _24c=this.id+"_latestfilms";this._latestFilmsWidget=new movies.widget.LatestFilms({id:_24c});this._latestFilmsWidget.setParent(this);var _24d=this.id+"_emptyfilm";this._emptyFilmWidget=new movies.widget.EmptyFilm({id:_24d});this._emptyFilmWidget.setParent(this);},makeXhrCall:function(_24e){this._filmXhr=dojo.xhrGet(_24e);},setParent:function(_24f){this._parent=_24f;},_onBlur:function(){if(this._filmXhr){this._filmXhr.cancel();}if(this.getValue()==""){this.setValue(this.defaultValue);this.textbox.style.color="#999";}this._closeCurrentPopup();},_onFocus:function(){this._startSearchFromInput();},_onMouse:function(evt){if(evt.type=="focus"){this.textbox.style.color="#333";if(this.getValue()==this.defaultValue){this.setValue("");}}},_onKeyPress:function(evt){var key=evt.charOrCode;if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){return;}doSearch=false;switch(evt.keyCode){case dojo.keys.ESCAPE:this._closeCurrentPopup();break;case dojo.keys.ENTER:case dojo.keys.TAB:dojo.stopEvent(evt);if(this._activeChildWidget=="matchingfilms"||this._activeChildWidget=="topmovies"){filmInfo=this._matchingFilmsWidget.getFilmNameAndCode();if(filmInfo!=null){this.setValue(filmInfo["filmname"]);this._filmCode=filmInfo["filmcode"];this._filmReadableId=filmInfo["filmreadableid"];this._parent.focusLocationSearchAndCinemaSelection();}this._closeCurrentPopup();}else{if(this._activeChildWidget=="latestfilms"){filmInfo=this._latestFilmsWidget.getFilmNameAndCode();if(filmInfo!=null){this.setValue(filmInfo["filmname"]);this._filmCode=filmInfo["filmcode"];this._filmReadableId=filmInfo["filmreadableid"];this._parent.focusLocationSearchAndCinemaSelection();}this._closeCurrentPopup();}else{if(!evt.shiftKey&&dojo.keys.TAB){this._parent.focusLocationSearchAndCinemaSelection();}}}break;case dojo.keys.UP_ARROW:dojo.stopEvent(evt);if(this._activeChildWidget=="matchingfilms"||this._activeChildWidget=="topmovies"){this._matchingFilmsWidget.moveToPreviousItem();filmInfo=this._matchingFilmsWidget.getFilmNameAndCode();if(filmInfo!=null){this.setValue(filmInfo["filmname"]);this._filmCode=filmInfo["filmcode"];this._filmReadableId=filmInfo["filmreadableid"];}}if(this._activeChildWidget=="latestfilms"){this._latestFilmsWidget.moveToPreviousItem();filmInfo=this._latestFilmsWidget.getFilmNameAndCode();if(filmInfo!=null){this.setValue(filmInfo["filmname"]);this._filmCode=filmInfo["filmcode"];this._filmReadableId=filmInfo["filmreadableid"];}}break;case dojo.keys.DOWN_ARROW:dojo.stopEvent(evt);if(this._activeChildWidget=="matchingfilms"||this._activeChildWidget=="topmovies"){this._matchingFilmsWidget.moveToNextItem();filmInfo=this._matchingFilmsWidget.getFilmNameAndCode();if(filmInfo!=null){this.setValue(filmInfo["filmname"]);}}if(this._activeChildWidget=="latestfilms"){this._latestFilmsWidget.moveToNextItem();filmInfo=this._latestFilmsWidget.getFilmNameAndCode();if(filmInfo!=null){this.setValue(filmInfo["filmname"]);}}break;case dojo.keys.LEFT_ARROW:case dojo.keys.RIGHT_ARROW:break;case dojo.keys.PAGE_UP:dojo.stopEvent(evt);if(this._activeChildWidget=="matchingfilms"||this._activeChildWidget=="topmovies"){this._matchingFilmsWidget.moveToFirstItem();}if(this._activeChildWidget=="latestfilms"){this._matchingFilmsWidget.moveToFirstItem();}break;case dojo.keys.PAGE_DOWN:dojo.stopEvent(evt);if(this._activeChildWidget=="matchingfilms"||this._activeChildWidget=="topmovies"){this._matchingFilmsWidget.moveToLastItem();}if(this._activeChildWidget=="latestfilms"){this._latestFilmsWidget.moveToLastItem();}break;default:if(dojo.isIE||evt.charCode!=0){doSearch=true;}if((evt.keyCode==dojo.keys.DELETE)||(evt.keyCode==dojo.keys.BACKSPACE)){doSearch=true;}break;}if(this.searchTimer){clearTimeout(this.searchTimer);}if(doSearch){this._filmCode=null;this._filmReadableId=null;this.searchTimer=setTimeout(dojo.hitch(this,this._startSearchFromInput),this.searchDelay);}},_showTopFilms:function(_253){cinemaCode=this.getCinemaCode();if(cinemaCode&&!_253){theUrl="/movies/ajax.php?rm=MoviesByVenueIdAndContains&venueid="+cinemaCode;}else{theUrl="/movies/ajax.php?rm=TopMovies";}if(this._filmXhr){this._filmXhr.cancel();}this._filmXhr=this.makeXhrCall({url:theUrl,handleAs:"json",timeout:2000,load:dojo.hitch(this,function(_254,_255){var _256=_254["items"];if(_256.length>0){if(_253){var _257="novenue";}this._matchingFilmsWidget.populate(_256);this._displayPopup("topmovies",_257);}else{this._displayPopup("nomatchingfilms");}}),error:dojo.hitch(this,function(_258,_259){})});},_startSearchFromInput:function(){this._parent.loadCss();if((this.getValue()!="")&&(this.getValue()!=this.defaultValue)){cinemaCode=this.getCinemaCode();if(cinemaCode){theUrl="/movies/ajax.php?rm=MoviesByVenueIdAndContains&q="+this.getValue()+"&venueid="+cinemaCode;}else{theUrl="/movies/ajax.php?rm=MoviesByContains&q="+this.getValue();}if(this._filmXhr){this._filmXhr.cancel();}this._filmXhr=this.makeXhrCall({url:theUrl,handleAs:"json",timeout:2000,load:dojo.hitch(this,function(_25a,_25b){var _25c=_25a["items"];if(_25c.length>0){this._matchingFilmsWidget.populate(_25c);this._displayPopup("matchingfilms");}else{this._displayPopup("nomatchingfilms");}}),error:dojo.hitch(this,function(_25d,_25e){})});}else{this._closeCurrentPopup();}},_displayPopup:function(name,_260){var _261=null;this._closeCurrentPopup();if(this._activeChildWidget!=name||_260!=this._option){switch(name){case "nomatchingfilms":dijit.popup.open({popup:this._noMatchingFilmsWidget,around:this.domNode,parent:this});break;case "topmovies":_261="box office favourites:";this.textbox.focus();case "matchingfilms":if(this.getCinemaCode()&&_260!="novenue"){_261="now showing at your cinema:";}else{if(!_261){_261="choose a movie:";}}if(_260=="novenue"){this._matchingFilmsWidget.setIgnoreVenue(true);}else{this._matchingFilmsWidget.setIgnoreVenue(false);}this._matchingFilmsWidget.setPopupTitle(_261);dijit.popup.open({popup:this._matchingFilmsWidget,around:this.domNode,parent:this});break;case "latestfilms":_261="latest releases - choose a movie:";this._latestFilmsWidget.setPopupTitle(_261);dijit.popup.open({popup:this._latestFilmsWidget,around:this.domNode,parent:this});break;case "emptyfilm":dijit.popup.open({popup:this._emptyFilmWidget,around:this.domNode,parent:this});break;}this._activeChildWidget=name;this._option=_260;}if(this._hasDropdownButton){this.dropdownbutton.setAttribute("src","/images/furniture/movies/filmfinder/filmcomborighton.gif");}},_closeCurrentPopup:function(){if((this._activeChildWidget)&&(this._hasDropdownButton)){this.dropdownbutton.setAttribute("src","/images/furniture/movies/filmfinder/filmcomborightoff.gif");}if(this._activeChildWidget=="nomatchingfilms"){dijit.popup.close(this._noMatchingFilmsWidget);}if(this._activeChildWidget=="matchingfilms"||this._activeChildWidget=="topmovies"){dijit.popup.close(this._matchingFilmsWidget);}if(this._activeChildWidget=="latestfilms"){dijit.popup.close(this._latestFilmsWidget);}if(this._activeChildWidget=="emptyfilm"){dijit.popup.close(this._emptyFilmWidget);}this._activeChildWidget=null;},_displayLatestFilmsPopup:function(){this.setValue("");theUrl="/movies/ajax.php?rm=LatestReleases";this.makeXhrCall({url:theUrl,handleAs:"json",timeout:2000,load:dojo.hitch(this,function(_262,_263){var _264=_262["items"];this._latestFilmsWidget.populate(_264);this._displayPopup("latestfilms");}),error:dojo.hitch(this,function(_265,_266){})});this.textbox.focus();},performPostFilmSelectionAction:function(){this._parent.focusLocationSearchAndCinemaSelection();},selectFilmFromMatchingFilmsList:function(_267,_268,_269){this._closeCurrentPopup();this._filmCode=_268;this._filmReadableId=_269;this.setValue(_267);this.performPostFilmSelectionAction();},_toggleDropdown:function(evt){if(!this._activeChildWidget){if((this.getValue()!="")&&(this.getValue()!=this.defaultValue)){this._startSearchFromInput();}else{this._showTopFilms(false);}}else{this._closeCurrentPopup();}},closeDropdowns:function(){this._closeCurrentPopup();},getFilmName:function(){var _26b;if(this.getValue()==this.defaultValue){_26b="";}else{_26b=this.getValue();}return (_26b);},getFilmCode:function(){return (this._filmCode);},getFilmReadableId:function(){return (this._filmReadableId);},getCinemaCode:function(){return (this._parent.getCinemaCode());},notifyEntryRequired:function(){this.textbox.focus();if((this.getValue()=="")||(this.getValue()==this.defaultValue)){this._displayPopup("emptyfilm");}},getDomainPrefix:function(){return (this._parent.getDomainPrefix());}});}if(!dojo._hasResource["movies.widget.FilmFinder"]){dojo._hasResource["movies.widget.FilmFinder"]=true;dojo.provide("movies.widget.FilmFinder");dojo.declare("movies.widget.FilmFinder",[dijit._Widget,dijit._Templated],{widgetsInTemplate:true,idLikeToSeeValid:false,locationValid:false,templateString:"<div>\n    <div class=\"FilmFinder\">\n        <form method=\"get\" action=\"\" dojoAttachPoint=\"form\">\n            <fieldset>\n                <label id=\"idliketoseelabel\" for=\"idliketosee\">I&rsquo;d like to see</label>\n                <div class=\"leftfloater\"><div id=\"filmselectioncontainer\"><input dojoType=\"movies.widget.FilmSelection\" id=\"idliketosee\" name=\"idliketosee\" dojoAttachPoint=\"filmSelection\"/></div></div>\n                <label id=\"locationlabel\" for=\"location\">at</label>\n                <div class=\"leftfloater\"><div id=\"locationselectioncontainer\"><input dojoType=\"movies.widget.LocationSearchAndCinemaSelection\" id=\"location\" name=\"location\" dojoAttachPoint=\"locationSearchAndCinemaSelection\"/></div></div>\n                <button type=\"submit\" dojoAttachPoint=\"submitButton\">find film</button>\n            </fieldset>\n        </form>\n    </div>\n</div>\n",isCssLoaded:true,startup:function(){dojo.connect(this.form,"onsubmit",this,"formSubmitted");this.locationSearchAndCinemaSelection.setParent(this);this.filmSelection.setParent(this);if(!dojo.isIE){this.loadCss();}},getFilmCode:function(){return (this.filmSelection.getFilmCode());},getFilmReadableId:function(){return (this.filmSelection.getFilmReadableId());},getCinemaCode:function(){return (this.locationSearchAndCinemaSelection.getCinemaCode());},formSubmitted:function(evt){evt.stopPropagation();dojo.stopEvent(evt);this.submitForm();},focusFilmSelection:function(){this.filmSelection.focus();},focusLocationSearchAndCinemaSelection:function(){this.locationSearchAndCinemaSelection.focus();},focusSubmitButton:function(){this.submitButton.focus();},submitForm:function(){var _26d=this.filmSelection.getFilmName();var _26e=this.filmSelection.getFilmReadableId();var _26f=this.locationSearchAndCinemaSelection.getCinemaName();var _270=this.locationSearchAndCinemaSelection.getCinemaCode();var lat=this.locationSearchAndCinemaSelection.getLat();var lng=this.locationSearchAndCinemaSelection.getLong();var _273=this.locationSearchAndCinemaSelection.getLocationName();if(_273){dojo.cookie("locationname",_273,{path:"/",domain:".orange.co.uk"});}if(lat&&lng){dojo.cookie("lat",lat,{path:"/",domain:".orange.co.uk"});dojo.cookie("long",lng,{path:"/",domain:".orange.co.uk"});}var _274=null;if(_26e!=null){_274=3;}else{if(_26d.length>0){_274=2;}else{_274=1;}}if(_270!=null){_274+=6;}else{if(_26f.length>0){_274+=3;}}var _275="";switch(_274){case 1:if(lat!=null){_275=this.getDomainPrefix()+"/p/film/cinemasnearby";}else{this.filmSelection.notifyEntryRequired();}break;case 2:this.filmSelection.notifyEntryRequired();break;case 3:_275=this.getDomainPrefix()+"/p/film/details/"+_26e+(lat?"?lat="+lat+"&lng="+lng:"");break;case 4:if(lat!=null){_275=this.getDomainPrefix()+"/p/film/cinemasnearby";}else{this.locationSearchAndCinemaSelection.notifyEntryRequired();}break;case 5:this.filmSelection.notifyEntryRequired();break;case 6:_275=this.getDomainPrefix()+"/p/film/details/"+_26e+"?lat="+lat+"&lng="+lng;break;case 7:_275=this.getDomainPrefix()+"/p/film/cinema/"+_270;break;case 8:this.locationSearchAndCinemaSelection.notifyEntryRequired();break;case 9:_275=this.getDomainPrefix()+"/p/film/details/"+_26e+"?cinema_id="+_270;break;}this.trackSubmission(_275);if(_275!=""){document.location=_275;}},getDomainPrefix:function(){var _276=window.location.hostname;if(_276=="web.orange.co.uk"){return ("");}else{if((_276=="www.orange.co.uk")||(_276=="orange.co.uk")){return ("http://web.orange.co.uk");}else{return ("http://dev11.demo.orange-today.co.uk");}}},loadCss:function(){},trackSubmission:function(url){}});}
