dojo._xdResourceLoaded(function(dojo,dijit,dojox){return{depends:[["provide","local.ajaxify"],["provide","dojo.fx.Toggler"],["provide","dojo.fx"],["provide","dojox.fx._base"],["provide","dojox.fx"],["provide","local.Utils"],["provide","local.Register"],["provide","local.Application.Observer"],["provide","dojo.rpc.RpcService"],["provide","dojo.rpc.JsonService"],["provide","local.Async"],["provide","local.i18n"],["provide","local.widget._Popup"],["provide","local.widget.SwfObject"],["provide","dojo.dnd.common"],["provide","dojo.dnd.autoscroll"],["provide","dojo.dnd.Mover"],["provide","dojo.dnd.Moveable"],["provide","dojo.dnd.move"],["provide","dojo.dnd.TimedMoveable"],["provide","dijit._base.manager"],["provide","dijit._base.focus"],["provide","dojo.AdapterRegistry"],["provide","dijit._base.place"],["provide","dijit._base.window"],["provide","dijit._base.popup"],["provide","dijit._base.scroll"],["provide","dijit._base.sniff"],["provide","dijit._base.typematic"],["provide","dijit._base.wai"],["provide","dijit._base"],["provide","dijit._Widget"],["require","dijit._base"],["provide","dojo.string"],["provide","dojo.date.stamp"],["provide","dojo.parser"],["provide","dojo.cache"],["provide","dijit._Templated"],["provide","dijit.form._FormMixin"],["provide","dijit._DialogMixin"],["provide","dijit.DialogUnderlay"],["provide","dijit._Contained"],["provide","dijit._Container"],["provide","dijit.layout._LayoutWidget"],["provide","dojo.html"],["provide","dijit.layout.ContentPane"],["provide","dijit.TooltipDialog"],["provide","dijit.Dialog"],["provide","local.Popup"],["provide","local.Popup"],["provide","dojo.io.script"],["provide","local.Application"],["provide","local.Form.Abstract"],["provide","local.Popup._Form"],["provide","dijit.form._FormWidget"],["provide","dijit.form.TextBox"],["provide","dijit.Tooltip"],["provide","dijit.form.ValidationTextBox"],["provide","local.Form.Element.Field"],["provide","local.Form.Element.ValidationTextBox"],["provide","local.Form.User.Signup"],["provide","local.Popup.User.Login"],["provide","local.Popup.User.Signup"],["provide","local.widget.Player.Video"],["provide","local.Popup.Video"],["provide","local.Popup.BugReport"],["provide","local.Layout"],["provide","local.ajaxify.layout"],["provide","local.widget.Container.TabOfContent"],["provide","dojo.hash"],["provide","local.widget.ContainerSet"],["provide","local.widget.Container.Wipe"],["provide","local.Document.Abstract"],["provide","local.Document.Abstract"],["provide","local.Document.Directory.Context.PhoneSet"],["provide","local.Document.Directory.Context"],["provide","local.widget.Slider.Vertical"],["provide","local.Document.Directory.Gallery"],["provide","local.Document.Directory.BusinessHour"],["provide","local.Document.Directory.PriceList"],["provide","dojo.cldr.supplemental"],["provide","dojo.date"],["provide","dojo.regexp"],["provide","dojo.date.locale"],["provide","dijit.Calendar"],["provide","local.Form.Element.Calendar"],["provide","local.Document.Directory.Reservation.Ian"],["provide","local.widget.Form.Process"],["provide","local.Document.Directory.Reservation.LaFourchette"],["provide","local.Document.Directory.Reservation"],["provide","local.Document.Directory.Contact"],["provide","local.Document.Directory.Coupon"],["provide","local.Document.Send.Abstract"],["provide","local.Document.Send.Social"],["provide","local.Form.Element.MaxLength"],["provide","local.Form.Sendto.Sms"],["provide","local.Document.Send.Sms"],["provide","local.Form.Sendto.Email"],["provide","local.Document.Send.Email"],["provide","local.Form.Sendto.AddressBook"],["provide","local.Document.Send.AddressBook"],["provide","local.Document.Send.Dashboard"],["provide","local.Document.Send"],["provide","local.widget.GoogleMap.Direction.Dnd"],["provide","local.Document.Directory.Map.Direction"],["provide","local.Document.Directory.Map"],["provide","local.widget.GoogleMap.Control"],["provide","local.widget.GoogleMap.extinfowindow"],["provide","local.widget.GoogleMap"],["provide","local.widget.GoogleMap.Streetview"],["provide","local.Document.Directory.StreetView"],["provide","local.Document.Directory"],["provide","local.ajaxify.document.directory"],["provide","local.widget.AudioPlayer"],["provide","local.widget.GoogleMap.Location"],["require","dojo.cldr.nls.fr.gregorian"],["require","dojo.cldr.nls.en.gregorian"],["require","dijit.nls.fr.common"],["require","dijit.nls.fr.loading"]],defineResource:function(dojo,dijit,dojox){if(!dojo._hasResource["local.ajaxify"]){dojo._hasResource["local.ajaxify"]=true;dojo.provide("local.ajaxify");run=function(path){dojo.forEach(path.split("&&"),function(fct){try{var callback="ajaxify"+fct;if("function"==typeof window[callback]){window[callback]()}}catch(e){console.log("Unable to run "+fct)}})}}if(!dojo._hasResource["dojo.fx.Toggler"]){dojo._hasResource["dojo.fx.Toggler"]=true;dojo.provide("dojo.fx.Toggler");dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(args){var _t=this;dojo.mixin(_t,args);_t.node=args.node;_t._showArgs=dojo.mixin({},args);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},args);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true))},show:function(delay){return this.showAnim.play(delay||0)},hide:function(delay){return this.hideAnim.play(delay||0)}})}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var d=dojo,_baseObj={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[])}return this}};var _chain=function(animations){this._index=-1;this._animations=animations||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;d.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay}},this)};d.extend(_chain,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){d.disconnect(this._onAnimateCtx);d.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd")}else{this._current=this._animations[++this._index];this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(delay,gotoStart){if(!this._current){this._current=this._animations[this._index=0]}if(!gotoStart&&this._current.status()=="playing"){return this}var beforeBegin=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),onBegin=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments)}),onPlay=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(beforeBegin);d.disconnect(onBegin);d.disconnect(onPlay)});if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx)}this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){d.disconnect(this._onEndCtx)}this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var e=d.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);d.disconnect(e)});this._current.pause()}return this},gotoPercent:function(percent,andPlay){this.pause();var offset=this.duration*percent;this._current=null;d.some(this._animations,function(a){if(a.duration<=offset){this._current=a;return true}offset-=a.duration;return false});if(this._current){this._current.gotoPercent(offset/this._current.duration,andPlay)}return this},stop:function(gotoEnd){if(this._current){if(gotoEnd){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true)}this._current=this._animations[this._index]}var e=d.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);d.disconnect(e)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx)}if(this._onEndCtx){d.disconnect(this._onEndCtx)}}});d.extend(_chain,_baseObj);dojo.fx.chain=function(animations){return new _chain(animations)};var _combine=function(animations){this._animations=animations||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(animations,function(a){var duration=a.duration;if(a.delay){duration+=a.delay}if(this.duration<duration){this.duration=duration}this._connects.push(d.connect(a,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});var self=this;d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(evt){self._connects.push(d.connect(self._pseudoAnimation,evt,function(){self._fire(evt,arguments)}))})};d.extend(_combine,{_doAction:function(action,args){d.forEach(this._animations,function(a){a[action].apply(a,args)});return this},_onEnd:function(){if(++this._finished>this._animations.length){this._fire("onEnd")}},_call:function(action,args){var t=this._pseudoAnimation;t[action].apply(t,args)},play:function(delay,gotoStart){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(percent,andPlay){var ms=this.duration*percent;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),andPlay)});this._call("gotoPercent",arguments);return this},stop:function(gotoEnd){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){d.forEach(this._connects,dojo.disconnect)}});d.extend(_combine,_baseObj);dojo.fx.combine=function(animations){return new _combine(animations)};dojo.fx.wipeIn=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1}else{var height=d.style(node,"height");return Math.max(height,1)}},end:function(){return node.scrollHeight}}}},args));d.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o});return anim};dojo.fx.wipeOut=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{end:1}}},args));d.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display=""});d.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none"});return anim};dojo.fx.slideTo=function(args){var node=args.node=d.byId(args.node),top=null,left=null;var init=(function(n){return function(){var cs=d.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=d.position(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px"}}})(node);init();var anim=d.animateProperty(d.mixin({properties:{top:args.top||0,left:args.left||0}},args));d.connect(anim,"beforeBegin",anim,init);return anim}})()}if(!dojo._hasResource["dojox.fx._base"]){dojo._hasResource["dojox.fx._base"]=true;dojo.provide("dojox.fx._base");dojo.mixin(dojox.fx,{anim:dojo.anim,animateProperty:dojo.animateProperty,fadeTo:dojo._fade,fadeIn:dojo.fadeIn,fadeOut:dojo.fadeOut,combine:dojo.fx.combine,chain:dojo.fx.chain,slideTo:dojo.fx.slideTo,wipeIn:dojo.fx.wipeIn,wipeOut:dojo.fx.wipeOut});dojox.fx.sizeTo=function(args){var node=args.node=dojo.byId(args.node),abs="absolute";var method=args.method||"chain";if(!args.duration){args.duration=500}if(method=="chain"){args.duration=Math.floor(args.duration/2)}var top,newTop,left,newLeft,width,height=null;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n),pos=cs.position,w=cs.width,h=cs.height;top=(pos==abs?n.offsetTop:parseInt(cs.top)||0);left=(pos==abs?n.offsetLeft:parseInt(cs.left)||0);width=(w=="auto"?0:parseInt(w));height=(h=="auto"?0:parseInt(h));newLeft=left-Math.floor((args.width-width)/2);newTop=top-Math.floor((args.height-height)/2);if(pos!=abs&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position=abs;n.style.top=top+"px";n.style.left=left+"px"}}})(node);var anim1=dojo.animateProperty(dojo.mixin({properties:{height:function(){init();return{end:args.height||0,start:height}},top:function(){return{start:top,end:newTop}}}},args));var anim2=dojo.animateProperty(dojo.mixin({properties:{width:function(){return{start:width,end:args.width||0}},left:function(){return{start:left,end:newLeft}}}},args));var anim=dojo.fx[(args.method=="combine"?"combine":"chain")]([anim1,anim2]);return anim};dojox.fx.slideBy=function(args){var node=args.node=dojo.byId(args.node),top,left;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px"}}})(node);init();var _anim=dojo.animateProperty(dojo.mixin({properties:{top:top+(args.top||0),left:left+(args.left||0)}},args));dojo.connect(_anim,"beforeBegin",_anim,init);return _anim};dojox.fx.crossFade=function(args){var node1=args.nodes[0]=dojo.byId(args.nodes[0]),op1=dojo.style(node1,"opacity"),node2=args.nodes[1]=dojo.byId(args.nodes[1]),op2=dojo.style(node2,"opacity");var _anim=dojo.fx.combine([dojo[(op1==0?"fadeIn":"fadeOut")](dojo.mixin({node:node1},args)),dojo[(op1==0?"fadeOut":"fadeIn")](dojo.mixin({node:node2},args))]);return _anim};dojox.fx.highlight=function(args){var node=args.node=dojo.byId(args.node);args.duration=args.duration||400;var startColor=args.color||"#ffff99",endColor=dojo.style(node,"backgroundColor");if(endColor=="rgba(0, 0, 0, 0)"){endColor="transparent"}var anim=dojo.animateProperty(dojo.mixin({properties:{backgroundColor:{start:startColor,end:endColor}}},args));if(endColor=="transparent"){dojo.connect(anim,"onEnd",anim,function(){node.style.backgroundColor=endColor})}return anim};dojox.fx.wipeTo=function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style;var dir=(args.width?"width":"height"),endVal=args[dir],props={};props[dir]={start:function(){s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s[dir]="1px";s.display="";s.visibility="";return 1}else{var now=dojo.style(node,dir);return Math.max(now,1)}},end:endVal};var anim=dojo.animateProperty(dojo.mixin({properties:props},args));return anim}}if(!dojo._hasResource["dojox.fx"]){dojo._hasResource["dojox.fx"]=true;dojo.provide("dojox.fx")}if(!dojo._hasResource["local.Utils"]){dojo._hasResource["local.Utils"]=true;dojo.provide("local.Utils");Utils={formSetFocus:function(container){try{if(null==container||"undefined"==typeof container){return}var inputs=dojo.query("input[type=text]",container);if(null==inputs[0]){return}inputs[0].focus()}catch(e){application().log("Utils.formSetFocus",e)}},elementWipeWidth:function(obj){var options=[];if(obj.width===0.1){options.block={width:40};options["in"]="none";options.out="block"}else{options.block={width:40+obj.width};options["in"]="block";options.out="none"}dojo.query("#map-results-wipe-out").style("display",options.out);dojo.query("#map-results-wipe-in").style("display",options["in"]);dojox.fx.wipeTo(dojo.mixin({node:obj.htmlContent,delay:100},options.block)).play();var anim=dojox.fx.wipeTo(dojo.mixin({node:"wipe-content",delay:100},obj));if(dojo.isIE){if("block"==options.out){dojo.connect(anim,"onEnd",function(){dojo.style(dojo.query("#wipe-content")[0],"display","none")})}}anim.play()},setElementsFullHeight:function(less,elementsId){var height=document.documentElement.clientHeight-less;dojo.forEach(elementsId,function(element){var item=dojo.byId(element);if(null!=item){dojo.style(item,"height",height+"px")}})},elementOffsetTop:function(element){var top=0;if(element.offsetParent){do{top+=element.offsetTop}while(element=element.offsetParent)}return top},elementOffsetLeft:function(element){var left=0;if(element.offsetParent){do{left+=element.offsetLeft}while(element=element.offsetParent)}return left},elementOffsets:function(element){var offsets={t:0,l:0};if(element.offsetParent){do{offsets.t+=element.offsetTop;offsets.l+=element.offsetLeft}while(element=element.offsetParent)}return offsets},exception:function(){var item=dojo.query("#messages");if(null==item[0]||""==item[0].innerHTML){return}oldpopup().alert(item[0].innerHTML).show()},loadingMode:function(node,display){if(null==node){return}if("block"==display){dojo.attr(node,"innerHTML","");dojo.addClass(node,"loading")}else{dojo.removeClass(node,"loading")}},_stylesheets:[],appendStylesheet:function(url,media){if("undefined"!=typeof Utils._stylesheets[url]&&true==Utils._stylesheets[url]){return}try{media=("undefined"==typeof media)?"screen":media;var styleNode=dojo.create("link",{rel:"stylesheet",type:"text/css",href:url,media:media},dojo.doc.getElementsByTagName("head")[0],"last");Utils._stylesheets[url]=true}catch(e){Utils._stylesheets[url]=false;application().log("appendStylesheet "+url,e)}}}}if(!dojo._hasResource["local.Register"]){dojo._hasResource["local.Register"]=true;dojo.provide("local.Register");dojo.declare("Register",null,{_register:{},constructor:function(){this._register={}},set:function(key,value,replace){if(false==this.has(key)||(true==this.has(key)&&true==replace)){this._register[key]=value}},has:function(key){if("undefined"!=typeof this._register[key]){return true}return false},get:function(key){if(true==this.has(key)){return this._register[key]}return null},destroy:function(key){if(false==this.has(key)){return}delete this._register[key]},clean:function(){this._register={}}});var _register=null;register=function(){if(null==_register){_register=new Register()}return _register}}if(!dojo._hasResource["local.Application.Observer"]){dojo._hasResource["local.Application.Observer"]=true;dojo.provide("local.Application.Observer");dojo.declare("Application_Observer",null,{_scope:"default",_subscribtions:{},_listeners:{},constructor:function(scope){this._subscribtions={};this._listeners={};this.setScope(scope)},setScope:function(scope){if(dojo.isString(scope)&&""!=scope){this._scope=scope;if("undefined"==typeof this._subscribtions[scope]){this._subscribtions[scope]=[]}if("undefined"==typeof this._listeners[scope]){this._listeners[scope]=[]}}return this},connect:function(listener){this._listeners[this._scope].push(listener);return this},disconnect:function(){try{dojo.forEach(this._listeners[this._scope],function(listener){dojo.disconnect(listener)});this._listeners[this._scope]=[]}catch(e){}return this},subscribe:function(handle){this._subscribtions[this._scope].push(handle);return this},unsubscribe:function(){try{dojo.forEach(this._subscribtions[this._scope],function(handle){dojo.unsubscribe(handle)});this._subscribtions[this._scope]=[]}catch(e){}return this},clean:function(){this.disconnect().unsubscribe()}});var _applicationObserver=null;applicationObserver=function(scope){if(null==_applicationObserver){_applicationObserver=new Application_Observer()}_applicationObserver.setScope(scope);return _applicationObserver}}if(!dojo._hasResource["dojo.rpc.RpcService"]){dojo._hasResource["dojo.rpc.RpcService"]=true;dojo.provide("dojo.rpc.RpcService");dojo.declare("dojo.rpc.RpcService",null,{constructor:function(args){if(args){if((dojo.isString(args))||(args instanceof dojo._Url)){if(args instanceof dojo._Url){var url=args+""}else{url=args}var def=dojo.xhrGet({url:url,handleAs:"json-comment-optional",sync:true});def.addCallback(this,"processSmd");def.addErrback(function(){throw new Error("Unable to load SMD from "+args)})}else{if(args.smdStr){this.processSmd(dojo.eval("("+args.smdStr+")"))}else{if(args.serviceUrl){this.serviceUrl=args.serviceUrl}this.timeout=args.timeout||3000;if("strictArgChecks" in args){this.strictArgChecks=args.strictArgChecks}this.processSmd(args)}}}},strictArgChecks:true,serviceUrl:"",parseResults:function(obj){return obj},errorCallback:function(deferredRequestHandler){return function(data){deferredRequestHandler.errback(data.message)}},resultCallback:function(deferredRequestHandler){var tf=dojo.hitch(this,function(obj){if(obj.error!=null){var err;if(typeof obj.error=="object"){err=new Error(obj.error.message);err.code=obj.error.code;err.error=obj.error.error}else{err=new Error(obj.error)}err.id=obj.id;err.errorObject=obj;deferredRequestHandler.errback(err)}else{deferredRequestHandler.callback(this.parseResults(obj))}});return tf},generateMethod:function(method,parameters,url){return dojo.hitch(this,function(){var deferredRequestHandler=new dojo.Deferred();if((this.strictArgChecks)&&(parameters!=null)&&(arguments.length!=parameters.length)){throw new Error("Invalid number of parameters for remote method.")}else{this.bind(method,dojo._toArray(arguments),deferredRequestHandler,url)}return deferredRequestHandler})},processSmd:function(object){if(object.methods){dojo.forEach(object.methods,function(m){if(m&&m.name){this[m.name]=this.generateMethod(m.name,m.parameters,m.url||m.serviceUrl||m.serviceURL);if(!dojo.isFunction(this[m.name])){throw new Error("RpcService: Failed to create"+m.name+"()")}}},this)}this.serviceUrl=object.serviceUrl||object.serviceURL;this.required=object.required;this.smd=object}})}if(!dojo._hasResource["dojo.rpc.JsonService"]){dojo._hasResource["dojo.rpc.JsonService"]=true;dojo.provide("dojo.rpc.JsonService");dojo.declare("dojo.rpc.JsonService",dojo.rpc.RpcService,{bustCache:false,contentType:"application/json-rpc",lastSubmissionId:0,callRemote:function(method,params){var deferred=new dojo.Deferred();this.bind(method,params,deferred);return deferred},bind:function(method,parameters,deferredRequestHandler,url){var def=dojo.rawXhrPost({url:url||this.serviceUrl,postData:this.createRequest(method,parameters),contentType:this.contentType,timeout:this.timeout,handleAs:"json-comment-optional"});def.addCallbacks(this.resultCallback(deferredRequestHandler),this.errorCallback(deferredRequestHandler))},createRequest:function(method,params){var req={params:params,method:method,id:++this.lastSubmissionId};var data=dojo.toJson(req);return data},parseResults:function(obj){if(dojo.isObject(obj)){if("result" in obj){return obj.result}if("Result" in obj){return obj.Result}if("ResultSet" in obj){return obj.ResultSet}}return obj}})}if(!dojo._hasResource["local.Async"]){dojo._hasResource["local.Async"]=true;dojo.provide("local.Async");dojo.declare("Async_Json_Service",null,{_sources:{search:"/api/rpc/search.json",livebooking:"/api/rpc/livebooking.json",ian:"/api/rpc/ian.json",dashboard:"/api/rpc/dashboard.json",address:"/api/rpc/address.json",tts:"/api/rpc/tts.json"},_services:{},_hasSource:function(source){if(dojo.isString(source)&&"undefined"!=typeof this._sources[source]){return true}return false},_hasService:function(source){if("undefined"!=typeof this._services[source]){return true}return false},get:function(source){if(false==this._hasSource(source)){throw"Use of undefined Async_Json_Service's source"}var service=null;if(true==this._hasService(source)){service=this._services[source]}else{service=this._initService(source)}return service},_initService:function(source){this._services[source]=new dojo.rpc.JsonService(this._computeServiceUrl(source));return this._services[source]},_computeServiceUrl:function(source){if(false==this._hasSource(source)){throw"Use of undefined Async_Json_Service's source"}return application().buildUrl(this._sources[source])}});dojo.declare("Async",null,{_jsonService:null,constructor:function(){this._initJsonService()},_initJsonService:function(){if(null==this._jsonService){this._jsonService=new Async_Json_Service()}},getSmd:function(source){this._initJsonService();return this._jsonService.get(source)},getPartial:function(uri,callback,forceCache){var registerKey=uri;var setRegister=false;if(false==new RegExp(/params=/).test(uri)){setRegister=true}if(true===forceCache){setRegister=true}if(true==setRegister&&true==register().has(registerKey)&&dojo.isFunction(callback)){callback(register().get(registerKey));return}if(false==new RegExp(/http(s)?:\/\//).test(uri)){uri=application().buildUrl("/async/partial?name="+uri)}dojo.xhrGet({url:uri,load:function(response,ioArgs){if(true==setRegister){register().set(registerKey,response,true)}if(dojo.isFunction(callback)){callback(response)}},error:function(response,ioArgs){if(dojo.isFunction(callback)){callback(null)}},sync:true,handleAs:"text",timeout:20})},call:function(request,callback){if(false==new RegExp(/http(s)?:\/\//).test(request)){request=application().buildUrl(request)}this.getPartial(request,callback,true)},getTemplate:function(tplName,callback){var registerKey=tplName.replace(/\//,"-");if(true==register().has(registerKey)&&dojo.isFunction(callback)){callback(register().get(registerKey));return}dojo.xhrGet({url:application().buildUrl("/js/local/templates/"+tplName+".html"),sync:true,handleAs:"text",load:function(response,ioArgs){register().set(registerKey,response);if(dojo.isFunction(callback)){callback(response)}},error:function(response,ioArgs){application().log("Async.getTemplate",response);if(dojo.isFunction(null)){callback(response)}}})},getSmsPreview:function(documentId,callback){var registerKey="sms-preview-"+documentId;if(true==register().has(registerKey)&&dojo.isFunction(callback)){callback(register().get(registerKey));return}var callbackPreview=function(response){if(null==response){callback(application().getTranslator().translate("error"));return}register().set(registerKey,response,true);callback(response)};try{var smd=this.getSmd("search");var request=smd.getSmsPreview(documentId);request.addErrback(callbackPreview);request.addCallback(callbackPreview)}catch(e){application().log("Async.getSmsPreview",e)}},dojoAutocomplete:function(action,storeUrl,query,request){var matches=new RegExp("([a-z_]+).json$").exec(storeUrl);if("undefined"==typeof matches[1]){return null}var id=matches[1];query=(query+"").toLowerCase();var registerKey="dojoAutocomplete-"+id+"-"+query;if("get"==action){if(true==register().has(registerKey)){return register().get(registerKey)}}if("set"==action){register().set(registerKey,request)}return null}});var _async=null;async=function(){if(null==_async||!_async instanceof Async){_async=new Async()}return _async}}if(!dojo._hasResource["local.i18n"]){dojo._hasResource["local.i18n"]=true;dojo.provide("local.i18n");dojo.declare("i18n",null,{_translations:{},_baseUrl:"",_path:"/js/local/nls/",_defaultReturnValue:"",constructor:function(){this._baseUrl=document.location.protocol+"//"+window.location.host},getLocalization:function(fileName,lang){try{async().call(this._baseUrl+this._path+lang+"/"+fileName+".js",dojo.hitch(this,"_addTranslations"))}catch(e){}},_addTranslations:function(translations){translations=dojo.fromJson(translations);for(index in translations){this._translations[index]=translations[index]}},get:function(key){if("undefined"==typeof this._translations[key]){return key}return this._translations[key]},translate:function(key,replaceHash){return this._replace(this.get(key),replaceHash)},toOctal:function(key,replaceHash){var translation=this.get(key);translation=translation.replace(/&eacute;/g,"\351");translation=translation.replace(/&egrave;/g,"\350");translation=translation.replace(/&agrave;/g,"\340");return this._replace(translation,replaceHash)},_replace:function(translation,hash){if(false==dojo.isObject(hash)||"undefined"==typeof hash){return translation}try{return dojo.replace(translation,hash)}catch(e){application().log("i18n._replace",e);return translation}}})}if(!dojo._hasResource["local.widget._Popup"]){dojo._hasResource["local.widget._Popup"]=true;dojo.provide("local.widget._Popup");dojo.declare("_Popup",null,{_inDom:false,_isOpen:false,_template:null,_templateAlpha:null,_templateNavigation:null,_templateTitle:null,_templateLoading:null,_templateContent:null,_templateClose:null,_templateIsTranslated:false,_closeCallback:null,_connectedNavigationItems:[],_timer:null,constructor:function(){if(true==this._inDom){return}dojo.xhrGet({url:"/js/local/templates/popup.html",sync:true,handleAs:"text",load:dojo.hitch(this,function(response,ioArgs){this._addInDom(response)}),error:dojo.hitch(this,function(response,ioArgs){this._addInDom(null)})})},_addInDom:function(markup){this._templateIsTranslated=false;if(true==this._inDom||null==markup){return}dojo.place(markup,dojo.doc.getElementsByTagName("body")[0],"last");if(null==dojo.byId("popup")){return}this._inDom=true;this._extractNodes();this._connectClose()},_extractNodes:function(){this._template=dojo.byId("popup");this._templateAlpha=dojo.byId("popup-alpha");this._templateGlobalContent=dojo.query(".pcontent",this._template)[0];this._templateLoading=dojo.byId("popup-loading");this._templateNavigation=dojo.query(".popup-options",this._template)[0];this._templateTitle=dojo.query(".popup-title",this._template)[0];this._templateContent=dojo.byId("popup-load-content");if(6==dojo.isIE){dojo.style(this._templateAlpha,"height",document.body.clientHeight+"px")}},_connectClose:function(){this._templateClose=dojo.query(".close",this._template)[0];if(null==this._templateClose){return}dojo.connect(this._templateClose,"onclick",dojo.hitch(this,function(){if(null!=this._closeCallback){this._closeCallback()}clearTimeout(this._timer);this.hide()}));if(6==dojo.isIE){this._templateClose.innerHTML+=" X"}},setCloseCallback:function(callback){if(!dojo.isFunction(callback)){return}this._closeCallback=callback},loading:function(title,clazz){if(false==this._inDom){return}clazz=("undefined"==typeof clazz)?"popup":clazz;this.setTopPosition();this._setupTemplateTranslations();this.hide();this.setTitle(title);this.setClass(clazz);this.setContent("");this._setElementVisibility(this._templateAlpha,true);this._setElementVisibility(this._templateLoading,true);this._setElementVisibility(this._templateNavigation,false);this._setElementVisibility(this._templateContent,false);this._setElementVisibility(this._template,true);return this},getTemplateNode:function(){return this._template},getNavigationNode:function(){return this._templateNavigation},setGlobalContent:function(content,hideLoading){this._templateGlobalContent.innerHTML=content;this._extractNodes();if(true==hideLoading){this._setElementVisibility(this._templateLoading,false)}return this},setContent:function(content,isNode){if(null==this._templateContent||"undefined"==typeof content){return}if("undefined"!=typeof isNode&&true==isNode){dojo.place(content,this._templateContent,"last")}else{this._templateContent.innerHTML=content}return this},setLoadingContent:function(content,isNode){if(null==this._templateLoading||"undefined"==typeof content){return}if("undefined"!=typeof isNode&&true==isNode){dojo.place(content,this._templateLoading,"last")}else{this._templateLoading.innerHTML=content}if(""==content){dojo.style(this._templateLoading,"background","url(/images/loading.gif) no-repeat scroll 50% 50%")}this.showLoading();return this},setProcessing:function(content){if("undefined"==content){content="Votre demande est en cours de traitement"}if(false==this._isOpen){this.show(true)}dojo.style(this._templateLoading,"background","none");this.setLoadingContent('<p class="request">'+content+"<span>&nbsp;</span></p>");return this},activateTabs:function(options){dojo.query("li a",this._templateNavigation).forEach(function(item){if("undefined"==options[item.className]){return}if(true==options[item.className]){dojo.removeClass(item.parentNode,"tab-hidden")}else{dojo.addClass(item.parentNode,"tab-hidden")}});this._setElementVisibility(this._templateNavigation,false);return this},activateTab:function(id){dojo.query("li",this._templateNavigation).forEach(function(item){if("send-"+id+"-tab"==item.id){dojo.addClass(item,"tab-active")}else{dojo.removeClass(item,"tab-active")}});dojo.query(".tab-content",this._template).forEach(function(item){if("send-"+id==item.id){dojo.addClass(item,"tab-content-active")}else{dojo.removeClass(item,"tab-content-active")}});return this},setClass:function(clazz){dojo.attr(this._template,"class",clazz);return this},setTitle:function(title){if(null==this._templateTitle||"undefined"==typeof title){return this}this._templateTitle.innerHTML=title;return this},_setElementVisibility:function(node,display){if(null==node||"undefined"==typeof node){return}if(true==display){dojo.removeClass(node,"popup-element-hidden")}else{dojo.addClass(node,"popup-element-hidden")}},showLoading:function(){this.hideContent();this._setElementVisibility(this._templateLoading,true);return this},hideLoading:function(){this._setElementVisibility(this._templateLoading,false);return this},showContent:function(){this.hideLoading();this._setElementVisibility(this._templateContent,true);return this},hideContent:function(){this._setElementVisibility(this._templateContent,false);return this},showNavigation:function(){this._setElementVisibility(this._templateNavigation,true);return this},hide:function(){this._setElementVisibility(this._templateAlpha,false);this._setElementVisibility(this._templateLoading,false);this._setElementVisibility(this._templateNavigation,false);this._setElementVisibility(this._template,false);this.setClass("popup popup-element-hidden");this.setTitle("");this.setContent("");this.setGlobalContent('<div id="popup-loading"></div><div id="popup-load-content"></div>');this._templateLoading.innerHTML="";dojo.style(this._templateLoading,"background","url(/images/loading.gif) no-repeat scroll 50% 50%");this._isOpen=false;return this},show:function(isLoading){this._setupTemplateTranslations();this.setTopPosition();if("undefined"==isLoading){isLoading=false}if(isLoading){loadingDisplay=true;contentDisplay=false}else{loadingDisplay=false;contentDisplay=true}this._calculateAlphaHeight();this._setElementVisibility(this._templateAlpha,true);this._setElementVisibility(this._templateLoading,loadingDisplay);this._setElementVisibility(this._templateContent,contentDisplay);this._setElementVisibility(this._templateNavigation,false);this._setElementVisibility(this._template,true);this._isOpen=false;try{Utils.formSetFocus(this._templateContent);layout().disableFormAutocomplete()}catch(e){}return this},_calculateAlphaHeight:function(){dojo.attr(this._templateAlpha,"style","height: "+document.documentElement.scrollHeight+"px;");dojo.style(this._templateAlpha,"height",document.documentElement.scrollHeight+"px");this._timer=setTimeout(dojo.hitch(this,"_calculateAlphaHeight"),100)},direct:function(content,title,clazz){dojo.removeAttr(this._template,"style");this.setContent(content);this.setTitle(title);this.setClass(clazz);return this},alert:function(content,title,clazz){if("undefined"==typeof clazz){clazz="popup popup-alert"}this.direct('<div class="alert-content">'+content+"</div>",title,clazz);var content=dojo.query(".alert-content",this._template)[0];if(200>content.clientHeight){dojo.style(content,"height","200px")}return this},setTopPosition:function(px){if("undefined"==typeof px){var elemTop=window.pageYOffset;if(undefined==elemTop){elemTop=document.documentElement.scrollTop}elemTop+=50}else{elemTop=px}dojo.style(this._template,"top",elemTop+"px");return this},_setupTemplateTranslations:function(){if(false==this._templateIsTranslated){this._templateIsTranslated=true;dojo.attr(this._templateClose,{title:application().getTranslator().translate("close"),innerHTML:application().getTranslator().translate("close")})}}})}if(!dojo._hasResource["local.widget.SwfObject"]){dojo._hasResource["local.widget.SwfObject"]=true;dojo.provide("local.widget.SwfObject");swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}()}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId)}while(dojo.byId(id));return id};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode}return" button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0}}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return{w:dd.clientWidth,h:w.innerHeight}}else{if(!dojo.isOpera&&w.innerWidth){return{w:w.innerWidth,h:w.innerHeight}}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return{w:dd.clientWidth,h:dd.clientHeight}}else{if(b.clientWidth){return{w:b.clientWidth,h:b.clientHeight}}}}}return null};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE}}window.scrollBy(dx,dy)};dojo.dnd._validNodes={div:1,p:1,td:1};dojo.dnd._validOverflow={auto:1,scroll:1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo.position(n,true);var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;if(dojo.isWebKit||dojo.isOpera){rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop}if(rx>0&&rx<b.w){if(rx<w){dx=-w}else{if(rx>b.w-w){dx=w}}}if(ry>0&&ry<b.h){if(ry<h){dy=-h}else{if(ry>b.h-h){dy=h}}}var oldLeft=n.scrollLeft,oldTop=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(oldLeft!=n.scrollLeft||oldTop!=n.scrollTop){return}}}try{n=n.parentNode}catch(x){n=null}}dojo.dnd.autoScroll(e)}}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){this.node=dojo.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=this.host=host,d=node.ownerDocument,firstEvent=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),firstEvent];if(h&&h.onMoveStart){h.onMoveStart(this)}},onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY});dojo.stopEvent(e)},onMouseUp:function(e){if(dojo.isWebKit&&dojo.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy()}dojo.stopEvent(e)},onFirstMove:function(){var s=this.node.style,l,t,h=this.host;switch(s.position){case"relative":case"absolute":l=Math.round(parseFloat(s.left));t=Math.round(parseFloat(s.top));break;default:s.position="absolute";var m=dojo.marginBox(this.node);var b=dojo.doc.body;var bs=dojo.getComputedStyle(b);var bm=dojo._getMarginBox(b,bs);var bc=dojo._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this)}dojo.disconnect(this.events.pop())},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this)}this.events=this.node=this.host=null}})}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,params){this.node=dojo.byId(node);if(!params){params={}}this.handle=params.handle?dojo.byId(params.handle):null;if(!this.handle){this.handle=this.node}this.delay=params.delay>0?params.delay:0;this.skip=params.skip;this.mover=params.mover?params.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(params,node){return new dojo.dnd.Moveable(node,params)},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY}else{this.onDragDetected(e)}dojo.stopEvent(e)},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e)}dojo.stopEvent(e)},onMouseUp:function(e){for(var i=0;i<2;++i){dojo.disconnect(this.events.pop())}dojo.stopEvent(e)},onSelectStart:function(e){if(!this.skip||!dojo.dnd.isFormElement(e)){dojo.stopEvent(e)}},onDragDetected:function(e){new this.mover(this.node,e,this)},onMoveStart:function(mover){dojo.publish("/dnd/move/start",[mover]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem")},onMoveStop:function(mover){dojo.publish("/dnd/move/stop",[mover]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(mover){},onMove:function(mover,leftTop){this.onMoving(mover,leftTop);var s=mover.node.style;s.left=leftTop.l+"px";s.top=leftTop.t+"px";this.onMoved(mover,leftTop)},onMoving:function(mover,leftTop){},onMoved:function(mover,leftTop){}})}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(params,node){return new dojo.dnd.move.constrainedMoveable(node,params)},constructor:function(node,params){if(!params){params={}}this.constraints=params.constraints;this.within=params.within},onFirstMove:function(mover){var c=this.constraintBox=this.constraints.call(this,mover);c.r=c.l+c.w;c.b=c.t+c.h;if(this.within){var mb=dojo.marginBox(mover.node);c.r-=mb.w;c.b-=mb.h}},onMove:function(mover,leftTop){var c=this.constraintBox,s=mover.node.style;s.left=(leftTop.l<c.l?c.l:c.r<leftTop.l?c.r:leftTop.l)+"px";s.top=(leftTop.t<c.t?c.t:c.b<leftTop.t?c.b:leftTop.t)+"px"}});dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(params,node){return new dojo.dnd.move.boxConstrainedMoveable(node,params)},constructor:function(node,params){var box=params&&params.box;this.constraints=function(){return box}}});dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(params,node){return new dojo.dnd.move.parentConstrainedMoveable(node,params)},constructor:function(node,params){var area=params&&params.area;this.constraints=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(area=="margin"){return mb}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="border"){return mb}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="padding"){return mb}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb}}});dojo.dnd.move.constrainedMover=function(fun,within){dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");var mover=function(node,e,notifier){dojo.dnd.Mover.call(this,node,e,notifier)};dojo.extend(mover,dojo.dnd.Mover.prototype);dojo.extend(mover,{onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;l=l<c.l?c.l:c.r<l?c.r:l;t=t<c.t?c.t:c.b<t?c.b:t;this.host.onMove(this,{l:l,t:t})},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var c=this.constraintBox=fun.call(this);c.r=c.l+c.w;c.b=c.t+c.h;if(within){var mb=dojo.marginBox(this.node);c.r-=mb.w;c.b-=mb.h}}});return mover};dojo.dnd.move.boxConstrainedMover=function(box,within){dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");return dojo.dnd.move.constrainedMover(function(){return box},within)};dojo.dnd.move.parentConstrainedMover=function(area,within){dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");var fun=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(area=="margin"){return mb}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="border"){return mb}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(area=="padding"){return mb}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb};return dojo.dnd.move.constrainedMover(fun,within)};dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover}if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){dojo._hasResource["dojo.dnd.TimedMoveable"]=true;dojo.provide("dojo.dnd.TimedMoveable");(function(){var oldOnMove=dojo.dnd.Moveable.prototype.onMove;dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(node,params){if(!params){params={}}if(params.timeout&&typeof params.timeout=="number"&&params.timeout>=0){this.timeout=params.timeout}},markupFactory:function(params,node){return new dojo.dnd.TimedMoveable(node,params)},onMoveStop:function(mover){if(mover._timer){clearTimeout(mover._timer);oldOnMove.call(this,mover,mover._leftTop)}dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},onMove:function(mover,leftTop){mover._leftTop=leftTop;if(!mover._timer){var _t=this;mover._timer=setTimeout(function(){mover._timer=null;oldOnMove.call(_t,mover,mover._leftTop)},this.timeout)}}})})()}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={};this.length=0},add:function(widget){if(this._hash[widget.id]){throw new Error("Tried to register widget with id=="+widget.id+" but that id is already registered")}this._hash[widget.id]=widget;this.length++},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--}},forEach:function(func,thisObj){thisObj=thisObj||dojo.global;var i=0,id;for(id in this._hash){func.call(thisObj,this._hash[id],i++,this._hash)}return this},filter:function(filter,thisObj){thisObj=thisObj||dojo.global;var res=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(filter.call(thisObj,w,i++,this._hash)){res.add(w)}}return res},byId:function(id){return this._hash[id]},byClass:function(cls){var res=new dijit.WidgetSet(),id,widget;for(id in this._hash){widget=this._hash[id];if(widget.declaredClass==cls){res.add(widget)}}return res},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id])}return ar},map:function(func,thisObj){return dojo.map(this.toArray(),func,thisObj)},every:function(func,thisObj){thisObj=thisObj||dojo.global;var x=0,i;for(i in this._hash){if(!func.call(thisObj,this._hash[i],x++,this._hash)){return false}}return true},some:function(func,thisObj){thisObj=thisObj||dojo.global;var x=0,i;for(i in this._hash){if(func.call(thisObj,this._hash[i],x++,this._hash)){return true}}return false}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(widgetType){var id;do{id=widgetType+"_"+(widgetType in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[widgetType]:dijit._widgetTypeCtr[widgetType]=0)}while(dijit.byId(id));return id};dijit.findWidgets=function(root){var outAry=[];function getChildrenHelper(root){for(var node=root.firstChild;node;node=node.nextSibling){if(node.nodeType==1){var widgetId=node.getAttribute("widgetId");if(widgetId){var widget=dijit.byId(widgetId);outAry.push(widget)}else{getChildrenHelper(node)}}}}getChildrenHelper(root);return outAry};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(widget){if(!widget._destroyed){if(widget.destroyRecursive){widget.destroyRecursive()}else{if(widget.destroy){widget.destroy()}}}})};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll()})}dijit.byId=function(id){return typeof id=="string"?dijit.registry._hash[id]:id};dijit.byNode=function(node){return dijit.registry.byId(node.getAttribute("widgetId"))};dijit.getEnclosingWidget=function(node){while(node){var id=node.getAttribute&&node.getAttribute("widgetId");if(id){return dijit.byId(id)}node=node.parentNode}return null};dijit._isElementShown=function(elem){var style=dojo.style(elem);return(style.visibility!="hidden")&&(style.visibility!="collapsed")&&(style.display!="none")&&(dojo.attr(elem,"type")!="hidden")};dijit.isTabNavigable=function(elem){if(dojo.attr(elem,"disabled")){return false}else{if(dojo.hasAttr(elem,"tabIndex")){return dojo.attr(elem,"tabIndex")>=0}else{switch(elem.nodeName.toLowerCase()){case"a":return dojo.hasAttr(elem,"href");case"area":case"button":case"input":case"object":case"select":case"textarea":return true;case"iframe":if(dojo.isMoz){return elem.contentDocument.designMode=="on"}else{if(dojo.isWebKit){var doc=elem.contentDocument,body=doc&&doc.body;return body&&body.contentEditable=="true"}else{doc=elem.contentWindow.document;body=doc&&doc.body;return body&&body.firstChild&&body.firstChild.contentEditable=="true"}}default:return elem.contentEditable=="true"}}}};dijit._getTabNavigable=function(root){var first,last,lowest,lowestTabindex,highest,highestTabindex;var walkTree=function(parent){dojo.query("> *",parent).forEach(function(child){var isShown=dijit._isElementShown(child);if(isShown&&dijit.isTabNavigable(child)){var tabindex=dojo.attr(child,"tabIndex");if(!dojo.hasAttr(child,"tabIndex")||tabindex==0){if(!first){first=child}last=child}else{if(tabindex>0){if(!lowest||tabindex<lowestTabindex){lowestTabindex=tabindex;lowest=child}if(!highest||tabindex>=highestTabindex){highestTabindex=tabindex;highest=child}}}}if(isShown&&child.nodeName.toUpperCase()!="SELECT"){walkTree(child)}})};if(dijit._isElementShown(root)){walkTree(root)}return{first:first,last:last,lowest:lowest,highest:highest}};dijit.getFirstInTabbingOrder=function(root){var elems=dijit._getTabNavigable(dojo.byId(root));return elems.lowest?elems.lowest:elems.first};dijit.getLastInTabbingOrder=function(root){var elems=dijit._getTabNavigable(dojo.byId(root));return elems.last?elems.last:elems.highest};dijit.defaultDuration=dojo.config.defaultDuration||200}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(){return dijit.getBookmark().isCollapsed},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return{isCollapsed:(sel.end<=sel.start),mark:sel}}}bm={isCollapsed:true}}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()}}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return{isCollapsed:true,mark:null}}else{rg=sel.createRange();return{isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}}}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length)}catch(e){bm.isCollapsed=true;return bm}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++))}}else{bm.isCollapsed=true;bm.mark=null}}else{bm.mark=rg.getBookmark()}}else{console.warn("No idea how to store the current selection for this browser!")}}return bm},moveToBookmark:function(bookmark){var _doc=dojo.doc,mark=bookmark.mark;if(mark){if(dojo.global.getSelection){var sel=dojo.global.getSelection();if(sel&&sel.removeAllRanges){if(mark.pRange){var r=mark;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end}else{sel.removeAllRanges();sel.addRange(mark)}}else{console.warn("No idea how to restore selection for this browser!")}}else{if(_doc.selection&&mark){var rg;if(mark.pRange){rg=mark.range}else{if(dojo.isArray(mark)){rg=_doc.body.createControlRange();dojo.forEach(mark,function(n){rg.addElement(n)})}else{rg=_doc.body.createTextRange();rg.moveToBookmark(mark)}}rg.select()}}}},getFocus:function(menu,openedForWindow){var node=!dijit._curFocus||(menu&&dojo.isDescendant(dijit._curFocus,menu.domNode))?dijit._prevFocus:dijit._curFocus;return{node:node,bookmark:(node==dijit._curFocus)&&dojo.withGlobal(openedForWindow||dojo.global,dijit.getBookmark),openedForWindow:openedForWindow}},focus:function(handle){if(!handle){return}var node="node" in handle?handle.node:handle,bookmark=handle.bookmark,openedForWindow=handle.openedForWindow,collapsed=bookmark?bookmark.isCollapsed:false;if(node){var focusNode=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(focusNode&&focusNode.focus){try{focusNode.focus()}catch(e){}}dijit._onFocusNode(node)}if(bookmark&&dojo.withGlobal(openedForWindow||dojo.global,dijit.isCollapsed)&&!collapsed){if(openedForWindow){openedForWindow.focus()}try{dojo.withGlobal(openedForWindow||dojo.global,dijit.moveToBookmark,null,[bookmark])}catch(e2){}}},_activeStack:[],registerIframe:function(iframe){return dijit.registerWin(iframe.contentWindow,iframe)},unregisterIframe:function(handle){dijit.unregisterWin(handle)},registerWin:function(targetWindow,effectiveNode){var mousedownListener=function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false},0);dijit._onTouchNode(effectiveNode||evt.target||evt.srcElement,"mouse")};var doc=dojo.isIE?targetWindow.document.documentElement:targetWindow.document;if(doc){if(dojo.isIE){doc.attachEvent("onmousedown",mousedownListener);var activateListener=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){dijit._onFocusNode(effectiveNode||evt.srcElement)}else{dijit._onTouchNode(effectiveNode||evt.srcElement)}};doc.attachEvent("onactivate",activateListener);var deactivateListener=function(evt){dijit._onBlurNode(effectiveNode||evt.srcElement)};doc.attachEvent("ondeactivate",deactivateListener);return function(){doc.detachEvent("onmousedown",mousedownListener);doc.detachEvent("onactivate",activateListener);doc.detachEvent("ondeactivate",deactivateListener);doc=null}}else{doc.addEventListener("mousedown",mousedownListener,true);var focusListener=function(evt){dijit._onFocusNode(effectiveNode||evt.target)};doc.addEventListener("focus",focusListener,true);var blurListener=function(evt){dijit._onBlurNode(effectiveNode||evt.target)};doc.addEventListener("blur",blurListener,true);return function(){doc.removeEventListener("mousedown",mousedownListener,true);doc.removeEventListener("focus",focusListener,true);doc.removeEventListener("blur",blurListener,true);doc=null}}}},unregisterWin:function(handle){handle&&handle()},_onBlurNode:function(node){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(node,by){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer}var newStack=[];try{while(node){var popupParent=dojo.attr(node,"dijitPopupParent");if(popupParent){node=dijit.byId(popupParent).domNode}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===dojo.body()){break}node=dijit.getDocumentWindow(node.ownerDocument).frameElement}else{var id=node.getAttribute&&node.getAttribute("widgetId");if(id){newStack.unshift(id)}node=node.parentNode}}}}catch(e){}dijit._setStack(newStack,by)},_onFocusNode:function(node){if(!node){return}if(node.nodeType==9){return}dijit._onTouchNode(node);if(node==dijit._curFocus){return}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus}dijit._curFocus=node;dojo.publish("focusNode",[node])},_setStack:function(newStack,by){var oldStack=dijit._activeStack;dijit._activeStack=newStack;for(var nCommon=0;nCommon<Math.min(oldStack.length,newStack.length);nCommon++){if(oldStack[nCommon]!=newStack[nCommon]){break}}var widget;for(var i=oldStack.length-1;i>=nCommon;i--){widget=dijit.byId(oldStack[i]);if(widget){widget._focused=false;widget._hasBeenBlurred=true;if(widget._onBlur){widget._onBlur(by)}if(widget._setStateClass){widget._setStateClass()}dojo.publish("widgetBlur",[widget,by])}}for(i=nCommon;i<newStack.length;i++){widget=dijit.byId(newStack[i]);if(widget){widget._focused=true;if(widget._onFocus){widget._onFocus(by)}if(widget._setStateClass){widget._setStateClass()}dojo.publish("widgetFocus",[widget,by])}}}});dojo.addOnLoad(function(){var handle=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(handle);handle=null})}})}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(returnWrappers){this.pairs=[];this.returnWrappers=returnWrappers||false};dojo.extend(dojo.AdapterRegistry,{register:function(name,check,wrap,directReturn,override){this.pairs[((override)?"unshift":"push")]([name,check,wrap,directReturn])},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2]}else{return pair[2].apply(this,arguments)}}}throw new Error("No match found")},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){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 scrollRoot=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var scroll=dojo._docScroll();return{w:scrollRoot.clientWidth,h:scrollRoot.clientHeight,l:scroll.x,t:scroll.y}};dijit.placeOnScreen=function(node,pos,corners,padding){var choices=dojo.map(corners,function(corner){var c={corner:corner,pos:{x:pos.x,y:pos.y}};if(padding){c.pos.x+=corner.charAt(1)=="L"?padding.x:-padding.x;c.pos.y+=corner.charAt(0)=="T"?padding.y:-padding.y}return c});return dijit._place(node,choices)};dijit._place=function(node,choices,layoutNode){var view=dijit.getViewport();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(node)}var best=null;dojo.some(choices,function(choice){var corner=choice.corner;var pos=choice.pos;if(layoutNode){layoutNode(node,choice.aroundCorner,corner)}var style=node.style;var oldDisplay=style.display;var oldVis=style.visibility;style.visibility="hidden";style.display="";var mb=dojo.marginBox(node);style.display=oldDisplay;style.visibility=oldVis;var startX=Math.max(view.l,corner.charAt(1)=="L"?pos.x:(pos.x-mb.w)),startY=Math.max(view.t,corner.charAt(0)=="T"?pos.y:(pos.y-mb.h)),endX=Math.min(view.l+view.w,corner.charAt(1)=="L"?(startX+mb.w):pos.x),endY=Math.min(view.t+view.h,corner.charAt(0)=="T"?(startY+mb.h):pos.y),width=endX-startX,height=endY-startY,overflow=(mb.w-width)+(mb.h-height);if(best==null||overflow<best.overflow){best={corner:corner,aroundCorner:choice.aroundCorner,x:startX,y:startY,w:width,h:height,overflow:overflow}}return !overflow});node.style.left=best.x+"px";node.style.top=best.y+"px";if(best.overflow&&layoutNode){layoutNode(node,best.aroundCorner,best.corner)}return best};dijit.placeOnScreenAroundNode=function(node,aroundNode,aroundCorners,layoutNode){aroundNode=dojo.byId(aroundNode);var oldDisplay=aroundNode.style.display;aroundNode.style.display="";var aroundNodePos=dojo.position(aroundNode,true);aroundNode.style.display=oldDisplay;return dijit._placeOnScreenAroundRect(node,aroundNodePos.x,aroundNodePos.y,aroundNodePos.w,aroundNodePos.h,aroundCorners,layoutNode)};dijit.placeOnScreenAroundRectangle=function(node,aroundRect,aroundCorners,layoutNode){return dijit._placeOnScreenAroundRect(node,aroundRect.x,aroundRect.y,aroundRect.width,aroundRect.height,aroundCorners,layoutNode)};dijit._placeOnScreenAroundRect=function(node,x,y,width,height,aroundCorners,layoutNode){var choices=[];for(var nodeCorner in aroundCorners){choices.push({aroundCorner:nodeCorner,corner:aroundCorners[nodeCorner],pos:{x:x+(nodeCorner.charAt(1)=="L"?0:width),y:y+(nodeCorner.charAt(0)=="T"?0:height)}})}return dijit._place(node,choices,layoutNode)};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(node,aroundElement,aroundCorners,layoutNode){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments)};dijit.getPopupAlignment=function(position,leftToRight){var align={};dojo.forEach(position,function(pos){switch(pos){case"after":align[leftToRight?"BR":"BL"]=leftToRight?"BL":"BR";break;case"before":align[leftToRight?"BL":"BR"]=leftToRight?"BR":"BL";break;case"below":align[leftToRight?"BL":"BR"]=leftToRight?"TL":"TR";align[leftToRight?"BR":"BL"]=leftToRight?"TR":"TL";break;case"above":default:align[leftToRight?"TL":"TR"]=leftToRight?"BL":"BR";align[leftToRight?"TR":"TL"]=leftToRight?"BR":"BL";break}});return align};dijit.getPopupAroundAlignment=function(position,leftToRight){var align={};dojo.forEach(position,function(pos){switch(pos){case"after":align[leftToRight?"BR":"BL"]=leftToRight?"BL":"BR";break;case"before":align[leftToRight?"BL":"BR"]=leftToRight?"BR":"BL";break;case"below":align[leftToRight?"BL":"BR"]=leftToRight?"TL":"TR";align[leftToRight?"BR":"BL"]=leftToRight?"TR":"TL";break;case"above":default:align[leftToRight?"TL":"TR"]=leftToRight?"BL":"BR";align[leftToRight?"TR":"TL"]=leftToRight?"BR":"BL";break}});return align}}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 stack=[],beginZIndex=1000,idGen=1;this.moveOffScreen=function(node){var s=node.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display=""}dojo.body().appendChild(node)};var getTopPopup=function(){for(var pi=stack.length-1;pi>0&&stack[pi].parent===stack[pi-1].widget;pi--){}return stack[pi]};var wrappers=[];this.open=function(args){var widget=args.popup,orient=args.orient||(dojo._isBodyLtr()?{BL:"TL",BR:"TR",TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),around=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+idGen++);var wrapperobj=wrappers.pop(),wrapper,iframe;if(!wrapperobj){wrapper=dojo.create("div",{"class":"dijitPopup"},dojo.body());dijit.setWaiRole(wrapper,"presentation")}else{wrapper=wrapperobj[0];iframe=wrapperobj[1]}dojo.attr(wrapper,{id:id,style:{zIndex:beginZIndex+stack.length,visibility:"hidden",top:"-9999px"},dijitPopupParent:args.parent?args.parent.id:""});var s=widget.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";wrapper.appendChild(widget.domNode);if(!iframe){iframe=new dijit.BackgroundIframe(wrapper)}else{iframe.resize(wrapper)}var best=around?dijit.placeOnScreenAroundElement(wrapper,around,orient,widget.orient?dojo.hitch(widget,"orient"):null):dijit.placeOnScreen(wrapper,args,orient=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);wrapper.style.visibility="visible";var handlers=[];handlers.push(dojo.connect(wrapper,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){dojo.stopEvent(evt);args.onCancel()}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var topPopup=getTopPopup();if(topPopup&&topPopup.onCancel){topPopup.onCancel()}}}}));if(widget.onCancel){handlers.push(dojo.connect(widget,"onCancel",args.onCancel))}handlers.push(dojo.connect(widget,widget.onExecute?"onExecute":"onChange",function(){var topPopup=getTopPopup();if(topPopup&&topPopup.onExecute){topPopup.onExecute()}}));stack.push({wrapper:wrapper,iframe:iframe,widget:widget,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:handlers});if(widget.onOpen){widget.onOpen(best)}return best};this.close=function(popup){while(dojo.some(stack,function(elem){return elem.widget==popup})){var top=stack.pop(),wrapper=top.wrapper,iframe=top.iframe,widget=top.widget,onClose=top.onClose;if(widget.onClose){widget.onClose()}dojo.forEach(top.handlers,dojo.disconnect);if(widget&&widget.domNode){this.moveOffScreen(widget.domNode)}wrapper.style.top="-9999px";wrapper.style.visibility="hidden";wrappers.push([wrapper,iframe]);if(onClose){onClose()}}}}();dijit._frames=new function(){var queue=[];this.pop=function(){var iframe;if(queue.length){iframe=queue.pop();iframe.style.display=""}else{if(dojo.isIE){var burl=dojo.config.dojoBlankHtmlUrl||(dojo.moduleUrl("dojo","resources/blank.html")+"")||'javascript:""';var html="<iframe src='"+burl+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";iframe=dojo.doc.createElement(html)}else{iframe=dojo.create("iframe");iframe.src='javascript:""';iframe.className="dijitBackgroundIframe";dojo.style(iframe,"opacity",0.1)}iframe.tabIndex=-1}return iframe};this.push=function(iframe){iframe.style.display="none";queue.push(iframe)}}();dijit.BackgroundIframe=function(node){if(!node.id){throw new Error("no id")}if(dojo.isIE||dojo.isMoz){var iframe=dijit._frames.pop();node.appendChild(iframe);if(dojo.isIE<7){this.resize(node);this._conn=dojo.connect(node,"onresize",this,function(){this.resize(node)})}else{dojo.style(iframe,{width:"100%",height:"100%"})}this.iframe=iframe}};dojo.extend(dijit.BackgroundIframe,{resize:function(node){if(this.iframe&&dojo.isIE<7){dojo.style(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"})}},destroy:function(){if(this._conn){dojo.disconnect(this._conn);this._conn=null}if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe}}})}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(node,pos){try{node=dojo.byId(node);var doc=node.ownerDocument||dojo.doc,body=doc.body||dojo.body(),html=doc.documentElement||body.parentNode,isIE=dojo.isIE,isWK=dojo.isWebKit;if((!(dojo.isMoz||isIE||isWK)||node==body||node==html)&&(typeof node.scrollIntoView!="undefined")){node.scrollIntoView(false);return}var backCompat=doc.compatMode=="BackCompat",clientAreaRoot=backCompat?body:html,scrollRoot=isWK?body:clientAreaRoot,rootWidth=clientAreaRoot.clientWidth,rootHeight=clientAreaRoot.clientHeight,rtl=!dojo._isBodyLtr(),nodePos=pos||dojo.position(node),el=node.parentNode,isFixed=function(el){return((isIE<=6||(isIE&&backCompat))?false:(dojo.style(el,"position").toLowerCase()=="fixed"))};if(isFixed(node)){return}while(el){if(el==body){el=scrollRoot}var elPos=dojo.position(el),fixedPos=isFixed(el);with(elPos){if(el==scrollRoot){w=rootWidth,h=rootHeight;if(scrollRoot==html&&isIE&&rtl){x+=scrollRoot.offsetWidth-w}if(x<0||!isIE){x=0}if(y<0||!isIE){y=0}}else{var pb=dojo._getPadBorderExtents(el);w-=pb.w;h-=pb.h;x+=pb.l;y+=pb.t}with(el){if(el!=scrollRoot){var clientSize=clientWidth,scrollBarSize=w-clientSize;if(clientSize>0&&scrollBarSize>0){w=clientSize;if(isIE&&rtl){x+=scrollBarSize}}clientSize=clientHeight;scrollBarSize=h-clientSize;if(clientSize>0&&scrollBarSize>0){h=clientSize}}if(fixedPos){if(y<0){h+=y,y=0}if(x<0){w+=x,x=0}if(y+h>rootHeight){h=rootHeight-y}if(x+w>rootWidth){w=rootWidth-x}}var l=nodePos.x-x,t=nodePos.y-Math.max(y,0),r=l+nodePos.w-w,bot=t+nodePos.h-h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);nodePos.x+=scrollLeft;scrollLeft+=(isIE>=8&&!backCompat&&rtl)?-s:s;nodePos.x-=scrollLeft}if(bot*t>0){nodePos.y+=scrollTop;scrollTop+=Math[t<0?"max":"min"](t,bot);nodePos.y-=scrollTop}}}el=(el!=scrollRoot)&&!fixedPos&&el.parentNode}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false)}}}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo,html=d.doc.documentElement,ie=d.isIE,opera=d.isOpera,maj=Math.floor,ff=d.isFF,boxModel=d.boxModel.replace(/-/,""),classes={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_iequirks:ie&&d.isQuirks,dj_opera:opera,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};classes["dj_"+boxModel]=true;for(var p in classes){if(classes[p]){if(html.className){html.className+=" "+p}else{html.className=p}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){html.className+=" dijitRtl";for(var p in classes){if(classes[p]){html.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=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),10);this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(evt,_this,node,callback,obj,subsequentDelay,initialDelay){if(obj!=this._obj){this.stop();this._initialDelay=initialDelay||500;this._subsequentDelay=subsequentDelay||0.9;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_this,callback);this._fireEventAndReload()}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null}},addKeyListener:function(node,keyObject,_this,callback,subsequentDelay,initialDelay){if(keyObject.keyCode){keyObject.charOrCode=keyObject.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}else{if(keyObject.charCode){keyObject.charOrCode=String.fromCharCode(keyObject.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}}return[dojo.connect(node,"onkeypress",this,function(evt){if(evt.charOrCode==keyObject.charOrCode&&(keyObject.ctrlKey===undefined||keyObject.ctrlKey==evt.ctrlKey)&&(keyObject.altKey===undefined||keyObject.altKey==evt.altKey)&&(keyObject.metaKey===undefined||keyObject.metaKey==(evt.metaKey||false))&&(keyObject.shiftKey===undefined||keyObject.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(keyObject,_this,node,callback,keyObject,subsequentDelay,initialDelay)}else{if(dijit.typematic._obj==keyObject){dijit.typematic.stop()}}}),dojo.connect(node,"onkeyup",this,function(evt){if(dijit.typematic._obj==keyObject){dijit.typematic.stop()}})]},addMouseListener:function(node,_this,callback,subsequentDelay,initialDelay){var dc=dojo.connect;return[dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_this,node,callback,node,subsequentDelay,initialDelay)}),dc(node,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop()}),dc(node,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop()}),dc(node,"mousemove",this,function(evt){dojo.stopEvent(evt)}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_this,node,callback,node,subsequentDelay,initialDelay);setTimeout(dojo.hitch(this,dijit.typematic.stop),50)}})]},addListener:function(mouseNode,keyNode,keyObject,_this,callback,subsequentDelay,initialDelay){return this.addKeyListener(keyNode,keyObject,_this,callback,subsequentDelay,initialDelay).concat(this.addMouseListener(mouseNode,_this,callback,subsequentDelay,initialDelay))}}}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",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());var cs=dojo.getComputedStyle(div);if(cs){var bkImg=cs.backgroundImage;var needsA11y=(cs.borderTopColor==cs.borderRightColor)||(bkImg!=null&&(bkImg=="none"||bkImg=="url(invalid-url:)"));dojo[needsA11y?"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 waiRole=this.getWaiRole(elem);return role?(waiRole.indexOf(role)>-1):(waiRole.length>0)},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""))},setWaiRole:function(elem,role){var curRole=dojo.attr(elem,"role")||"";if(!this._XhtmlRoles.test(curRole)){dojo.attr(elem,"role",role)}else{if((" "+curRole+" ").indexOf(" "+role+" ")<0){var clearXhtml=dojo.trim(curRole.replace(this._XhtmlRoles,""));var cleanRole=dojo.trim(curRole.replace(clearXhtml,""));dojo.attr(elem,"role",cleanRole+(cleanRole?" ":"")+role)}}},removeWaiRole:function(elem,role){var roleValue=dojo.attr(elem,"role");if(!roleValue){return}if(role){var t=dojo.trim((" "+roleValue+" ").replace(" "+role+" "," "));dojo.attr(elem,"role",t)}else{elem.removeAttribute("role")}},hasWaiState:function(elem,state){return elem.hasAttribute?elem.hasAttribute("aria-"+state):!!elem.getAttribute("aria-"+state)},getWaiState:function(elem,state){return elem.getAttribute("aria-"+state)||""},setWaiState:function(elem,state,value){elem.setAttribute("aria-"+state,value)},removeWaiState:function(elem,state){elem.removeAttribute("aria-"+state)}})}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(widget,event){if(widget&&dojo.isFunction(widget._onConnect)){widget._onConnect(event)}});dijit._connectOnUseEventHandler=function(event){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var keydownCallback=function(evt){dijit._lastKeyDownNode=evt.srcElement};dojo.doc.attachEvent("onkeydown",keydownCallback);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",keydownCallback)})})()}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target},true)}(function(){var _attrReg={},getSetterAttributes=function(widget){var dc=widget.declaredClass;if(!_attrReg[dc]){var r=[],attrs,proto=widget.constructor.prototype;for(var fxName in proto){if(dojo.isFunction(proto[fxName])&&(attrs=fxName.match(/^_set([a-zA-Z]*)Attr$/))&&attrs[1]){r.push(attrs[1].charAt(0).toLowerCase()+attrs[1].substr(1))}}_attrReg[dc]=r}return _attrReg[dc]||[]};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",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")).toString(),postscript:function(params,srcNodeRef){this.create(params,srcNodeRef)},create:function(params,srcNodeRef){this.srcNodeRef=dojo.byId(srcNodeRef);this._connects=[];this._subscribes=[];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(params){this.params=params;dojo.mixin(this,params)}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"))}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var source=this.srcNodeRef;if(source&&source.parentNode){source.parentNode.replaceChild(this.domNode,source)}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 condAttrApply=function(attr,scope){if((scope.params&&attr in scope.params)||scope[attr]){scope.attr(attr,scope[attr])}};for(var attr in this.attributeMap){condAttrApply(attr,this)}dojo.forEach(getSetterAttributes(this),function(a){if(!(a in this.attributeMap)){condAttrApply(a,this)}},this)},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div")},postCreate:function(){},startup:function(){this._started=true},destroyRecursive:function(preserveDom){this._beingDestroyed=true;this.destroyDescendants(preserveDom);this.destroy(preserveDom)},destroy:function(preserveDom){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(array){dfe(array,d.disconnect)});dfe(this._subscribes,function(handle){dun(handle)});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive()}else{if(w.destroy){w.destroy()}}});this.destroyRendering(preserveDom);dijit.registry.remove(this.id);this._destroyed=true},destroyRendering:function(preserveDom){if(this.bgIframe){this.bgIframe.destroy(preserveDom);delete this.bgIframe}if(this.domNode){if(preserveDom){dojo.removeAttr(this.domNode,"widgetId")}else{dojo.destroy(this.domNode)}delete this.domNode}if(this.srcNodeRef){if(!preserveDom){dojo.destroy(this.srcNodeRef)}delete this.srcNodeRef}},destroyDescendants:function(preserveDom){dojo.forEach(this.getChildren(),function(widget){if(widget.destroyRecursive){widget.destroyRecursive(preserveDom)}})},uninitialize:function(){return false},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus()},_onBlur:function(){this.onBlur()},_onConnect:function(event){if(event in this._deferredConnects){var mapNode=this[this._deferredConnects[event]||"domNode"];this.connect(mapNode,event.toLowerCase(),event);delete this._deferredConnects[event]}},_setClassAttr:function(value){var mapNode=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(mapNode,this["class"]);this["class"]=value;dojo.addClass(mapNode,value)},_setStyleAttr:function(value){var mapNode=this[this.attributeMap.style||"domNode"];if(dojo.isObject(value)){dojo.style(mapNode,value)}else{if(mapNode.style.cssText){mapNode.style.cssText+="; "+value}else{mapNode.style.cssText=value}}this.style=value},setAttribute:function(attr,value){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(attr,value)},_attrToDom:function(attr,value){var commands=this.attributeMap[attr];dojo.forEach(dojo.isArray(commands)?commands:[commands],function(command){var mapNode=this[command.node||command||"domNode"];var type=command.type||"attribute";switch(type){case"attribute":if(dojo.isFunction(value)){value=dojo.hitch(this,value)}var attrName=command.attribute?command.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(mapNode,attrName,value);break;case"innerText":mapNode.innerHTML="";mapNode.appendChild(dojo.doc.createTextNode(value));break;case"innerHTML":mapNode.innerHTML=value;break;case"class":dojo.removeClass(mapNode,this[attr]);dojo.addClass(mapNode,value);break}},this);this[attr]=value},attr:function(name,value){var args=arguments.length;if(args==1&&!dojo.isString(name)){for(var x in name){this.attr(x,name[x])}return this}var names=this._getAttrNames(name);if(args>=2){if(this[names.s]){args=dojo._toArray(arguments,1);return this[names.s].apply(this,args)||this}else{if(name in this.attributeMap){this._attrToDom(name,value)}this[name]=value}return this}else{return this[names.g]?this[names.g]():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(){return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[]},getChildren:function(){return this.containerNode?dijit.findWidgets(this.containerNode):[]},nodesWithKeyClick:["input","button"],connect:function(obj,event,method){var d=dojo,dc=d._connect,handles=[];if(event=="ondijitclick"){if(!this.nodesWithKeyClick[obj.tagName.toLowerCase()]){var m=d.hitch(this,method);handles.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=e.target;d.stopEvent(e)}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target===dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=null;return m(e)}}))}event="onclick"}handles.push(dc(obj,event,this,method));this._connects.push(handles);return handles},disconnect:function(handles){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==handles){dojo.forEach(handles,dojo.disconnect);this._connects.splice(i,1);return}}},subscribe:function(topic,method){var d=dojo,handle=d.subscribe(topic,this,method);this._subscribes.push(handle);return handle},unsubscribe:function(handle){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==handle){dojo.unsubscribe(handle);this._subscribes.splice(i,1);return}}},isLeftToRight:function(){return dojo._isBodyLtr()},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none")},placeAt:function(reference,position){if(reference.declaredClass&&reference.addChild){reference.addChild(this,position)}else{dojo.place(this.domNode,reference,position)}return this},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){}})})()}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(template,map,transform,thisObject){thisObject=thisObject||dojo.global;transform=transform?dojo.hitch(thisObject,transform):function(v){return v};return template.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(match,key,format){var value=dojo.getObject(key,false,map);if(format){value=dojo.getObject(format,false,thisObject).call(thisObject,value,key)}return transform(value,key).toString()})};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break}}return str}}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(formattedString,defaultTime){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/}var match=dojo.date.stamp._isoRegExp.exec(formattedString),result=null;if(match){match.shift();if(match[1]){match[1]--}if(match[6]){match[6]*=1000}if(defaultTime){defaultTime=new Date(defaultTime);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return defaultTime["get"+prop]()}).forEach(function(value,index){if(match[index]===undefined){match[index]=value}})}result=new Date(match[0]||1970,match[1]||0,match[2]||1,match[3]||0,match[4]||0,match[5]||0,match[6]||0);if(match[0]<100){result.setFullYear(match[0]||1970)}var offset=0,zoneSign=match[7]&&match[7].charAt(0);if(zoneSign!="Z"){offset=((match[8]||0)*60)+(Number(match[9])||0);if(zoneSign!="-"){offset*=-1}}if(zoneSign){offset-=result.getTimezoneOffset()}if(offset){result.setTime(result.getTime()+offset*60000)}}return result};dojo.date.stamp.toISOString=function(dateObject,options){var _=function(n){return(n<10)?"0"+n:n};options=options||{};var formattedDate=[],getter=options.zulu?"getUTC":"get",date="";if(options.selector!="time"){var year=dateObject[getter+"FullYear"]();date=["0000".substr((year+"").length)+year,_(dateObject[getter+"Month"]()+1),_(dateObject[getter+"Date"]())].join("-")}formattedDate.push(date);if(options.selector!="date"){var time=[_(dateObject[getter+"Hours"]()),_(dateObject[getter+"Minutes"]()),_(dateObject[getter+"Seconds"]())].join(":");var millis=dateObject[getter+"Milliseconds"]();if(options.milliseconds){time+="."+(millis<100?"0":"")+_(millis)}if(options.zulu){time+="Z"}else{if(options.selector!="time"){var timezoneOffset=dateObject.getTimezoneOffset();var absOffset=Math.abs(timezoneOffset);time+=(timezoneOffset>0?"-":"+")+_(Math.floor(absOffset/60))+":"+_(absOffset%60)}}formattedDate.push(time)}return formattedDate.join("T")}}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;this._attrName=d._scopeName+"Type";this._query="["+this._attrName+"]";function val2type(value){if(d.isString(value)){return"string"}if(typeof value=="number"){return"number"}if(typeof value=="boolean"){return"boolean"}if(d.isFunction(value)){return"function"}if(d.isArray(value)){return"array"}if(value instanceof Date){return"date"}if(value instanceof d._Url){return"url"}return"object"}function str2obj(value,type){switch(type){case"string":return value;case"number":return value.length?Number(value):NaN;case"boolean":return typeof value=="boolean"?value:!(value.toLowerCase()=="false");case"function":if(d.isFunction(value)){value=value.toString();value=d.trim(value.substring(value.indexOf("{")+1,value.length-1))}try{if(value.search(/[^\w\.]+/i)!=-1){return new Function(value)}else{return d.getObject(value,false)}}catch(e){return new Function()}case"array":return value?value.split(/\s*,\s*/):[];case"date":switch(value){case"":return new Date("");case"now":return new Date();default:return d.date.stamp.fromISOString(value)}case"url":return d.baseUrl+value;default:return d.fromJson(value)}}var instanceClasses={};dojo.connect(dojo,"extend",function(){instanceClasses={}});function getClassInfo(className){if(!instanceClasses[className]){var cls=d.getObject(className);if(!d.isFunction(cls)){throw new Error("Could not load class '"+className+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?")}var proto=cls.prototype;var params={},dummyClass={};for(var name in proto){if(name.charAt(0)=="_"){continue}if(name in dummyClass){continue}var defVal=proto[name];params[name]=val2type(defVal)}instanceClasses[className]={cls:cls,params:params}}return instanceClasses[className]}this._functionFromScript=function(script){var preamble="";var suffix="";var argsStr=script.getAttribute("args");if(argsStr){d.forEach(argsStr.split(/\s*,\s*/),function(part,idx){preamble+="var "+part+" = arguments["+idx+"]; "})}var withStr=script.getAttribute("with");if(withStr&&withStr.length){d.forEach(withStr.split(/\s*,\s*/),function(part){preamble+="with("+part+"){";suffix+="}"})}return new Function(preamble+script.innerHTML+suffix)};this.instantiate=function(nodes,mixin,args){var thelist=[],dp=dojo.parser;mixin=mixin||{};args=args||{};d.forEach(nodes,function(node){if(!node){return}var type=dp._attrName in mixin?mixin[dp._attrName]:node.getAttribute(dp._attrName);if(!type||!type.length){return}var clsInfo=getClassInfo(type),clazz=clsInfo.cls,ps=clazz._noScript||clazz.prototype._noScript;var params={},attributes=node.attributes;for(var name in clsInfo.params){var item=name in mixin?{value:mixin[name],specified:true}:attributes.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue}var value=item.value;switch(name){case"class":value="className" in mixin?mixin.className:node.className;break;case"style":value="style" in mixin?mixin.style:(node.style&&node.style.cssText)}var _type=clsInfo.params[name];if(typeof value=="string"){params[name]=str2obj(value,_type)}else{params[name]=value}}if(!ps){var connects=[],calls=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(script){var event=script.getAttribute("event"),type=script.getAttribute("type"),nf=d.parser._functionFromScript(script);if(event){if(type=="dojo/connect"){connects.push({event:event,func:nf})}else{params[event]=nf}}else{calls.push(nf)}})}var markupFactory=clazz.markupFactory||clazz.prototype&&clazz.prototype.markupFactory;var instance=markupFactory?markupFactory(params,node,clazz):new clazz(params,node);thelist.push(instance);var jsname=node.getAttribute("jsId");if(jsname){d.setObject(jsname,instance)}if(!ps){d.forEach(connects,function(connect){d.connect(instance,connect.event,null,connect.func)});d.forEach(calls,function(func){func.call(instance)})}});if(!mixin._started){d.forEach(thelist,function(instance){if(!args.noStart&&instance&&instance.startup&&!instance._started&&(!instance.getParent||!instance.getParent())){instance.startup()}})}return thelist};this.parse=function(rootNode,args){var root;if(!args&&rootNode&&rootNode.rootNode){args=rootNode;root=args.rootNode}else{root=rootNode}var list=d.query(this._query,root);return this.instantiate(list,null,args)}}();(function(){var parseRunner=function(){if(dojo.config.parseOnLoad){dojo.parser.parse()}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,parseRunner)}else{dojo._loaders.unshift(parseRunner)}})()}if(!dojo._hasResource["dojo.cache"]){dojo._hasResource["dojo.cache"]=true;dojo.provide("dojo.cache");(function(){var cache={};dojo.cache=function(module,url,value){if(typeof module=="string"){var pathObj=dojo.moduleUrl(module,url)}else{pathObj=module;value=url}var key=pathObj.toString();var val=value;if(value!==undefined&&!dojo.isString(value)){val=("value" in value?value.value:undefined)}var sanitize=value&&value.sanitize?true:false;if(val||val===null){if(val==null){delete cache[key]}else{val=cache[key]=sanitize?dojo.cache._sanitize(val):val}}else{if(!(key in cache)){val=dojo._getText(key);cache[key]=sanitize?dojo.cache._sanitize(val):val}val=cache[key]}return val};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var matches=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(matches){val=matches[1]}}else{val=""}return val}})()}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,_stringRepl:function(tmpl){var className=this.declaredClass,_this=this;return dojo.string.substitute(tmpl,this,function(value,key){if(key.charAt(0)=="!"){value=dojo.getObject(key.substr(1),false,_this)}if(typeof value=="undefined"){throw new Error(className+" template:"+key)}if(value==null){return""}return key.charAt(0)=="!"?value:value.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){this._attachPoints=[];var cached=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(cached)){node=dojo._toDom(this._stringRepl(cached));if(node.nodeType!=1){throw new Error("Invalid template: "+cached)}}else{node=cached.cloneNode(true)}this.domNode=node;this._attachTemplateNodes(node);if(this.widgetsInTemplate){var parser=dojo.parser,qry,attr;if(parser._query!="[dojoType]"){qry=parser._query;attr=parser._attrName;parser._query="[dojoType]";parser._attrName="dojoType"}var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup}));if(qry){parser._query=qry;parser._attrName=attr}this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p]})}this._fillContent(this.srcNodeRef)},_fillContent:function(source){var dest=this.containerNode;if(source&&dest){while(source.hasChildNodes()){dest.appendChild(source.firstChild)}}},_attachTemplateNodes:function(rootNode,getAttrFunc){getAttrFunc=getAttrFunc||function(n,p){return n.getAttribute(p)};var nodes=dojo.isArray(rootNode)?rootNode:(rootNode.all||rootNode.getElementsByTagName("*"));var x=dojo.isArray(rootNode)?0:-1;for(;x<nodes.length;x++){var baseNode=(x==-1)?rootNode:nodes[x];if(this.widgetsInTemplate&&getAttrFunc(baseNode,"dojoType")){continue}var attachPoint=getAttrFunc(baseNode,"dojoAttachPoint");if(attachPoint){var point,points=attachPoint.split(/\s*,\s*/);while((point=points.shift())){if(dojo.isArray(this[point])){this[point].push(baseNode)}else{this[point]=baseNode}this._attachPoints.push(point)}}var attachEvent=getAttrFunc(baseNode,"dojoAttachEvent");if(attachEvent){var event,events=attachEvent.split(/\s*,\s*/);var trim=dojo.trim;while((event=events.shift())){if(event){var thisFunc=null;if(event.indexOf(":")!=-1){var funcNameArr=event.split(":");event=trim(funcNameArr[0]);thisFunc=trim(funcNameArr[1])}else{event=trim(event)}if(!thisFunc){thisFunc=event}this.connect(baseNode,event,thisFunc)}}}var role=getAttrFunc(baseNode,"waiRole");if(role){dijit.setWaiRole(baseNode,role)}var values=getAttrFunc(baseNode,"waiState");if(values){dojo.forEach(values.split(/\s*,\s*/),function(stateValue){if(stateValue.indexOf("-")!=-1){var pair=stateValue.split("-");dijit.setWaiState(baseNode,pair[0],pair[1])}})}}},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup()}});this.inherited(arguments)},destroyRendering:function(){dojo.forEach(this._attachPoints,function(point){delete this[point]},this);this._attachPoints=[];this.inherited(arguments)}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(templatePath,templateString,alwaysUseString){var tmplts=dijit._Templated._templateCache;var key=templateString||templatePath;var cached=tmplts[key];if(cached){try{if(!cached.ownerDocument||cached.ownerDocument==dojo.doc){return cached}}catch(e){}dojo.destroy(cached)}if(!templateString){templateString=dojo.cache(templatePath,{sanitize:true})}templateString=dojo.string.trim(templateString);if(alwaysUseString||templateString.match(/\$\{([^\}]+)\}/g)){return(tmplts[key]=templateString)}else{var node=dojo._toDom(templateString);if(node.nodeType!=1){throw new Error("Invalid template: "+templateString)}return(tmplts[key]=node)}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var cache=dijit._Templated._templateCache;for(var key in cache){var value=cache[key];if(typeof value=="object"){dojo.destroy(value)}delete cache[key]}})}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""})}if(!dojo._hasResource["dijit.form._FormMixin"]){dojo._hasResource["dijit.form._FormMixin"]=true;dojo.provide("dijit.form._FormMixin");dojo.declare("dijit.form._FormMixin",null,{reset:function(){dojo.forEach(this.getDescendants(),function(widget){if(widget.reset){widget.reset()}})},validate:function(){var didFocus=false;return dojo.every(dojo.map(this.getDescendants(),function(widget){widget._hasBeenBlurred=true;var valid=widget.disabled||!widget.validate||widget.validate();if(!valid&&!didFocus){dijit.scrollIntoView(widget.containerNode||widget.domNode);widget.focus();didFocus=true}return valid}),function(item){return item})},setValues:function(val){dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");return this.attr("value",val)},_setValueAttr:function(obj){var map={};dojo.forEach(this.getDescendants(),function(widget){if(!widget.name){return}var entry=map[widget.name]||(map[widget.name]=[]);entry.push(widget)});for(var name in map){if(!map.hasOwnProperty(name)){continue}var widgets=map[name],values=dojo.getObject(name,false,obj);if(values===undefined){continue}if(!dojo.isArray(values)){values=[values]}if(typeof widgets[0].checked=="boolean"){dojo.forEach(widgets,function(w,i){w.attr("value",dojo.indexOf(values,w.value)!=-1)})}else{if(widgets[0].multiple){widgets[0].attr("value",values)}else{dojo.forEach(widgets,function(w,i){w.attr("value",values[i])})}}}},getValues:function(){dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value")},_getValueAttr:function(){var obj={};dojo.forEach(this.getDescendants(),function(widget){var name=widget.name;if(!name||widget.disabled){return}var value=widget.attr("value");if(typeof widget.checked=="boolean"){if(/Radio/.test(widget.declaredClass)){if(value!==false){dojo.setObject(name,value,obj)}else{value=dojo.getObject(name,false,obj);if(value===undefined){dojo.setObject(name,null,obj)}}}else{var ary=dojo.getObject(name,false,obj);if(!ary){ary=[];dojo.setObject(name,ary,obj)}if(value!==false){ary.push(value)}}}else{var prev=dojo.getObject(name,false,obj);if(typeof prev!="undefined"){if(dojo.isArray(prev)){prev.push(value)}else{dojo.setObject(name,[prev,value],obj)}}else{dojo.setObject(name,value,obj)}}});return obj},isValid:function(){this._invalidWidgets=dojo.filter(this.getDescendants(),function(widget){return !widget.disabled&&widget.isValid&&!widget.isValid()});return !this._invalidWidgets.length},onValidStateChange:function(isValid){},_widgetChange:function(widget){var isValid=this._lastValidState;if(!widget||this._lastValidState===undefined){isValid=this.isValid();if(this._lastValidState===undefined){this._lastValidState=isValid}}else{if(widget.isValid){this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(w){return(w!=widget)},this);if(!widget.isValid()&&!widget.attr("disabled")){this._invalidWidgets.push(widget)}isValid=(this._invalidWidgets.length===0)}}if(isValid!==this._lastValidState){this._lastValidState=isValid;this.onValidStateChange(isValid)}},connectChildren:function(){dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));var _this=this;var conns=this._changeConnections=[];dojo.forEach(dojo.filter(this.getDescendants(),function(item){return item.validate}),function(widget){conns.push(_this.connect(widget,"validate",dojo.hitch(_this,"_widgetChange",widget)));conns.push(_this.connect(widget,"_setDisabledAttr",dojo.hitch(_this,"_widgetChange",widget)))});this._widgetChange(null)},startup:function(){this.inherited(arguments);this._changeConnections=[];this.connectChildren()}})}if(!dojo._hasResource["dijit._DialogMixin"]){dojo._hasResource["dijit._DialogMixin"]=true;dojo.provide("dijit._DialogMixin");dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(formContents){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.attr("value"))},_getFocusItems:function(dialogNode){var elems=dijit._getTabNavigable(dojo.byId(dialogNode));this._firstFocusItem=elems.lowest||elems.first||dialogNode;this._lastFocusItem=elems.last||elems.highest||this._firstFocusItem;if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.getNodeProp(this._firstFocusItem,"type").toLowerCase()=="file"){dojo.attr(dialogNode,"tabIndex","0");this._firstFocusItem=dialogNode}}})}if(!dojo._hasResource["dijit.DialogUnderlay"]){dojo._hasResource["dijit.DialogUnderlay"]=true;dojo.provide("dijit.DialogUnderlay");dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(id){dojo.attr(this.node,"id",id+"_underlay")},_setClassAttr:function(clazz){this.node.className="dijitDialogUnderlay "+clazz},postCreate:function(){dojo.body().appendChild(this.domNode)},layout:function(){var is=this.node.style,os=this.domNode.style;os.display="none";var viewport=dijit.getViewport();os.top=viewport.t+"px";os.left=viewport.l+"px";is.width=viewport.w+"px";is.height=viewport.h+"px";os.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new dijit.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();this.domNode.style.display="none"},uninitialize:function(){if(this.bgIframe){this.bgIframe.destroy()}this.inherited(arguments)}})}if(!dojo._hasResource["dijit._Contained"]){dojo._hasResource["dijit._Contained"]=true;dojo.provide("dijit._Contained");dojo.declare("dijit._Contained",null,{getParent:function(){var parent=dijit.getEnclosingWidget(this.domNode.parentNode);return parent&&parent.isContainer?parent:null},_getSibling:function(which){var node=this.domNode;do{node=node[which+"Sibling"]}while(node&&node.nodeType!=1);return node&&dijit.byNode(node)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1}return p.getIndexOfChild(this)}})}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode}},addChild:function(widget,insertIndex){var refNode=this.containerNode;if(insertIndex&&typeof insertIndex=="number"){var children=this.getChildren();if(children&&children.length>=insertIndex){refNode=children[insertIndex-1].domNode;insertIndex="after"}}dojo.place(widget.domNode,refNode,insertIndex);if(this._started&&!widget._started){widget.startup()}},removeChild:function(widget){if(typeof widget=="number"&&widget>0){widget=this.getChildren()[widget]}if(widget&&widget.domNode){var node=widget.domNode;node.parentNode.removeChild(node)}},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode)},hasChildren:function(){return dojo.query("> [widgetId]",this.containerNode).length>0},destroyDescendants:function(preserveDom){dojo.forEach(this.getChildren(),function(child){child.destroyRecursive(preserveDom)})},_getSiblingOfChild:function(child,dir){var node=child.domNode,which=(dir>0?"nextSibling":"previousSibling");do{node=node[which]}while(node&&(node.nodeType!=1||!dijit.byNode(node)));return node&&dijit.byNode(node)},getIndexOfChild:function(child){return dojo.indexOf(this.getChildren(),child)},startup:function(){if(this._started){return}dojo.forEach(this.getChildren(),function(child){child.startup()});this.inherited(arguments)}})}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");dojo.addClass(this.domNode,this.baseClass);this.inherited(arguments)},startup:function(){if(this._started){return}this.inherited(arguments);var parent=this.getParent&&this.getParent();if(!(parent&&parent.isLayoutContainer)){this.resize();this.connect(dojo.isIE?this.domNode:dojo.global,"onresize",function(){this.resize()})}},resize:function(changeSize,resultSize){var node=this.domNode;if(changeSize){dojo.marginBox(node,changeSize);if(changeSize.t){node.style.top=changeSize.t+"px"}if(changeSize.l){node.style.left=changeSize.l+"px"}}var mb=resultSize||{};dojo.mixin(mb,changeSize||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(node),mb)}var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var be=dojo._getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=dojo._getPadExtents(node,cs);this._contentBox={l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout()},layout:function(){},_setupChild:function(child){dojo.addClass(child.domNode,this.baseClass+"-child");if(child.baseClass){dojo.addClass(child.domNode,this.baseClass+"-"+child.baseClass)}},addChild:function(child,insertIndex){this.inherited(arguments);if(this._started){this._setupChild(child)}},removeChild:function(child){dojo.removeClass(child.domNode,this.baseClass+"-child");if(child.baseClass){dojo.removeClass(child.domNode,this.baseClass+"-"+child.baseClass)}this.inherited(arguments)}});dijit.layout.marginBox2contentBox=function(node,mb){var cs=dojo.getComputedStyle(node);var me=dojo._getMarginExtents(node,cs);var pb=dojo._getPadBorderExtents(node,cs);return{l:dojo._toPixelValue(node,cs.paddingLeft),t:dojo._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)}};(function(){var capitalize=function(word){return word.substring(0,1).toUpperCase()+word.substring(1)};var size=function(widget,dim){widget.resize?widget.resize(dim):dojo.marginBox(widget.domNode,dim);dojo.mixin(widget,dojo.marginBox(widget.domNode));dojo.mixin(widget,dim)};dijit.layout.layoutChildren=function(container,dim,children){dim=dojo.mixin({},dim);dojo.addClass(container,"dijitLayoutContainer");children=dojo.filter(children,function(item){return item.layoutAlign!="client"}).concat(dojo.filter(children,function(item){return item.layoutAlign=="client"}));dojo.forEach(children,function(child){var elm=child.domNode,pos=child.layoutAlign;var elmStyle=elm.style;elmStyle.left=dim.l+"px";elmStyle.top=dim.t+"px";elmStyle.bottom=elmStyle.right="auto";dojo.addClass(elm,"dijitAlign"+capitalize(pos));if(pos=="top"||pos=="bottom"){size(child,{w:dim.w});dim.h-=child.h;if(pos=="top"){dim.t+=child.h}else{elmStyle.top=dim.t+dim.h+"px"}}else{if(pos=="left"||pos=="right"){size(child,{h:dim.h});dim.w-=child.w;if(pos=="left"){dim.l+=child.w}else{elmStyle.left=dim.l+dim.w+"px"}}else{if(pos=="client"){size(child,dim)}}}})}})()}if(!dojo._hasResource["dojo.html"]){dojo._hasResource["dojo.html"]=true;dojo.provide("dojo.html");(function(){var idCounter=0,d=dojo;dojo.html._secureForInnerHtml=function(cont){return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};dojo.html._emptyNode=dojo.empty;dojo.html._setNodeContent=function(node,cont){d.empty(node);if(cont){if(typeof cont=="string"){cont=d._toDom(cont,node.ownerDocument)}if(!cont.nodeType&&d.isArrayLike(cont)){for(var startlen=cont.length,i=0;i<cont.length;i=startlen==cont.length?i+1:0){d.place(cont[i],node,"last")}}else{d.place(cont,node,"last")}}return node};dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(params,node){dojo.mixin(this,params||{});node=this.node=dojo.byId(this.node||node);if(!this.id){this.id=["Setter",(node)?node.id||node.tagName:"",idCounter++].join("_")}if(!(this.node||node)){new Error(this.declaredClass+": no node provided to "+this.id)}},set:function(cont,params){if(undefined!==cont){this.content=cont}if(params){this._mixin(params)}this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var node=this.node;if(!node){console.error("setContent given no node")}try{node=dojo.html._setNodeContent(node,this.content)}catch(e){var errMess=this.onContentError(e);try{node.innerHTML=errMess}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e)}}this.node=node},empty:function(){if(this.parseResults&&this.parseResults.length){dojo.forEach(this.parseResults,function(w){if(w.destroy){w.destroy()}});delete this.parseResults}dojo.html._emptyNode(this.node)},onBegin:function(){var cont=this.content;if(dojo.isString(cont)){if(this.cleanContent){cont=dojo.html._secureForInnerHtml(cont)}if(this.extractContent){var match=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(match){cont=match[1]}}}this.empty();this.content=cont;return this.node},onEnd:function(){if(this.parseContent){this._parse()}return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(err){return"Error occured setting content: "+err},_mixin:function(params){var empty={},key;for(key in params){if(key in empty){continue}this[key]=params[key]}},_parse:function(){var rootNode=this.node;try{this.parseResults=dojo.parser.parse(rootNode,true)}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(type,err,consoleText){var errText=this["on"+type+"Error"].call(this,err);if(consoleText){console.error(consoleText,err)}else{if(errText){dojo.html._setNodeContent(this.node,errText,true)}}}});dojo.html.set=function(node,cont,params){if(undefined==cont){console.warn("dojo.html.set: no cont argument provided, using empty string");cont=""}if(!params){return dojo.html._setNodeContent(node,cont,true)}else{var op=new dojo.html._ContentSetter(dojo.mixin(params,{content:cont,node:node}));return op.set()}}})()}if(!dojo._hasResource["dijit.layout.ContentPane"]){dojo._hasResource["dijit.layout.ContentPane"]=true;dojo.provide("dijit.layout.ContentPane");dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,ioArgs:{},isContainer:true,isLayoutContainer:true,onLoadDeferred:null,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[]}),postMixInProperties:function(){this.inherited(arguments);var messages=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,messages);this.errorMessage=dojo.string.substitute(this.errorMessage,messages);if(!this.href&&this.srcNodeRef&&this.srcNodeRef.innerHTML){this.isLoaded=true}},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode}},postCreate:function(){this.domNode.title="";if(!dojo.attr(this.domNode,"role")){dijit.setWaiRole(this.domNode,"group")}dojo.addClass(this.domNode,this.baseClass)},startup:function(){if(this._started){return}var parent=dijit._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=parent&&parent.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;if(this.isLoaded){dojo.forEach(this.getChildren(),function(child){child.startup()})}if(this._isShown()||this.preload){this._onShow()}this.inherited(arguments)},_checkIfSingleChild:function(){var childNodes=dojo.query("> *",this.containerNode).filter(function(node){return node.tagName!=="SCRIPT"}),childWidgetNodes=childNodes.filter(function(node){return dojo.hasAttr(node,"dojoType")||dojo.hasAttr(node,"widgetId")}),candidateWidgets=dojo.filter(childWidgetNodes.map(dijit.byNode),function(widget){return widget&&widget.domNode&&widget.resize});if(childNodes.length==childWidgetNodes.length&&candidateWidgets.length==1){this._singleChild=candidateWidgets[0]}else{delete this._singleChild}dojo.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},setHref:function(href){dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use attr('href', ...) instead.","","2.0");return this.attr("href",href)},_setHrefAttr:function(href){this.cancel();this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));this.href=href;if(this._created&&(this.preload||this._isShown())){this._load()}else{this._hrefChanged=true}return this.onLoadDeferred},setContent:function(data){dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use attr('content', ...) instead.","","2.0");this.attr("content",data)},_setContentAttr:function(data){this.href="";this.cancel();this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));this._setContent(data||"");this._isDownloaded=false;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel()}delete this._xhrDfd;this.onLoadDeferred=null},uninitialize:function(){if(this._beingDestroyed){this.cancel()}this.inherited(arguments)},destroyRecursive:function(preserveDom){if(this._beingDestroyed){return}this.inherited(arguments)},resize:function(changeSize,resultSize){if(!this._wasShown){this._onShow()}this._resizeCalled=true;if(changeSize){dojo.marginBox(this.domNode,changeSize)}var cn=this.containerNode;if(cn===this.domNode){var mb=resultSize||{};dojo.mixin(mb,changeSize||{});if(!("h" in mb)||!("w" in mb)){mb=dojo.mixin(dojo.marginBox(cn),mb)}this._contentBox=dijit.layout.marginBox2contentBox(cn,mb)}else{this._contentBox=dojo.contentBox(cn)}this._layoutChildren()},_isShown:function(){if(this._childOfLayoutWidget){if(this._resizeCalled&&"open" in this){return this.open}return this._resizeCalled}else{if("open" in this){return this.open}else{var node=this.domNode;return(node.style.display!="none")&&(node.style.visibility!="hidden")&&!dojo.hasClass(node,"dijitHidden")}}},_onShow:function(){if(this.href){if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){this.refresh()}}else{if(!this._childOfLayoutWidget&&this._needLayout){this._layoutChildren()}}this.inherited(arguments);this._wasShown=true},refresh:function(){this.cancel();this.onLoadDeferred=new dojo.Deferred(dojo.hitch(this,"cancel"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),true);var self=this;var getArgs={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(getArgs,this.ioArgs)}var hand=(this._xhrDfd=(this.ioMethod||dojo.xhrGet)(getArgs));hand.addCallback(function(html){try{self._isDownloaded=true;self._setContent(html,false);self.onDownloadEnd()}catch(err){self._onError("Content",err)}delete self._xhrDfd;return html});hand.addErrback(function(err){if(!hand.canceled){self._onError("Download",err)}delete self._xhrDfd;return err});delete this._hrefChanged},_onLoadHandler:function(data){this.isLoaded=true;try{this.onLoadDeferred.callback(data);this.onLoad(data)}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message)}},_onUnloadHandler:function(){this.isLoaded=false;try{this.onUnload()}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message)}},destroyDescendants:function(){if(this.isLoaded){this._onUnloadHandler()}var setter=this._contentSetter;dojo.forEach(this.getChildren(),function(widget){if(widget.destroyRecursive){widget.destroyRecursive()}});if(setter){dojo.forEach(setter.parseResults,function(widget){if(widget.destroyRecursive&&widget.domNode&&widget.domNode.parentNode==dojo.body()){widget.destroyRecursive()}});delete setter.parseResults}dojo.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(cont,isFakeContent){this.destroyDescendants();var setter=this._contentSetter;if(!(setter&&setter instanceof dojo.html._ContentSetter)){setter=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){var errMess=this.onContentError(e);try{this.containerNode.innerHTML=errMess}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e)}})})}var setterParams=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});dojo.mixin(setter,setterParams);setter.set((dojo.isObject(cont)&&cont.domNode)?cont.domNode:cont);delete this._contentSetterParams;if(!isFakeContent){dojo.forEach(this.getChildren(),function(child){if(!this.parseOnLoad||child.getParent){child.startup()}},this);this._scheduleLayout();this._onLoadHandler(cont)}},_onError:function(type,err,consoleText){this.onLoadDeferred.errback(err);var errText=this["on"+type+"Error"].call(this,err);if(consoleText){console.error(consoleText,err)}else{if(errText){this._setContent(errText,true)}}},_scheduleLayout:function(){if(this._isShown()){this._layoutChildren()}else{this._needLayout=true}},_layoutChildren:function(){if(this.doLayout){this._checkIfSingleChild()}if(this._singleChild&&this._singleChild.resize){var cb=this._contentBox||dojo.contentBox(this.containerNode);this._singleChild.resize({w:cb.w,h:cb.h})}else{dojo.forEach(this.getChildren(),function(widget){if(widget.resize){widget.resize()}})}delete this._needLayout},onLoad:function(data){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(error){},onDownloadError:function(error){return this.errorMessage},onDownloadEnd:function(){}})}if(!dojo._hasResource["dijit.TooltipDialog"]){dojo._hasResource["dijit.TooltipDialog"]=true;dojo.provide("dijit.TooltipDialog");dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:dojo.cache("dijit","templates/TooltipDialog.html",'<div waiRole="presentation">\r\n\t<div class="dijitTooltipContainer" waiRole="presentation">\r\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" tabindex="-1" waiRole="dialog"></div>\r\n\t</div>\r\n\t<div class="dijitTooltipConnector" waiRole="presentation"></div>\r\n</div>\r\n'),postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey");this.containerNode.title=this.title},orient:function(node,aroundCorner,corner){var c=this._currentOrientClass;if(c){dojo.removeClass(this.domNode,c)}c="dijitTooltipAB"+(corner.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(corner.charAt(0)=="T"?"Below":"Above");dojo.addClass(this.domNode,c);this._currentOrientClass=c},onOpen:function(pos){this.orient(this.domNode,pos.aroundCorner,pos.corner);this._onShow();if(this.autofocus){this._getFocusItems(this.containerNode);dijit.focus(this._firstFocusItem)}},onClose:function(){this.onHide()},_onKey:function(evt){var node=evt.target;var dk=dojo.keys;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.containerNode)}var singleFocusItem=(this._firstFocusItem==this._lastFocusItem);if(evt.charOrCode==dk.ESCAPE){setTimeout(dojo.hitch(this,"onCancel"),0);dojo.stopEvent(evt)}else{if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!singleFocusItem){dijit.focus(this._lastFocusItem)}dojo.stopEvent(evt)}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!singleFocusItem){dijit.focus(this._firstFocusItem)}dojo.stopEvent(evt)}else{if(evt.charOrCode===dk.TAB){evt.stopPropagation()}}}}}})}if(!dojo._hasResource["dijit.Dialog"]){dojo._hasResource["dijit.Dialog"]=true;dojo.provide("dijit.Dialog");dojo.declare("dijit._DialogBase",[dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:dojo.cache("dijit","templates/Dialog.html",'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\r\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\r\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\r\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave" title="${buttonCancel}">\r\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\r\n\t</span>\r\n\t</div>\r\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\r\n</div>\r\n'),attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){var _nlsResources=dojo.i18n.getLocalization("dijit","common");dojo.mixin(this,_nlsResources);this.inherited(arguments)},postCreate:function(){dojo.style(this.domNode,{display:"none",position:"absolute"});dojo.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();this.inherited(arguments)},_endDrag:function(e){if(e&&e.node&&e.node===this.domNode){this._relativePosition=dojo.position(e.node)}},_setup:function(){var node=this.domNode;if(this.titleBar&&this.draggable){this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(node,{handle:this.titleBar}):new dojo.dnd.Moveable(node,{handle:this.titleBar,timeout:0});dojo.subscribe("/dnd/move/stop",this,"_endDrag")}else{dojo.addClass(node,"dijitDialogFixed")}this.underlayAttrs={dialogId:this.id,"class":dojo.map(this["class"].split(/\s/),function(s){return s+"_underlay"}).join(" ")};this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,beforeBegin:dojo.hitch(this,function(){var underlay=dijit._underlay;if(!underlay){underlay=dijit._underlay=new dijit.DialogUnderlay(this.underlayAttrs)}else{underlay.attr(this.underlayAttrs)}var zIndex=948+dijit._dialogStack.length*2;dojo.style(dijit._underlay.domNode,"zIndex",zIndex);dojo.style(this.domNode,"zIndex",zIndex+1);underlay.show()}),onEnd:dojo.hitch(this,function(){if(this.autofocus){this._getFocusItems(this.domNode);dijit.focus(this._firstFocusItem)}})});this._fadeOut=dojo.fadeOut({node:node,duration:this.duration,onEnd:dojo.hitch(this,function(){node.style.display="none";var ds=dijit._dialogStack;if(ds.length==0){dijit._underlay.hide()}else{dojo.style(dijit._underlay.domNode,"zIndex",948+ds.length*2);dijit._underlay.attr(ds[ds.length-1].underlayAttrs)}if(this.refocus){var focus=this._savedFocus;if(ds.length>0){var pd=ds[ds.length-1];if(!dojo.isDescendant(focus.node,pd.domNode)){pd._getFocusItems(pd.domNode);focus=pd._firstFocusItem}}dijit.focus(focus)}})})},uninitialize:function(){var wasPlaying=false;if(this._fadeIn&&this._fadeIn.status()=="playing"){wasPlaying=true;this._fadeIn.stop()}if(this._fadeOut&&this._fadeOut.status()=="playing"){wasPlaying=true;this._fadeOut.stop()}if(this.open||wasPlaying){dijit._underlay.hide()}if(this._moveable){this._moveable.destroy()}this.inherited(arguments)},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle){this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle}delete this._singleChildOriginalStyle}else{dojo.style(this.containerNode,{width:"auto",height:"auto"})}var mb=dojo.marginBox(this.domNode);var viewport=dijit.getViewport();if(mb.w>=viewport.w||mb.h>=viewport.h){var w=Math.min(mb.w,Math.floor(viewport.w*0.75)),h=Math.min(mb.h,Math.floor(viewport.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:w,h:h})}else{dojo.style(this.containerNode,{width:w+"px",height:h+"px",overflow:"auto",position:"relative"})}}else{if(this._singleChild&&this._singleChild.resize){this._singleChild.resize()}}},_position:function(){if(!dojo.hasClass(dojo.body(),"dojoMove")){var node=this.domNode,viewport=dijit.getViewport(),p=this._relativePosition,bb=p?null:dojo._getBorderBox(node),l=Math.floor(viewport.l+(p?p.x:(viewport.w-bb.w)/2)),t=Math.floor(viewport.t+(p?p.y:(viewport.h-bb.h)/2));dojo.style(node,{left:l+"px",top:t+"px"})}},_onKey:function(evt){var ds=dijit._dialogStack;if(ds[ds.length-1]!=this){return}if(evt.charOrCode){var dk=dojo.keys;var node=evt.target;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.domNode)}var singleFocusItem=(this._firstFocusItem==this._lastFocusItem);if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!singleFocusItem){dijit.focus(this._lastFocusItem)}dojo.stopEvent(evt)}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!singleFocusItem){dijit.focus(this._firstFocusItem)}dojo.stopEvent(evt)}else{while(node){if(node==this.domNode||dojo.hasClass(node,"dijitPopup")){if(evt.charOrCode==dk.ESCAPE){this.onCancel()}else{return}}node=node.parentNode}if(evt.charOrCode!==dk.TAB){dojo.stopEvent(evt)}else{if(!dojo.isOpera){try{this._firstFocusItem.focus()}catch(e){}}}}}}},show:function(){if(this.open){return}if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true}if(this._fadeOut.status()=="playing"){this._fadeOut.stop()}this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));this._modalconnects.push(dojo.connect(window,"onresize",this,function(){var viewport=dijit.getViewport();if(!this._oldViewport||viewport.h!=this._oldViewport.h||viewport.w!=this._oldViewport.w){this.layout();this._oldViewport=viewport}}));this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));dojo.style(this.domNode,{opacity:0,display:""});this.open=true;this._onShow();this._size();this._position();dijit._dialogStack.push(this);this._fadeIn.play();this._savedFocus=dijit.getFocus(this)},hide:function(){var ds=dijit._dialogStack;if(!this._alreadyInitialized||this!=ds[ds.length-1]){return}if(this._fadeIn.status()=="playing"){this._fadeIn.stop()}ds.pop();this._fadeOut.play();if(this._scrollConnected){this._scrollConnected=false}dojo.forEach(this._modalconnects,dojo.disconnect);this._modalconnects=[];if(this._relativePosition){delete this._relativePosition}this.open=false;this.onHide()},layout:function(){if(this.domNode.style.display!="none"){if(dijit._underlay){dijit._underlay.layout()}this._position()}},destroy:function(){dojo.forEach(this._modalconnects,dojo.disconnect);if(this.refocus&&this.open){setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25)}this.inherited(arguments)},_onCloseEnter:function(){dojo.addClass(this.closeButtonNode,"dijitDialogCloseIcon-hover")},_onCloseLeave:function(){dojo.removeClass(this.closeButtonNode,"dijitDialogCloseIcon-hover")}});dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._DialogBase],{});dijit._dialogStack=[]}if(!dojo._hasResource["local.Popup"]){dojo._hasResource["local.Popup"]=true;dojo.provide("local.Popup");dojo.declare("PopupOLD",_Popup,{activateTabs:function(tabs){dojo.query("li a",this._templateNavigation[0]).forEach(function(item){if(-1==dojo.indexOf(tabs,item.className)){dojo.addClass(item.parentNode,"tab-hidden")}else{dojo.removeClass(item.parentNode,"tab-hidden")}});this._setElementVisibility(this._templateNavigation[0],false);return this},renderPartial:function(url,popupTitle,popupClazz){oldpopup().loading();async().call(url,function(response){oldpopup().setTitle(application().getTranslator().translate(popupTitle)).setClass("popup "+popupClazz).setContent(response).show()})},renderVideoTips:function(videoName,title){var videos={"address-book":"demo-adresses.mp4",company:"demo-societe.mp4",profile:"demo-profile.mp4",dashboard:"demo-dashboard.mp4"};if("undefined"==typeof videos[videoName]){return}title=(null==title||"undefined"==typeof title)?"help":title;oldpopup().loadVideo({url:application().buildUrl("/static/corporate/video/"+videos[videoName],"user"),width:"640",height:"480",popupTitle:application().getTranslator().translate(title),popupClass:"popup popup-help"})},renderTips:function(xpathQuery,title){var tips=dojo.query(xpathQuery);if(null==tips[0]){return}title=(null==title||"undefined"==typeof title)?"help":title;var content=dojo.clone(tips[0]);oldpopup().setTitle(application().getTranslator().translate(title)).setClass("popup popup-help").setContent(content,true).show()},loadVideo:function(options){oldpopup().setTitle(application().getTranslator().translate(options.popupTitle)).setClass("popup "+options.popupClass).setContent('<div class="object-content"><div id="video-player"></div></div>');var flashvars={file:options.url,autostart:false,controlbar:"over",width:"640",height:"480"};var params={allowfullscreen:"true",allowscriptaccess:"always",wmode:"transparent"};var playerId="player-"+new Date().getTime();var attributes={id:playerId,name:playerId};swfobject.embedSWF("/flash/jw-player.swf","video-player",options.width,options.height,"9.0.115","http://get.adobe.com/flashplayer/",flashvars,params,attributes,function(evt){if(false==evt.success){oldpopup().setContent('<a href="http://get.adobe.com/flashplayer/" title="Obtenir le player flash"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="adobe flash player" width="158" height="39" /></a>')}oldpopup().show()});playerReady=function(playerRef){var player=dojo.byId(playerRef.id);if("BUFFERING"!=player.getConfig().state){setTimeout(function(){player.sendEvent("PLAY")},500)}}}});dojo.provide("local.Popup");dojo.declare("Popup",dijit.Dialog,{_listeners:{},parseOnLoad:false,_cacheUrl:null,subscribe:function(scope,callback){if(dojo.isString(scope)&&""!=scope&&dojo.isFunction(callback)){this._listeners[scope]=dojo.subscribe("/popup/"+scope,callback)}return this},show:function(attributes,useCache){useCache=(true==useCache||false==useCache)?useCache:true;if(useCache&&"undefined"!=typeof attributes.href){if(false==register().has(attributes.href)){this._cacheUrl=attributes.href}else{attributes.content=register().get(attributes.href);delete attributes.href}}this.reset();if("undefined"!=typeof attributes.title){attributes.title=application().getTranslator().toOctal(attributes.title)}this.attr(dojo.mixin(attributes,{draggable:false,closable:true}));this.inherited(arguments);return this},_setContent:function(cont,isFakeContent){this.inherited(arguments);dojo.publish("/popup/set_content");if(false==isFakeContent&&null!=this._cacheUrl){register().set(this._cacheUrl,cont,true)}},refreshPosition:function(){this._position()},onLoad:function(){this.inherited(arguments);try{var form=this.query("form")[0];dojo.attr(form,"autocomplete","off");Utils.formSetFocus(form)}catch(e){}dojo.publish("/popup/onload");dojo.unsubscribe(this._listeners.onload)},hide:function(){dojo.publish("/popup/hide");dojo.publish("/popup/close");dojo.unsubscribe(this._listeners.hide);this.inherited(arguments)},getContentNode:function(){return this.containerNode},query:function(xpath){return dojo.query(xpath,this.getContentNode())}});var __popup=null;oldpopup=function(){if(null==__popup){Utils.appendStylesheet("/css/popup.css");__popup=new PopupOLD()}return __popup};var _popup=null;popup=function(){if(null==_popup){_popup=new Popup()}return _popup}}if(!dojo._hasResource["dojo.io.script"]){dojo._hasResource["dojo.io.script"]=true;dojo.provide("dojo.io.script");(function(){var loadEvent=dojo.isIE?"onreadystatechange":"load",readyRegExp=/complete|loaded/;dojo.io.script={get:function(args){var dfd=this._makeScriptDeferred(args);var ioArgs=dfd.ioArgs;dojo._ioAddQueryToUrl(ioArgs);dojo._ioNotifyStart(dfd);if(this._canAttach(ioArgs)){var node=this.attach(ioArgs.id,ioArgs.url,args.frameDoc);if(!ioArgs.jsonp&&!ioArgs.args.checkString){var handle=dojo.connect(node,loadEvent,function(evt){if(evt.type=="load"||readyRegExp.test(node.readyState)){dojo.disconnect(handle);ioArgs.scriptLoaded=evt}})}}dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);return dfd},attach:function(id,url,frameDocument){var doc=(frameDocument||dojo.doc);var element=doc.createElement("script");element.type="text/javascript";element.src=url;element.id=id;element.charset="utf-8";return doc.getElementsByTagName("head")[0].appendChild(element)},remove:function(id,frameDocument){dojo.destroy(dojo.byId(id,frameDocument));if(this["jsonp_"+id]){delete this["jsonp_"+id]}},_makeScriptDeferred:function(args){var dfd=dojo._ioSetArgs(args,this._deferredCancel,this._deferredOk,this._deferredError);var ioArgs=dfd.ioArgs;ioArgs.id=dojo._scopeName+"IoScript"+(this._counter++);ioArgs.canDelete=false;ioArgs.jsonp=args.callbackParamName||args.jsonp;if(ioArgs.jsonp){ioArgs.query=ioArgs.query||"";if(ioArgs.query.length>0){ioArgs.query+="&"}ioArgs.query+=ioArgs.jsonp+"="+(args.frameDoc?"parent.":"")+dojo._scopeName+".io.script.jsonp_"+ioArgs.id+"._jsonpCallback";ioArgs.frameDoc=args.frameDoc;ioArgs.canDelete=true;dfd._jsonpCallback=this._jsonpCallback;this["jsonp_"+ioArgs.id]=dfd}return dfd},_deferredCancel:function(dfd){dfd.canceled=true;if(dfd.ioArgs.canDelete){dojo.io.script._addDeadScript(dfd.ioArgs)}},_deferredOk:function(dfd){var ioArgs=dfd.ioArgs;if(ioArgs.canDelete){dojo.io.script._addDeadScript(ioArgs)}return ioArgs.json||ioArgs.scriptLoaded||ioArgs},_deferredError:function(error,dfd){if(dfd.ioArgs.canDelete){if(error.dojoType=="timeout"){dojo.io.script.remove(dfd.ioArgs.id,dfd.ioArgs.frameDoc)}else{dojo.io.script._addDeadScript(dfd.ioArgs)}}console.log("dojo.io.script error",error);return error},_deadScripts:[],_counter:1,_addDeadScript:function(ioArgs){dojo.io.script._deadScripts.push({id:ioArgs.id,frameDoc:ioArgs.frameDoc});ioArgs.frameDoc=null},_validCheck:function(dfd){var _self=dojo.io.script;var deadScripts=_self._deadScripts;if(deadScripts&&deadScripts.length>0){for(var i=0;i<deadScripts.length;i++){_self.remove(deadScripts[i].id,deadScripts[i].frameDoc);deadScripts[i].frameDoc=null}dojo.io.script._deadScripts=[]}return true},_ioCheck:function(dfd){var ioArgs=dfd.ioArgs;if(ioArgs.json||(ioArgs.scriptLoaded&&!ioArgs.args.checkString)){return true}var checkString=ioArgs.args.checkString;if(checkString&&eval("typeof("+checkString+") != 'undefined'")){return true}return false},_resHandle:function(dfd){if(dojo.io.script._ioCheck(dfd)){dfd.callback(dfd)}else{dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"))}},_canAttach:function(ioArgs){return true},_jsonpCallback:function(json){this.ioArgs.json=json}}})()}if(!dojo._hasResource["local.Application"]){dojo._hasResource["local.Application"]=true;dojo.provide("local.Application");dojo.declare("Application",null,{_locale:"fr",_translator:null,_isDebug:false,_module:"",_domain:"",constructor:function(){this._setupDojoTheme()._setupRegister()._setupObserver()._setupDebugMode()._setupLocale()._setupDomainName()._setupModuleName()._setupTranslator()._setupPopup()._setupGoogleTracking()},_setupDojoTheme:function(){dojo.addClass(dojo.body(),"tundra tundra-3999");return this},_setupRegister:function(){register();return this},_setupObserver:function(){applicationObserver();return this},_setupDebugMode:function(){this._isDebug=false;if("undefined"!=dojo.config.isDebug&&true==dojo.config.isDebug){this._isDebug=true}return this},isDebug:function(){return this._isDebug},_setupLocale:function(){dojo.locale="fr";this._locale=dojo.i18n.normalizeLocale(dojo.config.locale);return this},_setupTranslator:function(){this._translator=new i18n();this._translator.getLocalization("default",this.getLocale());return this},getTranslator:function(){return this._translator},getLocale:function(){return this._locale},_setupPopup:function(){return this},_setupModuleName:function(){if(null==this.getDomainName()){this._module=""}else{if("undefined"!=dojo.config.subDomain&&dojo.isString(dojo.config.subDomain)){this._module=dojo.config.subDomain}}return this},getModuleName:function(){return this._module},_setupDomainName:function(){if("undefined"!=dojo.config.domainName&&dojo.isString(dojo.config.domainName)){this._domain=dojo.config.domainName}return this},getDomainName:function(){return this._domain},isAppDomain:function(){var host=window.location.host;if(/(local|3999).(dev|info|com)$/.test(host)){return true}return false},buildUrl:function(uri,module,scheme){uri=(false==dojo.isString(uri)||""==uri)?"":uri;if(false==this.isAppDomain()){return"http://"+window.location.host+uri}var useDefinedScheme=true;if(false==dojo.isString(scheme)||("http"!=scheme&&"https"!=scheme)){scheme=(("https:"==document.location.protocol)?"https":"http");useDefinedScheme=false}if("undefined"==typeof module||!dojo.isString(module)){module=this.getModuleName()}var domain=this.getDomainName();if(""==domain){domain=document.location.host;module=""}if(""!=module){module+=".";if("user"==module&&false==useDefinedScheme){scheme="https"}}return scheme+"://"+module+domain+uri},cleanXhrUrl:function(url){var currentHost=this.buildUrl("");if(new RegExp("^"+currentHost).test(url)){return url}try{return url.replace(new RegExp("^http(s)?://([a-z]+.)?"+this.getDomainName()),currentHost)}catch(e){}return""},log:function(stack,e,level){if(null==dojo.config.domainName||"3999.com"==dojo.config.domainName){return}if(false==this.isDebug()){return}if(false==dojo.isString(level)||""==level){level="log"}console.group(stack);dojo.eval("console."+level+"('"+e+"');");console.groupEnd()},_setupGoogleTracking:function(){try{dojo.io.script.attach("gat","/js/local/tracker.js")}catch(e){this.log("application._setupGoogleTracking",e)}},parseException:function(e){if(false==dojo.isString(e)||""==e){return}var tokens=e.split(":");if(0==tokens.length||"Exception"!=tokens[0]){return}switch(tokens[1]){case"not_logged":window.location=this.buildUrl("/login","user","https");throw e;break;default:window.location=this.buildUrl("/error","","");throw e;break}}});var _application=null;application=function(){if(null==_application){_application=new Application()}return _application}}if(!dojo._hasResource["local.Form.Abstract"]){dojo._hasResource["local.Form.Abstract"]=true;dojo.provide("local.Form.Abstract");dojo.declare("Form_Abstract",null,{_form:null,_formId:null,_formContainer:null,_belongsTo:null,_xhrSend:false,_fieldsets:{},_fields:{},_widgets:{},constructor:function(form){this._fieldsets={};this._fields={};this._widgets={};this.setForm(form)},enableXhr:function(){this._xhrSend=true;return this},setForm:function(form){if(dojo.isObject(form)&&null!=form&&"form"==form.nodeName.toLowerCase()){this._form=form;this._formId=dojo.attr(this._form,"id")}return this},setContainer:function(container){if(false==dojo.isObject(container)||null==container){return this}this._formContainer=container;return this},build:function(){if(null==this._form){throw"Form requires node"}this.destroy();if(true==this._xhrSend){applicationObserver(this._formId).connect(dojo.connect(this._form,"onsubmit",dojo.hitch(this,function(evt){evt.preventDefault();this.submit()})))}},subscribe:function(scope,callback){if(dojo.isString(scope)&&""!=scope&&dojo.isFunction(callback)){dojo.subscribe("/form/"+this.getId()+"/"+scope,callback)}return this},destroy:function(){applicationObserver(this._formId).clean();for(index in this._fieldsets){try{this.getFieldset(index).destroy()}catch(e){}}this._processNode=null},submit:function(){dojo.publish("/form/"+this.getId()+"/submit");this.showProcess(true);dojo.xhr(this.getMethod(),{url:this._getXhrQuery("partial"),form:this._form,handleAs:"text",load:dojo.hitch(this,function(response,ioArgs){dojo.publish("/form/"+this.getId()+"/submited",[response,true]);this.showProcess(false)}),error:dojo.hitch(this,function(){dojo.publish("/form/"+this.getId()+"/submited",[application().getTranslator().translate("error"),false]);this.showProcess(false)}),sync:true})},showProcess:function(visible){if(null==this._processNode){var container=(null==this._formContainer)?this._form:this._formContainer;this._processNode=dojo.create("div",{"class":"form-process",innerHTML:"<span />"},container,"last");dojo.addClass(container,"xhr-form")}if(true==visible){dojo.removeClass(this._processNode,"elem-hidden")}else{dojo.addClass(this._processNode,"elem-hidden")}},get:function(){return this._form},getId:function(){return this.getBelongsTo()},getBelongsTo:function(){if(null==this._belongsTo){this._belongsTo=dojo.attr(this._form,"id")}return this._belongsTo},getMethod:function(){var method=dojo.attr(this._form,"method");if("get"!=method||"post"!=method){return"post"}return method},getAction:function(){return dojo.attr(this._form,"action")},_getXhrQuery:function(format){var query="";if(true==dojo.isString(format)&&""!=format){var firstArg="?";if(/\?(.+)=/.test(this._action)){firstArg="&"}query=firstArg+"format="+format}return dojo.attr(this._form,"action")+query},registerFieldset:function(fieldset,id){if(false==dojo.isObject(fieldset)||null==fieldset){return this}id=(dojo.isString(id)&&""!=id)?id:fieldset.id;this._fieldsets[id]=fieldset;return this},unregisterFieldset:function(id){try{if(this.hasFieldset(id)){dijit.destroy(this.getFieldset(id))}delete this._fieldsets[id]}catch(e){}},hasFieldset:function(id){if(false==dojo.isString(id)||""==id){return false}if("undefined"==typeof this._fieldsets[id]){return false}return true},getFieldset:function(id){if(true==this.hasFieldset(id)){return this._fieldsets[id]}return null},getFieldsets:function(){return this._fieldsetss},_extractField:function(id){try{var field=dojo.query("#"+this.getBelongsTo()+"-"+id,this._form)[0];if(null==field){field=false}this._fields[id]=field}catch(e){this._fields[id]=false}},hasField:function(id){this._extractField(id);if(false!=typeof this._fields[id]){return true}return false},getField:function(id){if(true==this.hasField(id)){return this._fields[id]}return null},registerField:function(field,id){if(false==dojo.isObject(field)||null==field){return this}id=(dojo.isString(id)&&""!=id)?id:field.id;this._fields[id]=field;return this},unregisterField:function(id){try{if(this.hasField(id)){dijit.destroy(this.getField(id))}delete this._fields[id]}catch(e){}},registerWidget:function(widget,id){if(false==dojo.isObject(widget)||null==widget){return this}id=(dojo.isString(id)&&""!=id)?id:widget.id;this._widgets[id]=widget;return this},hasWidget:function(id){if("undefined"!=typeof this._widgets[id]){return true}return false},getWidget:function(id){if(true==this.hasWidget(id)){return this._widgets[id]}return null},unregisterWidget:function(id){try{if(this.hasWidget(id)){dijit.destroy(this.getWidget(id))}delete this._widgets[id]}catch(e){}}})}if(!dojo._hasResource["local.Popup._Form"]){dojo._hasResource["local.Popup._Form"]=true;dojo.provide("local.Popup._Form");dojo.declare("Form_Popup",null,{_item:null,_href:"",_popup:null,_popupConfig:null,_cache:true,_form:null,_formId:null,_cssLink:"",_listeners:[],constructor:function(item){this._listeners=[];this.setRelatedTrigger(item)},setRelatedTrigger:function(item){if(false==dojo.isObject(item)||null==item){return this}this._item=item;this.setHref(dojo.attr(item,"href"));return this},setHref:function(href){if(false==dojo.isString(href)||""==href){return this}this._href=href;return this},connect:function(item){this.setRelatedTrigger(item);if(null==this._item||""==this._href||null==this._popupConfig||null==this._formId){throw"Unable to build form: missing parameter"}dojo.connect(this._item,"onclick",dojo.hitch(this,function(evt){evt.preventDefault();this.open()}))},open:function(){if(""==this._href||null==this._popupConfig||null==this._formId){throw"Unable to open form: missing parameter"}this._popupConfig.href=this._getXhrHref();if(""!=this._cssLink){layout().appendStylesheet("/css/"+this._cssLink)}popup().subscribe("onload",dojo.hitch(this,"_init")).subscribe("hide",dojo.hitch(this,"destroy")).show(this._popupConfig,this._cache)},_getXhrHref:function(){var querySeparator="?";if(/\?/.test(this._href)){querySeparator="&"}var href=this._href.replace(/^http(s)?:\/\//,"");href=href.substring(href.indexOf("/"));return application().buildUrl(href+querySeparator+"format=partial")},_init:function(){this.destroy();this._initForm();dojo.subscribe("/form/"+this._formId+"/submited",dojo.hitch(this,"_refresh"))},_initForm:function(){try{this._form=new Form_Abstract(dojo.byId(this._formId));this._form.enableXhr().setContainer(popup().getContentNode()).build()}catch(e){application().log("form",e,"error")}},_refresh:function(content,success){dojo.publish("/form/"+this._formId+"/refresh",[success]);if(dojo.isString(content)){popup().attr("content",content)}this._initForm()},destroy:function(){try{this._form.destroy()}catch(e){}}})}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,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments)},_setDisabledAttr:function(value){this.disabled=value;dojo.attr(this.focusNode,"disabled",value);if(this.valueNode){dojo.attr(this.valueNode,"disabled",value)}dijit.setWaiState(this.focusNode,"disabled",value);if(value){this._hovering=false;this._active=false;this.focusNode.setAttribute("tabIndex","-1")}else{this.focusNode.setAttribute("tabIndex",this.tabIndex)}this._setStateClass()},setDisabled:function(disabled){dojo.deprecated("setDisabled("+disabled+") is deprecated. Use attr('disabled',"+disabled+") instead.","","2.0");this.attr("disabled",disabled)},_onFocus:function(e){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode)}this.inherited(arguments)},_onMouse:function(event){var mouseNode=event.currentTarget;if(mouseNode&&mouseNode.getAttribute){this.stateModifier=mouseNode.getAttribute("stateModifier")||""}if(!this.disabled){switch(event.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 mouseUpConnector=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus()}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(mouseUpConnector)});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 newStateClasses=this.baseClass.split(" ");function multiply(modifier){newStateClasses=newStateClasses.concat(dojo.map(newStateClasses,function(c){return c+modifier}),"dijit"+modifier)}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,classHash={};dojo.forEach(tn.className.split(" "),function(c){classHash[c]=true});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete classHash[c]})}dojo.forEach(newStateClasses,function(c){classHash[c]=true});var newClasses=[];for(var c in classHash){newClasses.push(c)}tn.className=newClasses.join(" ");this._stateClasses=newStateClasses},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(newValue){},_onChangeActive:false,_handleOnChange:function(newValue,priorityChange){this._lastValue=newValue;if(this._lastValueReported==undefined&&(priorityChange===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=newValue}if((this.intermediateChanges||priorityChange||priorityChange===undefined)&&((typeof newValue!=typeof this._lastValueReported)||this.compare(newValue,this._lastValueReported)!=0)){this._lastValueReported=newValue;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle)}this._onChangeHandle=setTimeout(dojo.hitch(this,function(){this._onChangeHandle=null;this.onChange(newValue)}),0)}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass()},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported)}this.inherited(arguments)},setValue:function(value){dojo.deprecated("dijit.form._FormWidget:setValue("+value+") is deprecated.  Use attr('value',"+value+") instead.","","2.0");this.attr("value",value)},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value")}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(value){this.readOnly=value;dojo.attr(this.focusNode,"readOnly",value);dijit.setWaiState(this.focusNode,"readonly",value);this._setStateClass()},postCreate:function(){if(dojo.isIE){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown)}if(this._resetValue===undefined){this._resetValue=this.value}},_setValueAttr:function(newValue,priorityChange){this.value=newValue;this._handleOnChange(newValue,priorityChange)},_getValueAttr:function(){return this._lastValue},undo:function(){this._setValueAttr(this._lastValueReported,false)},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true)},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te)}}},_layoutHackIE7:function(){if(dojo.isIE==7){var domNode=this.domNode;var parent=domNode.parentNode;var pingNode=domNode.firstChild||domNode;var origFilter=pingNode.style.filter;while(parent&&parent.clientHeight==0){parent._disconnectHandle=this.connect(parent,"onscroll",dojo.hitch(this,function(e){this.disconnect(parent._disconnectHandle);parent.removeAttribute("_disconnectHandle");pingNode.style.filter=(new Date()).getMilliseconds();setTimeout(function(){pingNode.style.filter=origFilter},0)}));parent=parent.parentNode}}}})}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:"",selectOnClick:false,templateString:dojo.cache("dijit.form","templates/TextBox.html",'<input class="dijit dijitReset dijitLeft" dojoAttachPoint=\'textbox,focusNode\'\r\n\tdojoAttachEvent=\'onmouseenter:_onMouse,onmouseleave:_onMouse\'\r\n\tautocomplete="off" type="${type}" ${nameAttrSetting}\r\n\t/>\r\n'),baseClass:"dijitTextBox",attributeMap:dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),_getValueAttr:function(){return this.parse(this.attr("displayedValue"),this.constraints)},_setValueAttr:function(value,priorityChange,formattedValue){var filteredValue;if(value!==undefined){filteredValue=this.filter(value);if(typeof formattedValue!="string"){if(filteredValue!==null&&((typeof filteredValue!="number")||!isNaN(filteredValue))){formattedValue=this.filter(this.format(filteredValue,this.constraints))}else{formattedValue=""}}}if(formattedValue!=null&&formattedValue!=undefined&&((typeof formattedValue)!="number"||!isNaN(formattedValue))&&this.textbox.value!=formattedValue){this.textbox.value=formattedValue}this.inherited(arguments,[filteredValue,priorityChange])},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(value){dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");this.attr("displayedValue",value)},_setDisplayedValueAttr:function(value){if(value===null||value===undefined){value=""}else{if(typeof value!="string"){value=String(value)}}this.textbox.value=value;this._setValueAttr(this.attr("value"),undefined,value)},format:function(value,constraints){return((value==null||value==undefined)?"":(value.toString?value.toString():value))},parse:function(value,constraints){return value},_refreshState:function(){},_onInput:function(e){if(e&&e.type&&/key/i.test(e.type)&&e.keyCode){switch(e.keyCode){case dojo.keys.SHIFT:case dojo.keys.ALT:case dojo.keys.CTRL:case dojo.keys.TAB:return}}if(this.intermediateChanges){var _this=this;setTimeout(function(){_this._handleOnChange(_this.attr("value"),false)},0)}this._refreshState()},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(dojo.isMoz||dojo.isOpera){this.connect(this.textbox,"oninput",this._onInput)}else{this.connect(this.textbox,"onkeydown",this._onInput);this.connect(this.textbox,"onkeyup",this._onInput);this.connect(this.textbox,"onpaste",this._onInput);this.connect(this.textbox,"oncut",this._onInput)}},_blankValue:"",filter:function(val){if(val===null){return this._blankValue}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"),true)},_onBlur:function(e){if(this.disabled){return}this._setBlurValue();this.inherited(arguments);if(this._selectOnClickHandle){this.disconnect(this._selectOnClickHandle)}if(this.selectOnClick&&dojo.isMoz){this.textbox.selectionStart=this.textbox.selectionEnd=undefined}},_onFocus:function(by){if(this.disabled||this.readOnly){return}if(this.selectOnClick&&by=="mouse"){this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var textIsNotSelected;if(dojo.isIE){var range=dojo.doc.selection.createRange();var parent=range.parentElement();textIsNotSelected=parent==this.textbox&&range.text.length==0}else{textIsNotSelected=this.textbox.selectionStart==this.textbox.selectionEnd}if(textIsNotSelected){dijit.selectInputText(this.textbox)}})}this._refreshState();this.inherited(arguments)},reset:function(){this.textbox.value="";this.inherited(arguments)}});dijit.selectInputText=function(element,start,stop){var _window=dojo.global;var _document=dojo.doc;element=dojo.byId(element);if(isNaN(start)){start=0}if(isNaN(stop)){stop=element.value?element.value.length:0}dijit.focus(element);if(_document.selection&&dojo.body()["createTextRange"]){if(element.createTextRange){var range=element.createTextRange();with(range){collapse(true);moveStart("character",-99999);moveStart("character",start);moveEnd("character",stop-start);select()}}}else{if(_window.getSelection){if(element.setSelectionRange){element.setSelectionRange(start,stop)}}}}}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:dojo.cache("dijit","templates/Tooltip.html",'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip">\r\n\t<div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" waiRole=\'alert\'></div>\r\n\t<div class="dijitTooltipConnector"></div>\r\n</div>\r\n'),postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")})},show:function(innerHTML,aroundNode,position){if(this.aroundNode&&this.aroundNode===aroundNode){return}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return}this.containerNode.innerHTML=innerHTML;this.domNode.style.top=(this.domNode.offsetTop+1)+"px";var pos=dijit.placeOnScreenAroundElement(this.domNode,aroundNode,dijit.getPopupAroundAlignment((position&&position.length)?position:dijit.Tooltip.defaultPosition,this.isLeftToRight()),dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=aroundNode},orient:function(node,aroundCorner,tooltipCorner){node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[aroundCorner+"-"+tooltipCorner]},_onShow:function(){if(dojo.isIE){this.domNode.style.filter=""}},hide:function(aroundNode){if(this._onDeck&&this._onDeck[1]==aroundNode){this._onDeck=null}else{if(this.aroundNode===aroundNode){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play()}else{}}},_onHide:function(){this.domNode.style.cssText="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null}}});dijit.showTooltip=function(innerHTML,aroundNode,position){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip()}return dijit._masterTT.show(innerHTML,aroundNode,position)};dijit.hideTooltip=function(aroundNode){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip()}return dijit._masterTT.hide(aroundNode)};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],constructor:function(){this._nodeConnectionsById={}},_setConnectIdAttr:function(newIds){for(var oldId in this._nodeConnectionsById){this.removeTarget(oldId)}dojo.forEach(dojo.isArrayLike(newIds)?newIds:[newIds],this.addTarget,this)},_getConnectIdAttr:function(){var ary=[];for(var id in this._nodeConnectionsById){ary.push(id)}return ary},addTarget:function(id){var node=dojo.byId(id);if(!node){return}if(node.id in this._nodeConnectionsById){return}this._nodeConnectionsById[node.id]=[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")];if(dojo.isIE&&!node.style.zoom){node.style.zoom=1}},removeTarget:function(node){var id=node.id||node;if(id in this._nodeConnectionsById){dojo.forEach(this._nodeConnectionsById[id],this.disconnect,this);delete this._nodeConnectionsById[id]}},postCreate:function(){dojo.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var ids=this.connectId;dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this)},_onTargetMouseEnter:function(e){this._onHover(e)},_onTargetMouseLeave:function(e){this._onUnHover(e)},_onTargetFocus:function(e){this._focus=true;this._onHover(e)},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e)},_onHover:function(e){if(!this._showTimer){var target=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(target)}),this.showDelay)}},_onUnHover:function(e){if(this._focus){return}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}this.close()},open:function(target){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}dijit.showTooltip(this.label||this.domNode.innerHTML,target,this.position);this._connectNode=target;this.onShow(target,this.position)},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;this.onHide()}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}},onShow:function(target,position){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments)}});dijit.Tooltip.defaultPosition=["after","before"]}if(!dojo._hasResource["dijit.form.ValidationTextBox"]){dojo._hasResource["dijit.form.ValidationTextBox"]=true;dojo.provide("dijit.form.ValidationTextBox");dojo.declare("dijit.form.ValidationTextBox",dijit.form.TextBox,{templateString:dojo.cache("dijit.form","templates/ValidationTextBox.html",'<div class="dijit dijitReset dijitInlineTable dijitLeft"\r\n\tid="widget_${id}"\r\n\tdojoAttachEvent="onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse" waiRole="presentation"\r\n\t><div style="overflow:hidden;"\r\n\t\t><div class="dijitReset dijitValidationIcon"><br></div\r\n\t\t><div class="dijitReset dijitValidationIconText">&Chi;</div\r\n\t\t><div class="dijitReset dijitInputField"\r\n\t\t\t><input class="dijitReset" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\r\n\t\t\t${nameAttrSetting} type=\'${type}\'\r\n\t\t/></div\r\n\t></div\r\n></div>\r\n'),baseClass:"dijitTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",constraints:{},regExp:".*",regExpGen:function(constraints){return this.regExp},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused)},validator:function(value,constraints){return(new RegExp("^(?:"+this.regExpGen(constraints)+")"+(this.required?"":"?")+"$")).test(value)&&(!this.required||!this._isEmpty(value))&&(this._isEmpty(value)||this.parse(value,constraints)!==undefined)},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0},isValid:function(isFocused){return this.validator(this.textbox.value,this.constraints)},_isEmpty:function(value){return/^\s*$/.test(value)},getErrorMessage:function(isFocused){return this.invalidMessage},getPromptMessage:function(isFocused){return this.promptMessage},_maskValidSubsetError:true,validate:function(isFocused){var message="";var isValid=this.disabled||this.isValid(isFocused);if(isValid){this._maskValidSubsetError=true}var isValidSubset=!isValid&&isFocused&&this._isValidSubset();var isEmpty=this._isEmpty(this.textbox.value);if(isEmpty){this._maskValidSubsetError=true}this.state=(isValid||(!this._hasBeenBlurred&&isEmpty)||isValidSubset)?"":"Error";if(this.state=="Error"){this._maskValidSubsetError=false}this._setStateClass();dijit.setWaiState(this.focusNode,"invalid",isValid?"false":"true");if(isFocused){if(isEmpty){message=this.getPromptMessage(true)}if(!message&&(this.state=="Error"||(isValidSubset&&!this._maskValidSubsetError))){message=this.getErrorMessage(true)}}this.displayMessage(message);return isValid},_message:"",displayMessage:function(message){if(this._message==message){return}this._message=message;dijit.hideTooltip(this.domNode);if(message){dijit.showTooltip(message,this.domNode,this.tooltipPosition)}},_refreshState:function(){this.validate(this._focused);this.inherited(arguments)},constructor:function(){this.constraints={}},postMixInProperties:function(){this.inherited(arguments);this.constraints.locale=this.lang;this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$"){this.invalidMessage=this.messages.invalidMessage}var p=this.regExpGen(this.constraints);this.regExp=p;var partialre="";if(p!=".*"){this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){switch(re.charAt(0)){case"{":case"+":case"?":case"*":case"^":case"$":case"|":case"(":partialre+=re;break;case")":partialre+="|$)";break;default:partialre+="(?:"+re+"|$)";break}})}try{"".search(partialre)}catch(e){partialre=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+partialre+")$"},_setDisabledAttr:function(value){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(value){this.required=value;dijit.setWaiState(this.focusNode,"required",value);this._refreshState()},postCreate:function(){if(dojo.isIE){var s=dojo.getComputedStyle(this.focusNode);if(s){var ff=s.fontFamily;if(ff){this.focusNode.style.fontFamily=ff}}}this.inherited(arguments)},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)}});dojo.declare("dijit.form.MappedTextBox",dijit.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},serialize:function(val,options){return val.toString?val.toString():""},toString:function(){var val=this.filter(this.attr("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=dojo.place("<input type='hidden'"+(this.name?" name='"+this.name+"'":"")+">",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});dojo.declare("dijit.form.RangeBoundTextBox",dijit.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(primitive,constraints){return("min" in constraints?(this.compare(primitive,constraints.min)>=0):true)&&("max" in constraints?(this.compare(primitive,constraints.max)<=0):true)},isInRange:function(isFocused){return this.rangeCheck(this.attr("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var val=this.attr("value");var isTooLittle=false;var isTooMuch=false;if("min" in this.constraints){var min=this.constraints.min;min=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min);isTooLittle=(typeof min=="number")&&min<0}if("max" in this.constraints){var max=this.constraints.max;max=this.compare(val,((typeof max!="number")||max>0)?max:0);isTooMuch=(typeof max=="number")&&max>0}return isTooLittle||isTooMuch},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(isFocused){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(isFocused))},getErrorMessage:function(isFocused){var v=this.attr("value");if(v!==null&&v!==""&&v!==undefined&&!this.isInRange(isFocused)){return this.rangeMessage}return this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=dojo.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage}},postCreate:function(){this.inherited(arguments);if(this.constraints.min!==undefined){dijit.setWaiState(this.focusNode,"valuemin",this.constraints.min)}if(this.constraints.max!==undefined){dijit.setWaiState(this.focusNode,"valuemax",this.constraints.max)}},_setValueAttr:function(value,priorityChange){dijit.setWaiState(this.focusNode,"valuenow",value);this.inherited(arguments)}})}if(!dojo._hasResource["local.Form.Element.Field"]){dojo._hasResource["local.Form.Element.Field"]=true;dojo.provide("local.Form.Element.Field");dojo.declare("Form_Element_Field",null,{_widget:null,_showProcess:false,_processNode:null,constructor:function(){this._postConstructor();this._extendValidationTextBox()},_postConstructor:function(){},_destroyExistantWidget:function(id){try{var widget=dijit.byId(id);if("undefined"==typeof widget||null==widget){return}widget.destroy()}catch(e){}},get:function(){return this._widget},getWidget:function(){return this._widget},_buildProcessing:function(){if(false==this._showProcess){return}this._processNode=dojo.create("span");dojo.addClass(this._processNode,"field-processing field-processing-hidden");dojo.place(this._processNode,this._field,"after");dojo.addClass(this._field.parentNode,"field-process-container")},_showProcessing:function(visible){if(null==this._processNode||false==this._showProcess){return}if(true==visible){dojo.removeClass(this._processNode,"field-processing-hidden")}else{dojo.addClass(this._processNode,"field-processing-hidden")}},_extendValidationTextBox:function(){dojo.extend(dijit.form.ValidationTextBox,{displayMessage:function(message){}})}})}if(!dojo._hasResource["local.Form.Element.ValidationTextBox"]){dojo._hasResource["local.Form.Element.ValidationTextBox"]=true;dojo.provide("local.Form.Element.ValidationTextBox");dojo.declare("Form_Element_ValidationTextBox",Form_Element_Field,{_form:null,_fieldContainer:null,_field:null,_fieldName:null,_belongsTo:null,_xhrMethod:"post",_xhrSync:false,_xhrUrl:null,_allowEmptyValue:false,_messages:{},_errorNode:null,_showProcess:true,_postConstructor:function(){application().log("rewrite","widget");this._messages={}},disableProcessing:function(){this._showProcess=false;return this},setField:function(field,name){if(dojo.isObject(field)&&null!=field){this._field=field;this._fieldContainer=field.parentNode;this._destroyExistantWidget(this._field.id)}name=dojo.trim(name);if(dojo.isString(name)&&""!=name){this._fieldName=name}return this},setForm:function(form){if(true==dojo.isObject(form)&&null!=form){this._form=form}return this},setBelongsTo:function(belongsTo){if(true==dojo.isString(belongsTo)&&""!=belongsTo){this._belongsTo=belongsTo}return this},allowEmptyValue:function(){this._allowEmptyValue=true},build:function(){if(null==this._field||null==this._fieldName||null==this._belongsTo||null==this._form){throw"Validation element requires related node"}dojo.connect(this._field,"onblur",dojo.hitch(this,"_validate"));this._buildProcessing()},_validate:function(){this._showProcessing(true);this._clearError();value=this.getValue();if(true==this._allowEmptyValue&&""==value){return}if(true==register().has("validationtextbox_"+value)){this._parseResponse(register().get("validationtextbox_"+value));return}dojo.publish("/ValidationTextBox/"+this._field.id+"/validate",[value]);dojo.xhr(this._xhrMethod,{url:this._getXhrUrl(),form:this._form,load:dojo.hitch(this,function(response,ioArgs){register().set("validationtextbox_"+this.getValue(),response);this._parseResponse(response)}),error:dojo.hitch(this,function(response,ioArgs){this._parseResponse(null)}),sync:this._xhrSync,handleAs:"text"})},_getXhrUrl:function(){if(null==this._xhrUrl){this._xhrUrl=application().cleanXhrUrl(dojo.attr(this._form,"action")+"?format=json&field="+this._fieldName)}return this._xhrUrl},_parseResponse:function(response){if(true!=response&&"true"!=response){dojo.removeClass(this._errorNode,"elem-hidden");if("undefined"!=typeof this._messages.error){dojo.create("li",{innerHTML:this._messages.error},this._errorNode,"last")}else{var errors=dojo.fromJson(response);errors=errors[this._form.id];for(elem in errors){for(err in errors[elem]){dojo.create("li",{innerHTML:errors[elem][err]},this._errorNode,"last")}}}dojo.addClass(this._errorNode.parentNode,"element-error");dojo.publish("/ValidationTextBox/"+this._field.id+"/error")}else{dojo.addClass(this._errorNode.parentNode,"element-success");if("undefined"!=typeof this._messages.success){dojo.create("li",{innerHTML:this._messages.success,"class":"success"},this._errorNode,"last")}else{dojo.addClass(this._errorNode,"elem-hidden")}dojo.publish("/ValidationTextBox/"+this._field.id+"/success")}this._showProcessing(false)},isEmpty:function(){return(""==this.getValue())?true:false},getValue:function(){try{return dojo.trim(this._field.value)}catch(e){return null}},showProcessing:function(enable){this._showProcess=enable;if(true==this._showProcess){this._processNode=dojo.create("span");dojo.addClass(this._processNode,"field-processing field-processing-hidden");dojo.place(this._processNode,this._field,"after");dojo.style(this._processNode,{height:this._field.offsetHeight+"px",width:this._field.offsetHeight+"px",left:(this._field.offsetWidth+5)+"px"});dojo.addClass(this._fieldContainer,"field-process-container")}},_clearError:function(){if(null==this._errorNode){this._errorNode=dojo.query("ul.errors",this._fieldContainer)[0];if(null==this._errorNode){this._errorNode=dojo.create("ul",{"class":"errors"},this._fieldContainer,"last")}}this._errorNode.innerHTML="";dojo.removeClass(this._fieldContainer,"element-error")}})}if(!dojo._hasResource["local.Form.User.Signup"]){dojo._hasResource["local.Form.User.Signup"]=true;dojo.provide("local.Form.User.Signup");dojo.declare("Form_User_Signup",Form_Abstract,{build:function(){this.inherited(arguments);this._buildValidation("username")._buildValidation("email")},_buildValidation:function(fieldId){try{new Form_Element_ValidationTextBox().setField(this.getField(fieldId),fieldId).setForm(this.get()).disableProcessing().setBelongsTo(this.getBelongsTo()).build()}catch(e){application().log("field validation "+fieldId,e)}return this}})}if(!dojo._hasResource["local.Popup.User.Login"]){dojo._hasResource["local.Popup.User.Login"]=true;dojo.provide("local.Popup.User.Login");dojo.declare("Popup_User_Login",Form_Popup,{_popupConfig:{title:"popup-login-title","class":"popup-account popup-login"},_formId:"login",_cssLink:"snippets/account.css",_listeners:[],_referer:null,setReferer:function(referer){if(dojo.isString(referer)&&""!=referer){this._referer=referer}return this},_initForm:function(){try{var input=popup().query("input#login-referer")[0];if(null!=input){dojo.attr(input,"value",this._referer)}new Popup_User_Signup().setReferer(this._referer).connect(popup().query("a.signin")[0])}catch(e){}}})}if(!dojo._hasResource["local.Popup.User.Signup"]){dojo._hasResource["local.Popup.User.Signup"]=true;dojo.provide("local.Popup.User.Signup");dojo.declare("Popup_User_Signup",Form_Popup,{_popupConfig:{title:"popup-signin-title","class":"popup-account popup-register"},_formId:"signup",_cssLink:"snippets/account.css",_listeners:[],_referer:null,setReferer:function(referer){if(dojo.isString(referer)&&""!=referer){this._referer=referer}return this},_initForm:function(){try{var input=popup().query("input.form-referer")[0];if(null!=input){dojo.attr(input,"value",this._referer)}this._form=new Form_User_Signup(dojo.byId(this._formId));this._form.setContainer(popup().getContentNode()).build();new Popup_User_Login().setReferer(this._referer).connect(popup().query("a.login")[0])}catch(e){}}})}if(!dojo._hasResource["local.widget.Player.Video"]){dojo._hasResource["local.widget.Player.Video"]=true;dojo.provide("local.widget.Player.Video");dojo.declare("Player_Video",null,{_container:null,_fileUrl:"",_width:null,_height:null,_player:null,_flashvars:{autostart:true},_params:{allowfullscreen:"true",allowscriptaccess:"always",wmode:"transparent"},_hasPlaylist:false,_id:null,constructor:function(container){this.setContainer(container)},setContainer:function(container){if(null!=container){this._container=container;if(null==dojo.attr(this._container,"id")){dojo.attr(this._container,"id","player"+new Date().getTime())}this._id=dojo.attr(this._container,"id")}return this},setAutostart:function(autostart){if(true==autostart||false==autostart){this._flashvars.autostart=autostart}return this},setParams:function(params){this._params=params;return this},addParams:function(params){dojo.mixin(this._params,params);return this},setFlashvars:function(flashvars){this._flashvars=flashvars;return this},addFlashvars:function(flashvars){dojo.mixin(this._flashvars,flashvars);return this},setFile:function(file){if(dojo.isString(file)&&""!=file){this._fileUrl=file;this._flashvars.file=file}return this},setSize:function(width,height){this._width=width;this._height=height;return this},hasPlaylist:function(value){if(true==value||false==value){this._hasPlaylist=value}return this},build:function(){if(null==this._container){throw"Missing video container"}if(""==this._fileUrl){this.setFile(dojo.attr(dojo.query("param[name=file]",this._container)[0],"value"))}if(""==this._fileUrl){throw"Missing video file"}this._buildPlayer()},_buildGetFlashPlayer:function(){dojo.place('<a href="http://get.adobe.com/flashplayer/" title="Obtenir le player flash"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="adobe flash player" width="158" height="39" /></a>',this._container.parentNode,"after")},_buildPlayer:function(){var attributes={id:this._id,name:this._id};swfobject.embedSWF("/flash/jw-player.swf",attributes.id,this._width,this._height,"9.0.115","http://get.adobe.com/flashplayer/",this._flashvars,this._params,attributes,dojo.hitch(this,function(evt){if(false==evt.success){this._buildGetFlashPlayer()}}));playerReady=dojo.hitch(this,function(playerRef){this._player=dojo.byId(playerRef.id);if(true==this._hasPlaylist){this._buildPlaylist()}dojo.publish("/player/video/"+this._id+"/ready",[this])})},_buildPlaylist:function(){try{if(null==this._player){return}var self=this;var playlist=this._player.getPlaylist();if(null==playlist){this._buildPlaylistTimeout(100);return}var list=dojo.create("ul",{"class":"demo-playlist"});for(index in playlist){if(playlist[index].title){var item=dojo.create("li");dojo.create("img",{src:playlist[index].image,width:"90",height:"68",title:playlist[index].title},item,"last");dojo.create("h3",{innerHTML:playlist[index].title},item,"last");dojo.connect(item,"onclick",function(){try{self._player.sendEvent("ITEM",dojo.query(".demo-playlist li").indexOf(this))}catch(e){}});dojo.connect(item,"onmouseover",function(){dojo.toggleClass(this,"active")});dojo.connect(item,"onmouseout",function(){dojo.toggleClass(this,"active")});dojo.place(item,list,"last")}}dojo.create("li",{"class":"clear-both",innerHTML:"&nbsp;"},list,"last");dojo.place(list,this.getId(),"after");if("BUFFERING"!=this._player.getConfig().state){setTimeout(dojo.hitch(this,function(){this._player.sendEvent("PLAY")}),500)}}catch(e){}},_buildPlaylistTimeout:function(ms){setTimeout(dojo.hitch(this,"_buildPlaylist"),ms)},getId:function(){return this._id},start:function(){try{this._player.sendEvent("PLAY","true")}catch(e){}},stop:function(){try{this._player.sendEvent("STOP")}catch(e){}}})}if(!dojo._hasResource["local.Popup.Video"]){dojo._hasResource["local.Popup.Video"]=true;dojo.provide("local.Popup.Video");dojo.declare("Popup_Video",null,{_fileUrl:null,_title:"",_hasPlaylist:false,_player:null,WIDTH:640,HEIGHT:480,setUrl:function(url){if(dojo.isString(url)&&""!=url){this._fileUrl=url}return this},setTitle:function(title){if(dojo.isString(title)&&""!=title){this._title=application().getTranslator().translate(title)}return this},hasPlaylist:function(value){this._hasPlaylist=value;return this},open:function(url){this.setUrl(url);if(null==this._fileUrl){throw"Invalid video url"}try{var container=dojo.create("div",{style:"width: "+this.WIDTH+"px; height: "+this.HEIGHT+"px;"});dojo.subscribe("/popup/onload",dojo.hitch(this,function(){this._player=new Player_Video(container);this._player.setSize(this.WIDTH,this.HEIGHT).setFile(this._fileUrl).hasPlaylist(this._hasPlaylist).build();dojo.subscribe("/player/video/"+this._player.getId()+"/ready",function(player){popup().refreshPosition()})}));popup().show({content:container,title:this._title});dojo.subscribe("/popup/hide",dojo.hitch(this._player,"stop"))}catch(e){throw"Error on load"}}})}if(!dojo._hasResource["local.Popup.BugReport"]){dojo._hasResource["local.Popup.BugReport"]=true;dojo.provide("local.Popup.BugReport");dojo.declare("Popup_BugReport",Form_Popup,{_popupConfig:{title:"bug-report-title","class":"popup-report"},_formId:"bug_report",_cssLink:"snippets/bug-report.css"})}if(!dojo._hasResource["local.Layout"]){dojo._hasResource["local.Layout"]=true;dojo.provide("local.Layout");dojo.declare("Layout",null,{disableFormAutocomplete:function(){dojo.query("form").attr("autocomplete","off");return this},initHeaderNavigation:function(xpathQuery){dojo.query(xpathQuery).forEach(function(item){try{switch(item.className){case"signin":new Popup_User_Signup().connect(item);break;case"login":new Popup_User_Login().connect(item);break;default:break}}catch(e){application().log("header",e,"error")}});return this},initPrintThis:function(){dojo.query(".print-this").connect("onclick",function(evt){evt.preventDefault();window.print()});return this},initTargetBlank:function(xpathQuery){if("undefined"==typeof xpathQuery){xpathQuery=".target-blank"}dojo.query(xpathQuery).connect("onclick",function(evt){evt.preventDefault();window.open(this.href)});return this},initMailTo:function(){dojo.query(".mail-to").onclick(function(evt){evt.preventDefault();window.location.href="mailto:"+dojo.attr(this,"title")+"@3999.com"});return this},initVideoDemo:function(title){dojo.query("a.demo-video").onclick(function(evt){evt.preventDefault();try{var videos={"demo-dashboard":"demo-dashboard","demo-addresses":"demo-adresses","demo-company":"demo-societe","demo-profile":"demo-profile"};new Popup_Video().setUrl(application().buildUrl("/corporate/video/"+videos[this.id]+".mp4","static","http")).setTitle(title).open()}catch(e){window.location.href=this.href}});return this},initOpenSearch:function(){var clazz="";if(7<=dojo.isIE){clazz="opensearch-ie"}else{if(2<=dojo.isFF){clazz="opensearch-other"}}if(""==clazz){return this}dojo.query(dojo.create("a",{id:"opensearch",title:application().getTranslator().toOctal("opensearch"),innerHTML:'<span class="'+clazz+'">&nbsp;</span>'+application().getTranslator().translate("opensearch")})).onclick(function(evt){evt.preventDefault();window.external.AddSearchProvider(application().buildUrl("/opensearch.xml"))}).place(dojo.byId("hd"),"last");return this},initReportBug:function(){try{new Popup_BugReport().connect(dojo.query("a.report-bug")[0])}catch(e){application().log("bugreport",e,"warn")}return this},appendStylesheet:function(url,media){Utils.appendStylesheet(url,media);return this}});var IEPNGFix=window.IEPNGFix||{};IEPNGFix.tileBG=function(g,q,n){var F=this.data[g.uniqueID],b=Math.max(g.clientWidth,g.scrollWidth),h=Math.max(g.clientHeight,g.scrollHeight),j=g.currentStyle.backgroundPositionX,i=g.currentStyle.backgroundPositionY,o=g.currentStyle.backgroundRepeat;if(!F.tiles){F.tiles={elm:g,src:"",cache:[],img:new Image(),old:{}}}var B=F.tiles,u=B.img.width,c=B.img.height;if(q){if(!n&&q!=B.src){B.img.onload=function(){this.onload=null;IEPNGFix.tileBG(g,q,1)};return B.img.src=q}}else{if(B.src){n=1}u=c=0}B.src=q;if(!n&&b==B.old.w&&h==B.old.h&&j==B.old.x&&i==B.old.y&&o==B.old.r){return}var e={top:"0%",left:"0%",center:"50%",bottom:"100%",right:"100%"},l,k,a;l=e[j]||j;k=e[i]||i;if(a=l.match(/(\d+)%/)){l=Math.round((b-u)*(parseInt(a[1])/100))}if(a=k.match(/(\d+)%/)){k=Math.round((h-c)*(parseInt(a[1])/100))}l=parseInt(l);k=parseInt(k);var D={repeat:1,"repeat-x":1}[o],A={repeat:1,"repeat-y":1}[o];if(D){l%=u;if(l>0){l-=u}}if(A){k%=c;if(k>0){k-=c}}this.hook.enabled=0;if(!({relative:1,absolute:1}[g.currentStyle.position])){g.style.position="relative"}var f=0,m,z=D?b:l+0.1,r,v=A?h:k+0.1,w,p,C;if(u&&c){for(m=l;m<z;m+=u){for(r=k;r<v;r+=c){C=0;if(!B.cache[f]){B.cache[f]=document.createElement("div");C=1}var t=(m+u>b?b-m:u),E=(r+c>h?h-r:c);w=B.cache[f];p=w.style;p.behavior="none";p.left=m+"px";p.top=r+"px";p.width=t+"px";p.height=E+"px";p.clip="rect("+(r<0?0-r:0)+"px,"+t+"px,"+E+"px,"+(m<0?0-m:0)+"px)";p.display="block";if(C){p.position="absolute";p.zIndex=-999;if(g.firstChild){g.insertBefore(w,g.firstChild)}else{g.appendChild(w)}}this.fix(w,q,0);f++}}}while(f<B.cache.length){this.fix(B.cache[f],"",0);B.cache[f++].style.display="none"}this.hook.enabled=1;B.old={w:b,h:h,x:j,y:i,r:o}};IEPNGFix.update=function(){for(var b in IEPNGFix.data){var a=IEPNGFix.data[b].tiles;if(a&&a.elm&&a.src){IEPNGFix.tileBG(a.elm,a.src)}}};IEPNGFix.update.timer=0;if(window.attachEvent&&!window.opera){window.attachEvent("onresize",function(){clearTimeout(IEPNGFix.update.timer);IEPNGFix.update.timer=setTimeout(IEPNGFix.update,100)})}var _layout=null;layout=function(){if(null==_layout){_layout=new Layout()}return _layout}}if(!dojo._hasResource["local.ajaxify.layout"]){dojo._hasResource["local.ajaxify.layout"]=true;dojo.provide("local.ajaxify.layout");ajaxifyLayout=function(){application();layout().initHeaderNavigation(".hd-links-account a").disableFormAutocomplete().initTargetBlank().initPrintThis().initMailTo().initReportBug()}}if(!dojo._hasResource["local.widget.Container.TabOfContent"]){dojo._hasResource["local.widget.Container.TabOfContent"]=true;dojo.provide("local.widget.Container.TabOfContent");dojo.declare("Container_TabOfContent",null,{_container:null,_tabs:{},_nodes:null,constructor:function(xpathQuery){if(true==dojo.isString(xpathQuery)&&""!=xpathQuery){this._nodes=dojo.query(xpathQuery)}this._items={}},build:function(){if(null==this._nodes){throw"Invalid tab of content node"}dojo.forEach(this._nodes,function(tab){this._tabs[tab.className]=tab;dojo.query("span",tab).connect("onclick",function(){dojo.publish("/container/tab/clicked",[this.parentNode.parentNode.className.replace("-tab","")])})},this);return this},destroy:function(id){if(false==this.has(id)){return false}dojo.destroy(this.get(id));delete (this._tabs[id]);return true},has:function(id){if(false==dojo.isString(id)||""==id){return false}if("undefined"!=typeof this._tabs[id]){return true}return false},get:function(id){if(true==this.has(id)){return this._tabs[id]}return null}})}if(!dojo._hasResource["dojo.hash"]){dojo._hasResource["dojo.hash"]=true;dojo.provide("dojo.hash");(function(){dojo.hash=function(hash,replace){if(!arguments.length){return _getHash()}if(hash.charAt(0)=="#"){hash=hash.substring(1)}if(replace){_replace(hash)}else{location.href="#"+hash}return hash};var _recentHash=null,_ieUriMonitor=null,_pollFrequency=dojo.config.hashPollFrequency||100;function _getHash(){var h=location.href,i=h.indexOf("#");return(i>=0)?decodeURIComponent(h.substring(i+1)):""}function _dispatchEvent(){dojo.publish("/dojo/hashchange",[_getHash()])}function _pollLocation(){if(_getHash()===_recentHash){return}_recentHash=_getHash();_dispatchEvent()}function _replace(hash){if(_ieUriMonitor){if(_ieUriMonitor.isTransitioning()){setTimeout(dojo.hitch(null,_replace,hash),_pollFrequency);return}var href=_ieUriMonitor.iframe.location.href;var index=href.indexOf("?");_ieUriMonitor.iframe.location.replace(href.substring(0,index)+"?"+hash);return}location.replace("#"+hash);_pollLocation()}function IEUriMonitor(){var ifr=document.createElement("iframe"),IFRAME_ID="dojo-hash-iframe",ifrSrc=dojo.config.dojoBlankHtmlUrl||dojo.moduleUrl("dojo","resources/blank.html");ifr.id=IFRAME_ID;ifr.src=ifrSrc+"?"+_getHash();ifr.style.display="none";document.body.appendChild(ifr);this.iframe=dojo.global[IFRAME_ID];var recentIframeQuery,transitioning,expectedIFrameQuery,docTitle,ifrOffline,iframeLoc=this.iframe.location,winLoc=dojo.global.location;function resetState(){_recentHash=winLoc.hash;recentIframeQuery=ifrOffline?_recentHash:iframeLoc.search;transitioning=false;expectedIFrameQuery=null}this.isTransitioning=function(){return transitioning};this.pollLocation=function(){if(!ifrOffline){try{iframeLoc.search;if(document.title!=docTitle){docTitle=this.iframe.document.title=document.title}}catch(e){ifrOffline=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}}if(transitioning&&_recentHash===winLoc.hash){if(ifrOffline||iframeLoc.search===expectedIFrameQuery){resetState();_dispatchEvent()}else{setTimeout(dojo.hitch(this,this.pollLocation),0);return}}else{if(_recentHash===winLoc.hash&&(ifrOffline||recentIframeQuery===iframeLoc.search)){}else{if(_recentHash!==winLoc.hash){_recentHash=winLoc.hash;transitioning=true;expectedIFrameQuery="?"+_getHash();ifr.src=ifrSrc+expectedIFrameQuery;ifrOffline=false;setTimeout(dojo.hitch(this,this.pollLocation),0);return}else{if(!ifrOffline){winLoc.href="#"+iframeLoc.search.substring(1);resetState();_dispatchEvent()}}}}setTimeout(dojo.hitch(this,this.pollLocation),_pollFrequency)};resetState();setTimeout(dojo.hitch(this,this.pollLocation),_pollFrequency)}dojo.addOnLoad(function(){if("onhashchange" in dojo.global&&(!dojo.isIE||(dojo.isIE>=8&&document.compatMode!="BackCompat"))){dojo.connect(dojo.global,"onhashchange",_dispatchEvent)}else{if(document.addEventListener){_recentHash=_getHash();setInterval(_pollLocation,_pollFrequency)}else{if(document.attachEvent){_ieUriMonitor=new IEUriMonitor()}}}})})()}if(!dojo._hasResource["local.widget.ContainerSet"]){dojo._hasResource["local.widget.ContainerSet"]=true;dojo.provide("local.widget.ContainerSet");dojo.declare("ContainerSet",null,{_containers:{},_count:0,_tabs:null,constructor:function(){this._containers={};this._count=0},add:function(container){if(true==dojo.isObject(container)&&null!=container){container.setIndex(this._count);this._containers[container.getId()]=container;this._count+=1}return this},has:function(id){if(false==dojo.isString(id)||""==id){return false}if("undefined"!=typeof this._containers[id]){return true}return false},get:function(id){if(true==this.has(id)){return this._containers[id]}return null},getAll:function(){return this._containers},getIndex:function(id){if(true==this.has(id)){return this.get(id).getIndex()}return null},destroy:function(id){if(false==this.has(id)){return false}try{this.get(id).destroy();delete this._containers[id];this._count-=1;if(null!=this._tabs){this._tabs.destroy(id)}}catch(e){return false}return true},close:function(options){if("undefined"==typeof options){options=[]}var boolExcludes=(dojo.isArray(options.excludes))?true:false;var i=1;for(index in this._containers){var item=this.get(index);if(dojo.isString(options.excludes)&&("first"==options.excludes&&1==i)||("last"==options.excludes&&i==this._count)){i+=1;continue}if(false==boolExcludes||(true==boolExcludes&&-1==dojo.indexOf(options.excludes,item.getId()))){item.close()}i+=1}return this},buildTabOfContent:function(xpathQuery){try{this._tabs=new Container_TabOfContent(xpathQuery).build();dojo.subscribe("/container/tab/clicked",dojo.hitch(this,function(id){try{if(this.get(id).isClose()){this.get(id).open()}}catch(e){}}))}catch(e){application().log("toc",e,"info")}return this},refresh:function(){if(this.has(dojo.hash())){this.get(dojo.hash()).open()}}})}if(!dojo._hasResource["local.widget.Container.Wipe"]){dojo._hasResource["local.widget.Container.Wipe"]=true;dojo.provide("local.widget.Container.Wipe");dojo.declare("Container_Wipe",null,{_container:null,_id:null,_index:null,_contentNode:null,_triggerNode:null,_isFirstOpen:true,constructor:function(container){if(true==dojo.isObject(container)&&null!=container){this._container=container}},setContentNode:function(node){if(true==dojo.isObject(node)&&null!=node){this._contentNode=node}return this},connect:function(node){if(true==dojo.isObject(node)&&null!=node){this._triggerNode=node;this._connect()}return this},_connect:function(){if(null==this._container||null==this._triggerNode){throw"Missing parameters"}dojo.connect(this._triggerNode,"onclick",dojo.hitch(this,function(evt){this.click()}))},isClose:function(){return dojo.hasClass(this._container,"sub-content-close")},isOpen:function(){return !this.isClose()},click:function(){if(this.isClose()){this.open()}else{this.close()}},open:function(){if(true==this._isFirstOpen){dojo.publish("/container/"+this.getId()+"/firstopen",[this.getId()]);this._isFirstOpen=false}this._onClick();dojo.publish("/container/"+this.getId()+"/opened",[this.getId()])},close:function(){dojo.publish("/container/"+this.getId()+"/close",[this.getId()]);this._onClick();dojo.publish("/container/"+this.getId()+"/closed",[this.getId()])},_onClick:function(){try{dojo.toggleClass(this._container,"sub-content-close");dojo.toggleClass(this._triggerNode,"item-wipe-in");dojo.toggleClass(this._triggerNode,"item-wipe-out")}catch(e){}},destroy:function(){dojo.destroy(this._container)},getId:function(){if(null==this._id){this._id=dojo.attr(this._container,"id")}return this._id},getNode:function(){return this._container},setIndex:function(index){this._index=index},getIndex:function(){return this._index}})}if(!dojo._hasResource["local.Document.Abstract"]){dojo._hasResource["local.Document.Abstract"]=true;dojo.provide("local.Document.Abstract");dojo.provide("local.Document.Abstract");dojo.declare("Document_Abstract",null,{_node:null,_index:null,_config:null,_objects:{},constructor:function(item,index){this._objects={};if(true==dojo.isObject(item)&&null!=item){this._node=item}this._index=("undefined"==typeof index)?null:index;if(this.isValid()){this._extractConfig()}},build:function(){if(false==this.isValid()){throw"Invalid document"}},isValid:function(){return(null==this._node)?false:true},getNode:function(){return this._node},getTitle:function(){return this.getConfig("title")},getId:function(){return this.getConfig("id")},getPermalink:function(){return this.getConfig("permalink")},getFullAddress:function(glue){try{if(false==dojo.isString(glue)||null==glue){glue=" "}var streetNumber=this.getConfig("address_number");var streetName=this.getConfig("address_street_full");var zip=this.getConfig("address_zip");var locality=this.getConfig("address_location_name_display");if(null==streetNumber){streetNumber=""}if(null==streetName||null==zip||null==locality){return null}return[streetNumber,streetName,zip,locality].join(glue)}catch(e){return""}},getZipAndLocation:function(glue){try{if(false==dojo.isString(glue)||null==glue){glue=" "}return this.getConfig("address_zip")+glue+this.getConfig("address_location_name_display")}catch(e){return""}},getGeocode:function(){var geocode=null;try{var values=this.getConfig("geocode");geocode=[values.latitude,values.longitude].join(";");if(";"==geocode){geocode=null}}catch(e){geocode=null}return geocode},_extractConfig:function(){if(null!=this._config){return}if(null==this._index&&"undefined"!=typeof _hit){this._config=_hit}else{if("undefined"!=typeof _resultsetHits&&"undefined"!=typeof _resultsetHits[this._index]){this._config=dojo.fromJson(_resultsetHits[this._index])}}},getConfig:function(key){if(false==dojo.isString(key)||""==key){return null}if(null==this._config){this._extractConfig()}if(null==this._config||"undefined"==typeof this._config[key]){return null}return this._config[key]}})}if(!dojo._hasResource["local.Document.Directory.Context.PhoneSet"]){dojo._hasResource["local.Document.Directory.Context.PhoneSet"]=true;dojo.provide("local.Document.Directory.Context.PhoneSet");dojo.declare("Document_Directory_Context_PhoneSet",null,{_context:null,_showNumbers:3,_usePopup:false,_labelisedSet:null,_unlabelisedSet:null,_trigger:null,_triggerContainer:null,constructor:function(context){if(true==dojo.isObject(context)||null!=context){this._context=context}},setLimit:function(limit){this._showNumbers=parseInt(limit);return this},enablePopup:function(){this._usePopup=true;return this},disablePopup:function(){this._usePopup=false;return this},build:function(){if(null==this._context){throw"PhoneSet missing parameters"}this._labelisedSet=dojo.query(".numbers-label",this._context.getNode())[0];if(null!=this._labelisedSet){this._triggerContainer=this._labelisedSet;this._unlabelisedSet=dojo.query(".numbers-no-label",this._context.getNode())[0]}else{this._unlabelisedSet=dojo.query(".numbers-no-label",this._context.getNode())[0];if(null!=this._unlabelisedSet){this._triggerContainer=this._unlabelisedSet}}if(null==this._labelisedSet||null==this._unlabelisedSet){this._buildSingleSet()}else{this._buildCompositeSet()}},_buildSingleSet:function(){if(null==this._triggerContainer){return}var numbers=dojo.query("li",this._triggerContainer).length;var hiddenNumbers=dojo.query(".tel-hide-always",this._triggerContainer).length;if((numbers-hiddenNumbers)<=this._showNumbers){return}this._buildTrigger()},_buildCompositeSet:function(){if(null==this._triggerContainer){return}dojo.addClass(this._unlabelisedSet,"numbers-more");var numbersLabelised=(dojo.query("li",this._labelisedSet).length-dojo.query(".tel-hide-always",this._labelisedSet).length);var numbersUnlabelised=(dojo.query("li",this._unlabelisedSet).length-dojo.query(".tel-hide-always",this._unlabelisedSet).length);if(numbersLabelised<=this._showNumbers&&numbersUnlabelised<=this._showNumbers){return}this._buildTrigger()},_buildTrigger:function(){if(null==this._triggerContainer){return}dojo.addClass(this._triggerContainer,"numbers-more");this._trigger=dojo.create("span");dojo.attr(this._trigger,{"class":"numbers-more-show text-c2",title:application().getTranslator().translate("numbers-show-all"),innerHTML:application().getTranslator().translate("numbers-show-more")});dojo.connect(this._trigger,"onclick",dojo.hitch(this,function(){(true==this._usePopup)?this._openPopup():this._expendMarkup()}));dojo.place(this._trigger,this._triggerContainer,"last")},_openPopup:function(){var htmlContent='<h2 class="fn title">'+this._context.getTitle()+"</h2>";if(null!=this._unlabelisedSet&&null==this._labelisedSet){htmlContent+='<div class="numbers-no-label">'+dojo.attr(this._unlabelisedSet,"innerHTML")+"</div>"}else{if(null!=this._labelisedSet&&null==this._unlabelisedSet){htmlContent+='<div class="numbers-label">'+dojo.attr(this._labelisedSet,"innerHTML")+"</div>"}else{if(null!=this._labelisedSet&&null!=this._unlabelisedSet){htmlContent+='<div class="numbers-label">'+dojo.attr(this._unlabelisedSet,"innerHTML")+dojo.attr(this._labelisedSet,"innerHTML")+"</div>"}}}popup().show({content:'<div class="numbers-content vcard">'+htmlContent+"</div>","class":"popup-numbers"})},_expendMarkup:function(){if(null!=this._unlabelisedSet){dojo.removeClass(this._unlabelisedSet,"numbers-more")}dojo.removeClass(this._triggerContainer,"numbers-more");dojo.destroy(this._trigger)}})}if(!dojo._hasResource["local.Document.Directory.Context"]){dojo._hasResource["local.Document.Directory.Context"]=true;dojo.provide("local.Document.Directory.Context");dojo.declare("Document_Directory_Context",Document_Abstract,{build:function(){this.inherited(arguments);this.buildPhoneSet(3,false)},buildPhoneSet:function(limit,popup){try{var set=new Document_Directory_Context_PhoneSet(this);set.setLimit(limit).build();(false==popup)?set.disablePopup():set.enablePopup()}catch(e){application().log("phoneset",e)}return this}})}if(!dojo._hasResource["local.widget.Slider.Vertical"]){dojo._hasResource["local.widget.Slider.Vertical"]=true;dojo.provide("local.widget.Slider.Vertical");dojo.declare("Slider_Vertical",null,{_container:null,_previousNode:null,_nextNode:null,_options:{},_connected:{},_currentPage:1,_countPages:0,constructor:function(){this._options={};this._connected={}},hasOption:function(option){if("undefined"!=this._options[option]){return true}return false},getOption:function(option){if(true==this.hasOption(option)){return this._options[option]}return null},setContainer:function(container){if(false==dojo.isObject(container)||null==container){return this}this._container=container;return this},setItems:function(items){this._options.itemsCount=items.length;this._options.itemHeight=items[0].offsetHeight;this._options.sliderHeight=(this._options.itemsCount*this._options.itemHeight);return this},setSlideNodes:function(previous,next){if(false==dojo.isObject(previous)||null==previous){return this}if(false==dojo.isObject(next)||null==next){return this}this._previousNode=previous;this._nextNode=next;return this},setItemsShow:function(count){this._options.itemsShow=count;return this},setItemHeight:function(height){this._options.itemHeight=height;this._options.sliderHeight=(this._options.itemsCount*height);return this},setSliderHeight:function(height){this._options.sliderHeight=height;return this},build:function(){if(null==this._previousNode||null==this._nextNode){throw"Slider_Vertical requires previous and next nodes"}if(!this.hasOption("itemsCount")||!this.hasOption("itemsShow")||!this.hasOption("itemHeight")||!this.hasOption("sliderHeiht")){throw"Slider_Vertical requires init params"}this._countPages=Math.ceil((this.getOption("itemsCount")/this.getOption("itemsShow")));if(this.getOption("itemsShow")>=this.getOption("itemsCount")){this._setNextNodeVisibility("hidden")}else{this._connect();this._setNextNodeVisibility("visible")}},_move:function(action){var playAnimation=true;var options={node:this._container,left:0,unit:"px",duration:700};if("-"==action){this._currentPage-=1;this._setNextNodeVisibility("visible");if(0>this._currentPage){playAnimation=false}if(1==this._currentPage){this._setPreviousNodeVisibility("hidden")}options.top=dojo.style(this._container,"top")+(this.getOption("itemHeight")*this.getOption("itemsShow"))}else{if("+"==action){this._currentPage+=1;this._setPreviousNodeVisibility("visible");options.top=((this.getOption("itemHeight")*this.getOption("itemsShow"))*(this._currentPage-1))*-1;if(this._currentPage==this._countPages){this._setNextNodeVisibility("hidden")}if(this._currentPage>this._countPages){playAnimation=false}}}options.onBegin=dojo.hitch(this,"_disconnect");options.onEnd=dojo.hitch(this,"_connect");if(playAnimation){dojo.fx.slideTo(options).play()}},_setPreviousNodeVisibility:function(visibility){dojo.style(this._previousNode,"visibility",visibility)},_setNextNodeVisibility:function(visibility){dojo.style(this._nextNode,"visibility",visibility)},_connect:function(){this._connected.next=dojo.connect(this._nextNode,"onclick",dojo.hitch(this,function(evt){evt.preventDefault();this._move("+")}));this._connected.prev=dojo.connect(this._previousNode,"onclick",dojo.hitch(this,function(evt){evt.preventDefault();this._move("-")}))},_disconnect:function(){dojo.disconnect(this._connected.next);dojo.disconnect(this._connected.prev)}})}if(!dojo._hasResource["local.Document.Directory.Gallery"]){dojo._hasResource["local.Document.Directory.Gallery"]=true;dojo.provide("local.Document.Directory.Gallery");dojo.declare("Document_Directory_Gallery",null,{_container:null,_currentPicture:null,constructor:function(container){if(dojo.isObject(container)&&null!=container){this._container=container;this._currentPicture=dojo.query(".current-photo img",this._container)[0]}},build:function(){if(null==this._container||null==this._currentPicture){throw"Gallery: invalid config"}try{var container=dojo.query(".gallery-photos .photos",this._container)[0];new Slider_Vertical().setContainer(dojo.query("ul",container)[0]).setItems(dojo.query("li",container)).setSlideNodes(dojo.query(".photo-prev",this._container)[0],dojo.query(".photo-next",this._container)[0]).setItemsShow(3).setItemHeight(89).build()}catch(e){application().log("slider",e)}var items=dojo.query("li.photos ul li",this._container);if(null!=items[0]){dojo.attr(items[0],"class","active")}var self=this;dojo.forEach(items,function(item){dojo.connect(item,"onmouseover",function(){var img=dojo.query("img",this)[0];if(null==img){return}dojo.attr(self._currentPicture,"src",dojo.attr(img,"src"));dojo.query("li.photos ul li",self._container).attr("class","classic");dojo.attr(this,"class","active")})})}})}if(!dojo._hasResource["local.Document.Directory.BusinessHour"]){dojo._hasResource["local.Document.Directory.BusinessHour"]=true;dojo.provide("local.Document.Directory.BusinessHour");dojo.declare("Document_Directory_BusinessHour",null,{_date:null,_container:null,constructor:function(container){if(dojo.isObject(container)&&null!=container){this._container=container}this._date=new Date()},build:function(){if(null==this._container){throw"Invalid config"}var _this=this;dojo.query("a",this._container).connect("onclick",function(evt){evt.preventDefault();_this._onClick(this.parentNode)})},_onClick:function(day){dojo.query("li.day-open",this._container).toggleClass("day-open");dojo.addClass(day,"day-open")}})}if(!dojo._hasResource["local.Document.Directory.PriceList"]){dojo._hasResource["local.Document.Directory.PriceList"]=true;dojo.provide("local.Document.Directory.PriceList");dojo.declare("Document_Directory_PriceList_Item",null,{_pricelist:null,_header:null,_content:null,_trigger:null,constructor:function(pricelist){if(dojo.isObject(pricelist)&&null!=pricelist){this._pricelist=pricelist}this._extractNodes()},_extractNodes:function(){this._header=dojo.query("h4",this._pricelist)[0];this._content=dojo.query("table",this._pricelist)[0]},build:function(){if(null==this._pricelist||null==this._header||null==this._content){throw"Document_Directory_PriceList_Item requires init parameters"}dojo.addClass(this._content,"elem-hidden");this._trigger=dojo.create("span",{"class":"show-pricelist",innerHTML:application().getTranslator().translate("show-pricelist-content")},this._header,"last");dojo.connect(this._trigger,"onclick",dojo.hitch(this,"_showContent"))},_showContent:function(){dojo.removeClass(this._content,"elem-hidden");dojo.destroy(this._trigger)}});dojo.declare("Document_Directory_PriceList",null,{_container:null,constructor:function(container){if(dojo.isObject(container)&&null!=container){this._container=container}},build:function(){dojo.query(".pricelist-item",this._container).forEach(function(pricelist,index){if(0==index){return}try{new Document_Directory_PriceList_Item(pricelist).build()}catch(e){application().log("Document_Directory_PriceList._build",e)}})}})}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(locale){var firstDay={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,sy:4};var country=dojo.cldr.supplemental._region(locale);var dow=firstDay[country];return(dow===undefined)?1:dow};dojo.cldr.supplemental._region=function(locale){locale=dojo.i18n.normalizeLocale(locale);var tags=locale.split("-");var region=tags[1];if(!region){region={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]]}else{if(region.length==4){region=tags[2]}}return region};dojo.cldr.supplemental.getWeekend=function(locale){var weekendStart={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var weekendEnd={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var country=dojo.cldr.supplemental._region(locale);var start=weekendStart[country];var end=weekendEnd[country];if(start===undefined){start=6}if(end===undefined){end=0}return{start:start,end:end}}}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(dateObject){var month=dateObject.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(month==1&&dojo.date.isLeapYear(dateObject)){return 29}return days[month]};dojo.date.isLeapYear=function(dateObject){var year=dateObject.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100))};dojo.date.getTimezoneName=function(dateObject){var str=dateObject.toString();var tz="";var match;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"))}else{var pat=/([A-Z\/]+) \d{4}$/;if((match=str.match(pat))){tz=match[1]}else{str=dateObject.toLocaleString();pat=/ ([A-Z\/]+)$/;if((match=str.match(pat))){tz=match[1]}}}return(tz=="AM"||tz=="PM")?"":tz};dojo.date.compare=function(date1,date2,portion){date1=new Date(+date1);date2=new Date(+(date2||new Date()));if(portion=="date"){date1.setHours(0,0,0,0);date2.setHours(0,0,0,0)}else{if(portion=="time"){date1.setFullYear(0,0,0);date2.setFullYear(0,0,0)}}if(date1>date2){return 1}if(date1<date2){return -1}return 0};dojo.date.add=function(date,interval,amount){var sum=new Date(+date);var fixOvershoot=false;var property="Date";switch(interval){case"day":break;case"weekday":var days,weeks;var mod=amount%5;if(!mod){days=(amount>0)?5:-5;weeks=(amount>0)?((amount-5)/5):((amount+5)/5)}else{days=mod;weeks=parseInt(amount/5)}var strt=date.getDay();var adj=0;if(strt==6&&amount>0){adj=1}else{if(strt==0&&amount<0){adj=-1}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(amount>0)?2:-2}amount=(7*weeks)+days+adj;break;case"year":property="FullYear";fixOvershoot=true;break;case"week":amount*=7;break;case"quarter":amount*=3;case"month":fixOvershoot=true;property="Month";break;default:property="UTC"+interval.charAt(0).toUpperCase()+interval.substring(1)+"s"}if(property){sum["set"+property](sum["get"+property]()+amount)}if(fixOvershoot&&(sum.getDate()<date.getDate())){sum.setDate(0)}return sum};dojo.date.difference=function(date1,date2,interval){date2=date2||new Date();interval=interval||"day";var yearDiff=date2.getFullYear()-date1.getFullYear();var delta=1;switch(interval){case"quarter":var m1=date1.getMonth();var m2=date2.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(yearDiff*4);delta=q2-q1;break;case"weekday":var days=Math.round(dojo.date.difference(date1,date2,"day"));var weeks=parseInt(dojo.date.difference(date1,date2,"week"));var mod=days%7;if(mod==0){days=weeks*5}else{var adj=0;var aDay=date1.getDay();var bDay=date2.getDay();weeks=parseInt(days/7);mod=days%7;var dtMark=new Date(date1);dtMark.setDate(dtMark.getDate()+(weeks*7));var dayMark=dtMark.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (dayMark+mod)>5:adj=-2}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (dayMark+mod)<0:adj=2}}}days+=adj;days-=(weeks*2)}delta=days;break;case"year":delta=yearDiff;break;case"month":delta=(date2.getMonth()-date1.getMonth())+(yearDiff*12);break;case"week":delta=parseInt(dojo.date.difference(date1,date2,"day")/7);break;case"day":delta/=24;case"hour":delta/=60;case"minute":delta/=60;case"second":delta/=1000;case"millisecond":delta*=date2.getTime()-date1.getTime()}return Math.round(delta)}}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,except){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(except&&except.indexOf(ch)!=-1){return ch}return"\\"+ch})};dojo.regexp.buildGroupRE=function(arr,re,nonCapture){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("|"),nonCapture)};dojo.regexp.group=function(expression,nonCapture){return"("+(nonCapture?"?:":"")+expression+")"}}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function formatPattern(dateObject,bundle,options,pattern){return pattern.replace(/([a-z])\1*/ig,function(match){var s,pad,c=match.charAt(0),l=match.length,widthList=["abbr","wide","narrow"];switch(c){case"G":s=bundle[(l<4)?"eraAbbr":"eraNames"][dateObject.getFullYear()<0?0:1];break;case"y":s=dateObject.getFullYear();switch(l){case 1:break;case 2:if(!options.fullYear){s=String(s);s=s.substr(s.length-2);break}default:pad=true}break;case"Q":case"q":s=Math.ceil((dateObject.getMonth()+1)/3);pad=true;break;case"M":var m=dateObject.getMonth();if(l<3){s=m+1;pad=true}else{var propM=["months","format",widthList[l-3]].join("-");s=bundle[propM][m]}break;case"w":var firstDay=0;s=dojo.date.locale._getWeekOfYear(dateObject,firstDay);pad=true;break;case"d":s=dateObject.getDate();pad=true;break;case"D":s=dojo.date.locale._getDayOfYear(dateObject);pad=true;break;case"E":var d=dateObject.getDay();if(l<3){s=d+1;pad=true}else{var propD=["days","format",widthList[l-3]].join("-");s=bundle[propD][d]}break;case"a":var timePeriod=(dateObject.getHours()<12)?"am":"pm";s=bundle[timePeriod];break;case"h":case"H":case"K":case"k":var h=dateObject.getHours();switch(c){case"h":s=(h%12)||12;break;case"H":s=h;break;case"K":s=(h%12);break;case"k":s=h||24;break}pad=true;break;case"m":s=dateObject.getMinutes();pad=true;break;case"s":s=dateObject.getSeconds();pad=true;break;case"S":s=Math.round(dateObject.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case"v":case"z":s=dojo.date.locale._getZone(dateObject,true,options);if(s){break}l=4;case"Z":var offset=dojo.date.locale._getZone(dateObject,false,options);var tz=[(offset<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(offset)/60),2),dojo.string.pad(Math.abs(offset)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":")}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+pattern)}if(pad){s=dojo.string.pad(s,l)}return s})}dojo.date.locale._getZone=function(dateObject,getName,options){if(getName){return dojo.date.getTimezoneName(dateObject)}else{return dateObject.getTimezoneOffset()}};dojo.date.locale.format=function(dateObject,options){options=options||{};var locale=dojo.i18n.normalizeLocale(options.locale),formatLength=options.formatLength||"short",bundle=dojo.date.locale._getGregorianBundle(locale),str=[],sauce=dojo.hitch(this,formatPattern,dateObject,bundle,options);if(options.selector=="year"){return _processPattern(bundle["dateFormatItem-yyyy"]||"yyyy",sauce)}var pattern;if(options.selector!="date"){pattern=options.timePattern||bundle["timeFormat-"+formatLength];if(pattern){str.push(_processPattern(pattern,sauce))}}if(options.selector!="time"){pattern=options.datePattern||bundle["dateFormat-"+formatLength];if(pattern){str.push(_processPattern(pattern,sauce))}}return str.length==1?str[0]:bundle["dateTimeFormat-"+formatLength].replace(/\{(\d+)\}/g,function(match,key){return str[key]})};dojo.date.locale.regexp=function(options){return dojo.date.locale._parseInfo(options).regexp};dojo.date.locale._parseInfo=function(options){options=options||{};var locale=dojo.i18n.normalizeLocale(options.locale),bundle=dojo.date.locale._getGregorianBundle(locale),formatLength=options.formatLength||"short",datePattern=options.datePattern||bundle["dateFormat-"+formatLength],timePattern=options.timePattern||bundle["timeFormat-"+formatLength],pattern;if(options.selector=="date"){pattern=datePattern}else{if(options.selector=="time"){pattern=timePattern}else{pattern=bundle["dateTimeFormat-"+formatLength].replace(/\{(\d+)\}/g,function(match,key){return[timePattern,datePattern][key]})}}var tokens=[],re=_processPattern(pattern,dojo.hitch(this,_buildDateTimeRE,tokens,bundle,options));return{regexp:re,tokens:tokens,bundle:bundle}};dojo.date.locale.parse=function(value,options){var info=dojo.date.locale._parseInfo(options),tokens=info.tokens,bundle=info.bundle,re=new RegExp("^"+info.regexp+"$",info.strict?"":"i"),match=re.exec(value);if(!match){return null}var widthList=["abbr","wide","narrow"],result=[1970,0,1,0,0,0,0],amPm="",valid=dojo.every(match,function(v,i){if(!i){return true}var token=tokens[i-1];var l=token.length;switch(token.charAt(0)){case"y":if(l!=2&&options.strict){result[0]=v}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear(),century=year.substring(0,2)*100,cutoff=Math.min(Number(year.substring(2,4))+20,99),num=(v<cutoff)?century+v:century-100+v;result[0]=num}else{if(options.strict){return false}result[0]=v}}break;case"M":if(l>2){var months=bundle["months-format-"+widthList[l-3]].concat();if(!options.strict){v=v.replace(".","").toLowerCase();months=dojo.map(months,function(s){return s.replace(".","").toLowerCase()})}v=dojo.indexOf(months,v);if(v==-1){return false}}else{v--}result[1]=v;break;case"E":case"e":var days=bundle["days-format-"+widthList[l-3]].concat();if(!options.strict){v=v.toLowerCase();days=dojo.map(days,function(d){return d.toLowerCase()})}v=dojo.indexOf(days,v);if(v==-1){return false}break;case"D":result[1]=0;case"d":result[2]=v;break;case"a":var am=options.am||bundle.am;var pm=options.pm||bundle.pm;if(!options.strict){var period=/\./g;v=v.replace(period,"").toLowerCase();am=am.replace(period,"").toLowerCase();pm=pm.replace(period,"").toLowerCase()}if(options.strict&&v!=am&&v!=pm){return false}amPm=(v==pm)?"p":(v==am)?"a":"";break;case"K":if(v==24){v=0}case"h":case"H":case"k":if(v>23){return false}result[3]=v;break;case"m":result[4]=v;break;case"s":result[5]=v;break;case"S":result[6]=v}return true});var hours=+result[3];if(amPm==="p"&&hours<12){result[3]=hours+12}else{if(amPm==="a"&&hours==12){result[3]=0}}var dateObject=new Date(result[0],result[1],result[2],result[3],result[4],result[5],result[6]);if(options.strict){dateObject.setFullYear(result[0])}var allTokens=tokens.join(""),dateToken=allTokens.indexOf("d")!=-1,monthToken=allTokens.indexOf("M")!=-1;if(!valid||(monthToken&&dateObject.getMonth()>result[1])||(dateToken&&dateObject.getDate()>result[2])){return null}if((monthToken&&dateObject.getMonth()<result[1])||(dateToken&&dateObject.getDate()<result[2])){dateObject=dojo.date.add(dateObject,"hour",1)}return dateObject};function _processPattern(pattern,applyPattern,applyLiteral,applyAll){var identity=function(x){return x};applyPattern=applyPattern||identity;applyLiteral=applyLiteral||identity;applyAll=applyAll||identity;var chunks=pattern.match(/(''|[^'])+/g),literal=pattern.charAt(0)=="'";dojo.forEach(chunks,function(chunk,i){if(!chunk){chunks[i]=""}else{chunks[i]=(literal?applyLiteral:applyPattern)(chunk);literal=!literal}});return applyAll(chunks.join(""))}function _buildDateTimeRE(tokens,bundle,options,pattern){pattern=dojo.regexp.escapeString(pattern);if(!options.strict){pattern=pattern.replace(" a"," ?a")}return pattern.replace(/([a-z])\1*/ig,function(match){var s,c=match.charAt(0),l=match.length,p2="",p3="";if(options.strict){if(l>1){p2="0{"+(l-1)+"}"}if(l>2){p3="0{"+(l-2)+"}"}}else{p2="0?";p3="0{0,2}"}switch(c){case"y":s="\\d{2,4}";break;case"M":s=(l>2)?"\\S+?":p2+"[1-9]|1[0-2]";break;case"D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case"d":s="[12]\\d|"+p2+"[1-9]|3[01]";break;case"w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case"E":s="\\S+";break;case"h":s=p2+"[1-9]|1[0-2]";break;case"k":s=p2+"\\d|1[01]";break;case"H":s=p2+"\\d|1\\d|2[0-3]";break;case"K":s=p2+"[1-9]|1\\d|2[0-4]";break;case"m":case"s":s="[0-5]\\d";break;case"S":s="\\d{"+l+"}";break;case"a":var am=options.am||bundle.am||"AM";var pm=options.pm||bundle.pm||"PM";if(options.strict){s=am+"|"+pm}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase()}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase()}if(s.indexOf(".")!=-1){s+="|"+s.replace(/\./g,"")}}s=s.replace(/\./g,"\\.");break;default:s=".*"}if(tokens){tokens.push(match)}return"("+s+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}})();(function(){var _customFormats=[];dojo.date.locale.addCustomFormats=function(packageName,bundleName){_customFormats.push({pkg:packageName,name:bundleName})};dojo.date.locale._getGregorianBundle=function(locale){var gregorian={};dojo.forEach(_customFormats,function(desc){var bundle=dojo.i18n.getLocalization(desc.pkg,desc.name,locale);gregorian=dojo.mixin(gregorian,bundle)},this);return gregorian}})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,context,locale){var label,lookup=dojo.date.locale._getGregorianBundle(locale),props=[item,context,type];if(context=="standAlone"){var key=props.join("-");label=lookup[key];if(label[0]==1){label=undefined}}props[1]="format";return(label||lookup[props.join("-")]).concat()};dojo.date.locale.isWeekend=function(dateObject,locale){var weekend=dojo.cldr.supplemental.getWeekend(locale),day=(dateObject||new Date()).getDay();if(weekend.end<weekend.start){weekend.end+=7;if(day<weekend.start){day+=7}}return day>=weekend.start&&day<=weekend.end};dojo.date.locale._getDayOfYear=function(dateObject){return dojo.date.difference(new Date(dateObject.getFullYear(),0,1,dateObject.getHours()),dateObject)+1};dojo.date.locale._getWeekOfYear=function(dateObject,firstDayOfWeek){if(arguments.length==1){firstDayOfWeek=0}var firstDayOfYear=new Date(dateObject.getFullYear(),0,1).getDay(),adj=(firstDayOfYear-firstDayOfWeek+7)%7,week=Math.floor((dojo.date.locale._getDayOfYear(dateObject)+adj-1)/7);if(firstDayOfYear==firstDayOfWeek){week++}return week}}if(!dojo._hasResource["dijit.Calendar"]){dojo._hasResource["dijit.Calendar"]=true;dojo.provide("dijit.Calendar");dojo.declare("dijit.Calendar",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/Calendar.html",'<table cellspacing="0" cellpadding="0" class="dijitCalendarContainer" role="grid" dojoAttachEvent="onkeypress: _onKeyPress">\r\n\t<thead>\r\n\t\t<tr class="dijitReset dijitCalendarMonthContainer" valign="top">\r\n\t\t\t<th class=\'dijitReset\' dojoAttachPoint="decrementMonth">\r\n\t\t\t\t<img src="${_blankGif}" alt="" class="dijitCalendarIncrementControl dijitCalendarDecrease" waiRole="presentation">\r\n\t\t\t\t<span dojoAttachPoint="decreaseArrowNode" class="dijitA11ySideArrow">-</span>\r\n\t\t\t</th>\r\n\t\t\t<th class=\'dijitReset\' colspan="5">\r\n\t\t\t\t<div class="dijitVisible">\r\n\t\t\t\t\t<div class="dijitPopup dijitMenu dijitMenuPassive dijitHidden" dojoAttachPoint="monthDropDown" dojoAttachEvent="onmouseup: _onMonthSelect, onmouseover: _onMenuHover, onmouseout: _onMenuHover">\r\n\t\t\t\t\t\t<div class="dijitCalendarMonthLabelTemplate dijitCalendarMonthLabel"></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div dojoAttachPoint="monthLabelSpacer" class="dijitSpacer"></div>\r\n\t\t\t\t<div dojoAttachPoint="monthLabelNode" class="dijitCalendarMonthLabel dijitInline dijitVisible" dojoAttachEvent="onmousedown: _onMonthToggle"></div>\r\n\t\t\t</th>\r\n\t\t\t<th class=\'dijitReset\' dojoAttachPoint="incrementMonth">\r\n\t\t\t\t<img src="${_blankGif}" alt="" class="dijitCalendarIncrementControl dijitCalendarIncrease" waiRole="presentation">\r\n\t\t\t\t<span dojoAttachPoint="increaseArrowNode" class="dijitA11ySideArrow">+</span>\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th class="dijitReset dijitCalendarDayLabelTemplate" role="columnheader"><span class="dijitCalendarDayLabel"></span></th>\r\n\t\t</tr>\r\n\t</thead>\r\n\t<tbody dojoAttachEvent="onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut" class="dijitReset dijitCalendarBodyContainer">\r\n\t\t<tr class="dijitReset dijitCalendarWeekTemplate" role="row">\r\n\t\t\t<td class="dijitReset dijitCalendarDateTemplate" role="gridcell"><span class="dijitCalendarDateLabel"></span></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n\t<tfoot class="dijitReset dijitCalendarYearContainer">\r\n\t\t<tr>\r\n\t\t\t<td class=\'dijitReset\' valign="top" colspan="7">\r\n\t\t\t\t<h3 class="dijitCalendarYearLabel">\r\n\t\t\t\t\t<span dojoAttachPoint="previousYearLabelNode" class="dijitInline dijitCalendarPreviousYear"></span>\r\n\t\t\t\t\t<span dojoAttachPoint="currentYearLabelNode" class="dijitInline dijitCalendarSelectedYear"></span>\r\n\t\t\t\t\t<span dojoAttachPoint="nextYearLabelNode" class="dijitInline dijitCalendarNextYear"></span>\r\n\t\t\t\t</h3>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</tfoot>\r\n</table>\r\n'),value:new Date(),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{tabIndex:"domNode"}),setValue:function(value){dojo.deprecated("dijit.Calendar:setValue() is deprecated.  Use attr('value', ...) instead.","","2.0");this.attr("value",value)},_getValueAttr:function(){var value=new this.dateClassObj(this.value);value.setHours(0,0,0,0);if(value.getDate()<this.value.getDate()){value=this.dateFuncObj.add(value,"hour",1)}return value},_setValueAttr:function(value){if(!this.value||this.dateFuncObj.compare(value,this.value)){value=new this.dateClassObj(value);value.setHours(1);this.displayMonth=new this.dateClassObj(value);if(!this.isDisabledDate(value,this.lang)){this.value=value;this.onChange(this.attr("value"))}dojo.attr(this.domNode,"aria-label",this.dateLocaleModule.format(value,{selector:"date",formatLength:"full"}));this._populateGrid()}},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild)}node.appendChild(dojo.doc.createTextNode(text))},_populateGrid:function(){var month=this.displayMonth;month.setDate(1);var firstDay=month.getDay(),daysInMonth=this.dateFuncObj.getDaysInMonth(month),daysInPreviousMonth=this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(month,"month",-1)),today=new this.dateClassObj(),dayOffset=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);if(dayOffset>firstDay){dayOffset-=7}dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(template,i){i+=dayOffset;var date=new this.dateClassObj(month),number,clazz="dijitCalendar",adj=0;if(i<firstDay){number=daysInPreviousMonth-firstDay+i+1;adj=-1;clazz+="Previous"}else{if(i>=(firstDay+daysInMonth)){number=i-firstDay-daysInMonth+1;adj=1;clazz+="Next"}else{number=i-firstDay+1;clazz+="Current"}}if(adj){date=this.dateFuncObj.add(date,"month",adj)}date.setDate(number);if(!this.dateFuncObj.compare(date,today,"date")){clazz="dijitCalendarCurrentDate "+clazz}if(this._isSelectedDate(date,this.lang)){clazz="dijitCalendarSelectedDate "+clazz}if(this.isDisabledDate(date,this.lang)){clazz="dijitCalendarDisabledDate "+clazz}var clazz2=this.getClassForDate(date,this.lang);if(clazz2){clazz=clazz2+" "+clazz}template.className=clazz+"Month dijitCalendarDateTemplate";template.dijitDateValue=date.valueOf();var label=dojo.query(".dijitCalendarDateLabel",template)[0],text=date.getDateLocalized?date.getDateLocalized(this.lang):date.getDate();this._setText(label,text)},this);var monthNames=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);this._setText(this.monthLabelNode,monthNames[month.getMonth()]);var y=month.getFullYear()-1;var d=new this.dateClassObj();dojo.forEach(["previous","current","next"],function(name){d.setFullYear(y++);this._setText(this[name+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}))},this);var _this=this;var typematic=function(nodeProp,dateProp,adj){_this._connects.push(dijit.typematic.addMouseListener(_this[nodeProp],_this,function(count){if(count>=0){_this._adjustDisplay(dateProp,adj)}},0.8,500))};typematic("incrementMonth","month",1);typematic("decrementMonth","month",-1);typematic("nextYearLabelNode","year",1);typematic("previousYearLabelNode","year",-1)},goToToday:function(){this.attr("value",this.dateClassObj())},constructor:function(args){var dateClass=(args.datePackage&&(args.datePackage!="dojo.date"))?args.datePackage+".Date":"Date";this.dateClassObj=dojo.getObject(dateClass,false);this.datePackage=args.datePackage||this.datePackage;this.dateFuncObj=dojo.getObject(this.datePackage,false);this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false)},postMixInProperties:function(){if(isNaN(this.value)){delete this.value}this.inherited(arguments)},postCreate:function(){this.inherited(arguments);dojo.setSelectable(this.domNode,false);var cloneClass=dojo.hitch(this,function(clazz,n){var template=dojo.query(clazz,this.domNode)[0];for(var i=0;i<n;i++){template.parentNode.appendChild(template.cloneNode(true))}});cloneClass(".dijitCalendarDayLabelTemplate",6);cloneClass(".dijitCalendarDateTemplate",6);cloneClass(".dijitCalendarWeekTemplate",5);var dayNames=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang);var dayOffset=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(label,i){this._setText(label,dayNames[(i+dayOffset)%7])},this);var monthNames=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);cloneClass(".dijitCalendarMonthLabelTemplate",monthNames.length-1);dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(node,i){dojo.attr(node,"month",i);this._setText(node,monthNames[i]);dojo.place(node.cloneNode(true),this.monthLabelSpacer)},this);var value=this.value;this.value=null;this.attr("value",new this.dateClassObj(value))},_onMenuHover:function(e){dojo.stopEvent(e);dojo.toggleClass(e.target,"dijitMenuItemHover")},_adjustDisplay:function(part,amount){this.displayMonth=this.dateFuncObj.add(this.displayMonth,part,amount);this._populateGrid()},_onMonthToggle:function(evt){dojo.stopEvent(evt);if(evt.type=="mousedown"){var coords=dojo.position(this.monthLabelNode);var dim={width:coords.w+"px",top:-this.displayMonth.getMonth()*coords.h+"px"};if((dojo.isIE&&dojo.isQuirks)||dojo.isIE<7){dim.left=-coords.w/2+"px"}dojo.style(this.monthDropDown,dim);this._popupHandler=this.connect(document,"onmouseup","_onMonthToggle")}else{this.disconnect(this._popupHandler);delete this._popupHandler}dojo.toggleClass(this.monthDropDown,"dijitHidden");dojo.toggleClass(this.monthLabelNode,"dijitVisible")},_onMonthSelect:function(evt){this._onMonthToggle(evt);this.displayMonth.setMonth(dojo.attr(evt.target,"month"));this._populateGrid()},_onDayClick:function(evt){dojo.stopEvent(evt);for(var node=evt.target;node&&!node.dijitDateValue;node=node.parentNode){}if(node&&!dojo.hasClass(node,"dijitCalendarDisabledDate")){this.attr("value",node.dijitDateValue);this.onValueSelected(this.attr("value"))}},_onDayMouseOver:function(evt){var node=evt.target;if(node&&(node.dijitDateValue||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){dojo.addClass(node,"dijitCalendarHoveredDate");this._currentNode=node}},_onDayMouseOut:function(evt){if(!this._currentNode){return}for(var node=evt.relatedTarget;node;){if(node==this._currentNode){return}try{node=node.parentNode}catch(x){node=null}}dojo.removeClass(this._currentNode,"dijitCalendarHoveredDate");this._currentNode=null},_onKeyPress:function(evt){var dk=dojo.keys,increment=-1,interval,newValue=this.value;switch(evt.keyCode){case dk.RIGHT_ARROW:increment=1;case dk.LEFT_ARROW:interval="day";if(!this.isLeftToRight()){increment*=-1}break;case dk.DOWN_ARROW:increment=1;case dk.UP_ARROW:interval="week";break;case dk.PAGE_DOWN:increment=1;case dk.PAGE_UP:interval=evt.ctrlKey?"year":"month";break;case dk.END:newValue=this.dateFuncObj.add(newValue,"month",1);interval="day";case dk.HOME:newValue=new Date(newValue).setDate(1);break;case dk.ENTER:this.onValueSelected(this.attr("value"));break;case dk.ESCAPE:default:return}dojo.stopEvent(evt);if(interval){newValue=this.dateFuncObj.add(newValue,interval,increment)}this.attr("value",newValue)},onValueSelected:function(date){},onChange:function(date){},_isSelectedDate:function(dateObject,locale){return !this.dateFuncObj.compare(dateObject,this.value,"date")},isDisabledDate:function(dateObject,locale){},getClassForDate:function(dateObject,locale){}})}if(!dojo._hasResource["local.Form.Element.Calendar"]){dojo._hasResource["local.Form.Element.Calendar"]=true;dojo.provide("local.Form.Element.Calendar");dojo.declare("Form_Element_Calendar",Form_Element_Field,{_field:null,_widgetNode:null,_constraints:{},_value:null,constructor:function(){this.inherited(arguments);this._constraints={}},setField:function(field){if(true==dojo.isObject(field)&&null!=field){this._field=field;this._destroyExistantWidget(this._field.id);this._widgetNode=dojo.create("div");dojo.attr(this._widgetNode,"id",this._field.id+"-calendar");dojo.place(this._widgetNode,this._field,"after")}return this},setValue:function(date){this._value=date;return this},addConstraint:function(constraint,value){if(dojo.isString(constraint)&&""!=constraint){this._constraints[constraint]=value}return this},build:function(){if(null==this._field){throw"Unable to build Calendar : missing parameters"}dojo.addClass(this._field,"elem-hidden");var widgetParams={useDayOnly:true,lang:"fr-fr"};this._widget=new Calendar(widgetParams,this._widgetNode);this._widget.setField(this._field);this._widget.constraints=this._constraints;this._widget.constraints.date_format={datePattern:"yyyy-MM-dd",selector:"date",locale:"en"};if(null!=this._value){this._widget.setValue(this._value)}this._widget.refresh();dojo.addClass(this._field,"dojo-form-calendar");return this._widget}});dojo.declare("Calendar",dijit.Calendar,{_field:null,constraints:{},setConstraint:function(constraint,value){this.constraints[constraint]=value;return this},setField:function(field){this._field=field;return this},setValue:function(date){this.attr("value",date);this.setFieldValue(date);return this},isDisabledDate:function(dateObject,locale){if(false==this.constraints.weekend&&true==dojo.date.locale.isWeekend(dateObject)){return true}if("undefined"!=this.constraints.min){if(-1==dojo.date.compare(dateObject,this.constraints.min,"date")){return true}}if("udefined"!=this.constraints.max){if(-1==dojo.date.compare(this.constraints.max,dateObject,"date")){return true}}return false},onChange:function(date){this.setFieldValue(date)},setFieldValue:function(date){if(null==this._field){return}this._field.value=dojo.date.locale.format(date,this.constraints.date_format)},refresh:function(){this._populateGrid();return this}})}if(!dojo._hasResource["local.Document.Directory.Reservation.Ian"]){dojo._hasResource["local.Document.Directory.Reservation.Ian"]=true;dojo.provide("local.Document.Directory.Reservation.Ian");dojo.declare("Document_Directory_Reservation_Ian",null,{_documentReference:null,_form:null,_errorNode:null,constructor:function(documentReference){if(false==dojo.isObject(documentReference)||!documentReference instanceof Document_Directory_Context){return}this._documentReference=documentReference},build:function(){if(null==this._documentReference){throw"Document_Abstract_Reservation_Ian requires valid document reference"}this._getContent();this._initForm()._showContent()},_initForm:function(){this._form=new Form_Abstract(dojo.query("form.hotel-reservation")[0]);if(null==this._form.get()){return this}this._errorNode=dojo.query(".booking .error")[0];this._buildCalendars()._buildFormElements();return this},_buildCalendars:function(){try{var arrival=new Form_Element_Calendar();arrival.setField(dojo.byId("arrival-date")).setValue(new Date()).addConstraint("min",new Date()).build();this._form.registerWidget(arrival.getWidget(),"arrival-date")}catch(e){application().log("resa arrival",e)}try{var departure=new Form_Element_Calendar();departure.setField(dojo.byId("departure-date")).setValue(dojo.date.add(new Date(),"day",1)).addConstraint("min",dojo.date.add(new Date(),"day",1)).addConstraint("max",dojo.date.add(new Date(),"day",30)).build();this._form.registerWidget(departure.getWidget(),"departure-date")}catch(e){application().log("resa departure",e)}dojo.connect(arrival.getWidget(),"onValueSelected",dojo.hitch(this,function(date){try{this._form.getWidget("departure-date").setConstraint("min",dojo.date.add(date,"day",1)).setConstraint("max",dojo.date.add(date,"day",30)).setValue(dojo.date.add(date,"day",1))}catch(e){}}));return this},_buildFormElements:function(){var _this=this;var item=dojo.query(".options select[name=rooms]",this._form.get());if(null!=item[0]){dojo.connect(item[0],"onchange",function(){_this._updateRoomsNumber(this)})}dojo.query(".options .childs select",this._form.get()).forEach(function(select){dojo.connect(select,"onchange",function(){_this._updateChildAges(this)})});dojo.connect(this._form.get(),"onsubmit",function(evt){evt.preventDefault();_this._checkForm(this)});item=dojo.query("input[name=reservation-id]",this._form.get());if(null!=item[0]){item[0].value="directory-"+this._documentReference.getId()}return this},_updateRoomsNumber:function(node){var _this=this;var contentNode=dojo.query(".options",this._form.get());if(null==contentNode[0]){return}contentNode=new dojo.NodeList(contentNode[0]);var rooms=dojo.query(".options .room",this._form.get());var roomLength=rooms.length;var numberOfRooms=parseInt(node.value);if(numberOfRooms>roomLength){numberOfRooms-=roomLength;for(i=1;i<=numberOfRooms;i++){var roomRef=dojo.clone(rooms[0]);dojo.addClass(dojo.query(".childs-ages",roomRef)[0],"hidden");dojo.connect(dojo.query(".childs select",roomRef)[0],"onchange",function(){_this._updateChildAges(this)});var roomOrder=(roomLength+i);dojo.query(".room-number",roomRef)[0].innerHTML="Chambre "+roomOrder;contentNode.addContent(roomRef,"last")}}else{for(i=numberOfRooms;i<roomLength;i++){var room=rooms[i];var parent=room.parentNode;parent.removeChild(room)}}},_updateChildAges:function(item){var index=dojo.query(".options .room",this._form.get()).indexOf(item.parentNode.parentNode.parentNode);var content=dojo.query(".options .childs-ages",this._form.get());if(null==content[index]){return}content=content[index];var node=new dojo.NodeList(content);if(0==item.value){dojo.addClass(content,"hidden");var i=0;dojo.query("label",content).forEach(function(field){if(0!=i){content.removeChild(field)}i+=1})}else{var labels=dojo.query("label",content);var fieldsLength=labels.length;var numberOfFields=parseInt(item.value);if(numberOfFields>fieldsLength){numberOfFields-=fieldsLength;for(i=1;i<=numberOfFields;i++){var fieldRef=dojo.clone(labels[0]);dojo.query("span",fieldRef)[0].innerHTML=application().getTranslator().translate("ian-child-age-x")+" "+(fieldsLength+i);node.addContent(fieldRef,"last")}}else{for(i=numberOfFields;i<fieldsLength;i++){var label=labels[i];var parent=label.parentNode;parent.removeChild(label)}}dojo.removeClass(content,"hidden")}},_checkForm:function(form){this.setError(null);try{if(1==dojo.date.compare(this._form.getWidget("departure-date").attr("value"),this._form.getWidget("arrival-date").attr("value"),"date")){this._availabilities(form)}else{this.setError(application().getTranslator().translate("ian-date-error"))}}catch(e){application().log("ian",e);this.setError(application().getTranslator().translate("error"))}},_availabilities:function(form){oldpopup().setClass("popup tundra popup-hreservation").setProcessing('<img src="/images/corporate/logo/logo-hotels.gif" width="133" height="80" /><br />'+application().getTranslator().translate("ian-search"));var rooms=dojo.byId("booking-rooms");if(null==rooms){this.setError(application().getTranslator().translate("error"));return}dojo.addClass(rooms,"hidden");var error=null;var docId=dojo.query("input[name=reservation-id]",form)[0];var roomsOptions={};roomsOptions.arrival=dojo.byId("arrival-date").value;roomsOptions.departure=dojo.byId("departure-date").value;roomsOptions.rooms=[];dojo.query(".room",form).forEach(function(room){var options={};var adults=dojo.query(".adults select",room)[0];options.adults=adults.value;if(0!=dojo.query(".childs select",room)[0].value){options.childs=new Array();dojo.query(".childs-ages select",room).forEach(function(child){if(!isNaN(child.value)){options.childs.push(child.value)}else{error=application().getTranslator().translate("ian-childs-error")}})}roomsOptions.rooms.push(options)});if(null!=error){this.setError(error);return}var service=async().getSmd("ian");var rpcReturn=service.searchAvailabilities(docId.value,roomsOptions);if(rpcReturn){rpcReturn.addCallback(dojo.hitch(this,"_showResultset"));rpcReturn.addErrback(dojo.hitch(this,"_onRpcError"))}},_onRpcError:function(){this._onLoadResultset();this.setError(application().getTranslator().translate("load-partial-scrit-error"))},_showResultset:function(response){this._onLoadResultset();if(0==response.length){this.setError(application().getTranslator().translate("ian-no-availabilities"));return}var rooms=dojo.byId("booking-rooms");if(null==rooms){return}var list=dojo.query("ul",rooms)[0];list.innerHTML="";dojo.removeClass(rooms,"hidden");var i=0;dojo.forEach(response,function(room){var li=dojo.create("li");if(0==i%2){dojo.addClass(li,"odd")}dojo.create("span",{"class":"room-description",innerHTML:room.room["typeDescription"]},li,"last");if("undefined"!=typeof room.room["promoRate"]){html="<strike>"+room.room["rate"]+" "+room.room["currency"]+"</strike>&nbsp;&nbsp;&nbsp;";html+=room.room["promoRate"]+" "+room.room["currency"]}else{html=room.room["rate"]+" "+room.room["currency"]}dojo.create("span",{"class":"room-price",innerHTML:html},li,"last");dojo.query(dojo.create("a",{"class":"room-submit",innerHTML:application().getTranslator().translate("book"),href:room.url})).onclick(function(evt){evt.preventDefault();window.open(this.href)}).place(li,"last");dojo.place(li,list,"last");i+=1});dojo.create("li",{"class":"rooms-clear"},list,"last")},setError:function(message){if(null==this._errorNode){return}if(null==message){dojo.style(this._errorNode,"display","none");return}dojo.style(this._errorNode,"display","block");dojo.attr(this._errorNode,"innerHTML",message);oldpopup().hide()},_getContent:function(){return this},_showContent:function(){},_onLoadResultset:function(){oldpopup().hide()}})}if(!dojo._hasResource["local.widget.Form.Process"]){dojo._hasResource["local.widget.Form.Process"]=true;dojo.provide("local.widget.Form.Process");dojo.declare("Form_Process",null,{_callerReference:null,_form:null,_messageNode:null,_callback:null,_response:null,constructor:function(form,callerReference){if(null==form){return}this._form=form;this._callerReference=callerReference;this._extractParams();this._build();return this},_extractParams:function(){var message=dojo.byId(this.getId()+"_message");if(null!=message){this._messageNode=message}},_build:function(){dojo.connect(this.getForm(),"onsubmit",dojo.hitch(this,function(evt){evt.preventDefault();this._onSubmit()}))},_onSubmit:function(){this.onSubmit(this);this._processing(true);dojo.xhrPost({url:this.getAction(),form:this.getForm(),handleAs:"json",load:dojo.hitch(this,function(response,ioArgs){this._response=response;this._parseResponse()}),error:dojo.hitch(this,function(){this._showXhrError()}),sync:true})},onSubmit:function(processReference){},_processing:function(display){if(null==this._messageNode){return}dojo.attr(this._messageNode,{innerHTML:"&nbsp;","class":(true==display)?"form-message-loading":"form-message-hidden"})},_parseResponse:function(){if(null!=this._callback){this._callback(this,this._response);return}if("error"==typeof this._response){this._showXhrError();return}if("undefined"!=typeof this._response.exception){this._processException();return}if("undefined"!=typeof this._response.result){this._proccessSuccess();return}this._processErrors()},_showXhrError:function(){oldpopup().alert(application().getTranslator().toOctal("form-process-error")).show()},_processException:function(){this._processing(false);this._callerReference.parseException(this._response.exception)},_proccessSuccess:function(){if(null==this._messageNode){return}var messageKey=("true"==this._response.result||"1"==this._response.result)?"success":"error";this._callerReference.isSuccess=("true"==this._response.result||"1"==this._response.result)?true:false;this._clearErrors();if("success"==messageKey){this._clearFields()}dojo.attr(this._messageNode,{innerHTML:this._callerReference.getMessage(messageKey),"class":"form-message-visible"});this.onSuccess(this)},onSuccess:function(processReference){},_processErrors:function(){this._processing(false);this._clearErrors();var errors=dojo.fromJson(this._response);errors=errors[this.getId()];for(elem in errors){var list=dojo.create("ul",{"class":"form-errors"});for(err in errors[elem]){dojo.create("li",{innerHTML:errors[elem][err]},list,"last")}dojo.place(list,dojo.byId(this.getId()+"-"+elem),"after");dojo.addClass(list.parentNode,"element-error")}this.onError(this)},onError:function(processReference){},_clearErrors:function(){dojo.query(".form-errors").forEach(function(item){dojo.destroy(item)});dojo.query(".element-error").removeClass("element-error")},_clearFields:function(){var callbackClearField=function(elementId){if(null==elementId){return}dojo.byId(elementId).value=""};dojo.query("input",this.getForm()).forEach(function(item){if("text"==dojo.attr(item,"type")){callbackClearField(dojo.attr(item,"id"))}});dojo.query("textarea",this.getForm()).forEach(function(item){callbackClearField(dojo.attr(item,"id"))})},setResponseCallback:function(callback){if(!dojo.isFunction(callback)){return}this._callback=callback;return this},submit:function(){this._onSubmit()},getForm:function(){return this._form},getResponse:function(){return this._response},getAction:function(){return dojo.attr(this.getForm(),"action")},getId:function(){return dojo.attr(this.getForm(),"id")}})}if(!dojo._hasResource["local.Document.Directory.Reservation.LaFourchette"]){dojo._hasResource["local.Document.Directory.Reservation.LaFourchette"]=true;dojo.provide("local.Document.Directory.Reservation.LaFourchette");dojo.declare("Document_Directory_Reservation_LaFourchette",null,{_form:null,_timeNode:null,constructor:function(documentReference){if(false==dojo.isObject(documentReference)||!documentReference instanceof Document_Directory_Context){return}this._documentReference=documentReference},build:function(){if(null==this._documentReference){throw"Document_Abstract_Reservation_LaFourchette requires valid document reference"}this._getContent();this._initForm()._showContent()},_getContent:function(){},_initForm:function(){this._form=dojo.query("form.restaurant-reservation")[0];if(null==this._form){return this}this._buildCalendar()._buildFormElements();return this},_showContent:function(){},_buildCalendar:function(){try{var arrival=new Form_Element_Calendar();arrival.setField(dojo.byId("booking-date")).setValue(new Date()).addConstraint("min",new Date()).build();var now=new Date();this._updateTimes(now.getHours());dojo.connect(arrival.getWidget(),"onValueSelected",dojo.hitch(this,function(date){var now=new Date();if(0==dojo.date.compare(date,now,"date")){this._updateTimes(now.getHours())}else{this._updateTimes(null)}}))}catch(e){application().log("Document_Abstract_Reservation_LaFourchette._buildCalendar",e)}return this},_buildFormElements:function(){dojo.connect(this._form,"onsubmit",dojo.hitch(this,function(evt){evt.preventDefault();this._onSubmit()}));var item=dojo.query("input[name=reservation-id]",this._form);if(null!=item[0]){item[0].value="directory-"+this._documentReference.getId()}return this},_updateTimes:function(hourStart){if(null==this._timeNode){this._timeNode=dojo.query("select[name=time]",this._form)[0]}if(null==this._timeNode){return}this._timeNode.innerHTML="";var date=new Date();hourStart=(null==hourStart)?30:(hourStart*60);for(i=hourStart;i<=1410;i+=30){date.setHours(0);date.setMinutes(i);var hours=(date.getHours()<10)?"0"+date.getHours():date.getHours();var minutes=(date.getMinutes()<10)?"0"+date.getMinutes():date.getMinutes();var option=(720==i)?'<option value="'+i+'" selected="selected">':'<option value="'+i+'">';dojo.place(option+hours+":"+minutes+"</otion>",this._timeNode,"last")}},_onSubmit:function(){oldpopup().setClass("popup tundra popup-rreservation").setProcessing('<img src="/images/corporate/logo/logo-lafourchette.gif" width="274" height="64" /><br />'+application().getTranslator().translate("lafourchette-redirect"));var lafourchetteResponse=function(process){var response=process.getResponse();if("undefined"!=response.lafourchette["url"]&&undefined!=response.lafourchette["url"]){oldpopup().hide();window.open(response.lafourchette["url"])}};new Form_Process(this._form,null).setResponseCallback(lafourchetteResponse).submit()}})}if(!dojo._hasResource["local.Document.Directory.Reservation"]){dojo._hasResource["local.Document.Directory.Reservation"]=true;dojo.provide("local.Document.Directory.Reservation");dojo.declare("Document_Directory_Reservation",null,{_documentReference:null,constructor:function(documentReference){if(false==dojo.isObject(documentReference)||!documentReference instanceof Document_Directory_Context){return}this._documentReference=documentReference},open:function(){if(null==this._documentReference){throw"Document_Directory_Reservation requires valid document reference"}this._buildForm()},build:function(){if(null==this._documentReference){throw"Document_Directory_Reservation requires valid document reference"}this._buildForm()},_build:function(){var _this=this;dojo.query(".reservation",this._documentReference.getNode()).forEach(function(item){dojo.connect(item,"onclick",function(evt){evt.preventDefault();_this._onClick(this)})});dojo.query(".ticket",this._documentReference.getNode()).forEach(function(item){if(dojo.hasClass(item,"reservation")){return}dojo.connect(item,"onclick",function(evt){evt.preventDefault();_this._onClick(this)})})},_onClick:function(item){if(dojo.hasClass(item,"ticket")){window.open(item.href);return}this._buildForm()},_buildForm:function(){try{if(/^form=ian/.test(this._documentReference.getConfig("reservation"))){new Document_Directory_Reservation_Ian(this._documentReference).build()}else{if(/^form=lafourchette/.test(this._documentReference.getConfig("reservation"))){new Document_Directory_Reservation_LaFourchette(this._documentReference).build()}}}catch(e){application().log("Document_Directory_Reservation._buildForm",e)}}})}if(!dojo._hasResource["local.Document.Directory.Contact"]){dojo._hasResource["local.Document.Directory.Contact"]=true;dojo.provide("local.Document.Directory.Contact");dojo.declare("Document_Directory_Contact",Form_Abstract,{_xhrSend:true,_refresh:function(content){try{dojo.attr(this._formContainer,"innerHTML",content);this._form=dojo.query("#"+this._formId,this._formContainer)[0];this.build()}catch(e){application().log("contact",e)}}})}if(!dojo._hasResource["local.Document.Directory.Coupon"]){dojo._hasResource["local.Document.Directory.Coupon"]=true;dojo.provide("local.Document.Directory.Coupon");dojo.declare("Document_Directory_Coupon",null,{_container:null,constructor:function(container){if(dojo.isObject(container)&&null!=container){this._container=container}},build:function(){if(null==this._container){throw"Document_Directory_Coupon requires directory reference"}this._connectSendLinks()},_connectSendLinks:function(){dojo.query(".send-by-sms",this._container).connect("onclick",dojo.hitch(this,function(evt){this._onClickSend("sms")}));dojo.query(".send-by-mail",this._container).connect("onclick",dojo.hitch(this,function(evt){this._onClickSend("email")}))},_onClickSend:function(sendType){dojo.publish("document/coupon/send",[sendType])}})}if(!dojo._hasResource["local.Document.Send.Abstract"]){dojo._hasResource["local.Document.Send.Abstract"]=true;dojo.provide("local.Document.Send.Abstract");dojo.declare("Document_Send_Abstract",null,{_container:null,constructor:function(container){this.setContainer(container)},setContainer:function(container){if(true==dojo.isObject(container)&&null!=container){this._container=container}return this},show:function(){dojo.removeClass(this._container,"elem-hidden")},hide:function(){dojo.addClass(this._container,"elem-hidden")}})}if(!dojo._hasResource["local.Document.Send.Social"]){dojo._hasResource["local.Document.Send.Social"]=true;dojo.provide("local.Document.Send.Social");dojo.declare("Document_Send_Social",Document_Send_Abstract,{build:function(){if(null==this._container){throw"Send context requires valid container"}this._buildLinks()},_buildLinks:function(){dojo.query(".add-this a",this._container).connect("onclick",function(evt){evt.preventDefault();if("favorites"==this.className){var href=this.href.split("#");var title="";try{title=href[1];href=href[0]}catch(e){}if(window.opera&&window.print){var element=dojo.create("a");dojo.attr(element,{href:href,title:title,rel:"sidebar"});element.click()}else{if(document.all){window.external.AddFavorite(href,title)}else{if(window.sidebar){window.sidebar.addPanel(title,href,"")}}}}else{window.open(this.href)}})}})}if(!dojo._hasResource["local.Form.Element.MaxLength"]){dojo._hasResource["local.Form.Element.MaxLength"]=true;dojo.provide("local.Form.Element.MaxLength");dojo.declare("Form_Element_MaxLength",Form_Element_Field,{_field:null,_messageNode:null,_length:null,_placement:"last",setField:function(field){if(true==dojo.isObject(field)&&null!=field){this._field=field}return this},setLength:function(maxLength){if("undefined"!=typeof maxLength&&null!=maxLength){this._length=maxLength}return this},setPlacement:function(placement){this._placement="after";if("last"==placement||"after"==placement||"before"==placement){this._placement=placement}return this},clearValue:function(){if(null==this._field){return}this._field.value="";this.refresh()},build:function(){if(null==this._length||null==this._field){throw"Unable to build Form_Field_MaxLength : missing parameters"}this._messageNode=dojo.create("span");dojo.attr(this._messageNode,{id:this._field.id+"-max-length","class":"field-max-length",innerHTML:this._length+" "+application().getTranslator().translate("form-left-chars")});dojo.place(this._messageNode,this._field,this._placement);dojo.connect(this._field,"onkeyup",dojo.hitch(this,function(){this._onKeyUp()}));this.refresh()},_onKeyUp:function(){if(null==this._field){return}var writeLength=0;if(this._length>this._field.value.length){writeLength=this._length-this._field.value.length}else{this._field.value=this._field.value.slice(0,this._length);writeLength=0}this._messageNode.innerHTML=writeLength+" "+application().getTranslator().translate("form-left-chars")},refresh:function(){this._onKeyUp()}})}if(!dojo._hasResource["local.Form.Sendto.Sms"]){dojo._hasResource["local.Form.Sendto.Sms"]=true;dojo.provide("local.Form.Sendto.Sms");dojo.declare("Form_Sendto_Sms",Form_Abstract,{build:function(){this.inherited(arguments);this._buildMessageMaxLength()},_buildMessageMaxLength:function(){try{new Form_Element_MaxLength().setField(dojo.byId("sendto_sms-sms_message")).setLength(70).setPlacement("after").build()}catch(e){}return this}})}if(!dojo._hasResource["local.Document.Send.Sms"]){dojo._hasResource["local.Document.Send.Sms"]=true;dojo.provide("local.Document.Send.Sms");dojo.declare("Document_Send_Sms",Document_Send_Abstract,{build:function(){if(null==this._container){throw"Send context requires valid container"}this._buildForm()},_buildForm:function(){try{new Form_Sendto_Sms(dojo.byId("sendto_sms")).enableXhr().build();dojo.subscribe("/form/sendto_sms/submited",dojo.hitch(this,function(response,success){this._container.innerHTML=response;this.build()}))}catch(e){application().log("sms",e,error)}}})}if(!dojo._hasResource["local.Form.Sendto.Email"]){dojo._hasResource["local.Form.Sendto.Email"]=true;dojo.provide("local.Form.Sendto.Email");dojo.declare("Form_Sendto_Email",Form_Abstract,{MAX_FIELDS:3,_fields:[],_availablesEmails:0,_addMailTrigger:null,build:function(){this.inherited(arguments);this._buildAddTo()},_buildAddTo:function(){this._availablesEmails=1;this._fields[0]=null;var disableEmail=dojo.hitch(this,function(item){if(false==dojo.hasClass(item.parentNode,"element-error")){dojo.addClass(item.parentNode,"elem-hidden")}else{this._availablesEmails+=1}});var to1=dojo.byId("sendto_email-email-to1");this._fields[1]=to1;disableEmail(to1);var to2=dojo.byId("sendto_email-email-to2");this._fields[2]=to2;disableEmail(to2);if(3>this._availablesEmails){this._addMailTrigger=dojo.create("dd");dojo.addClass(this._addMailTrigger,"add-field");var trigger=dojo.create("span");dojo.attr(trigger,"innerHTML",application().getTranslator().translate("add"));dojo.connect(trigger,"onclick",dojo.hitch(this,"_addMailField"));dojo.place(trigger,this._addMailTrigger,"last");dojo.place(this._addMailTrigger,to2.parentNode,"after")}},_addMailField:function(){try{dojo.removeClass(this._fields[this._availablesEmails].parentNode,"elem-hidden");this._availablesEmails+=1;if(this.MAX_FIELDS==this._availablesEmails){dojo.destroy(this._addMailTrigger)}}catch(e){}}})}if(!dojo._hasResource["local.Document.Send.Email"]){dojo._hasResource["local.Document.Send.Email"]=true;dojo.provide("local.Document.Send.Email");dojo.declare("Document_Send_Email",Document_Send_Abstract,{build:function(){if(null==this._container){throw"Send context requires valid container"}this._buildForm()},_buildForm:function(){try{new Form_Sendto_Email(dojo.byId("sendto_email")).enableXhr().build();dojo.subscribe("/form/sendto_email/submited",dojo.hitch(this,function(response,success){this._container.innerHTML=response;this.build()}))}catch(e){application().log("email",e,error)}}})}if(!dojo._hasResource["local.Form.Sendto.AddressBook"]){dojo._hasResource["local.Form.Sendto.AddressBook"]=true;dojo.provide("local.Form.Sendto.AddressBook");dojo.declare("Form_Sendto_AddressBook",Form_Abstract,{_tagNode:null,_visibilityNode:null,build:function(){this.inherited(arguments);this._buildVisibility()},_buildVisibility:function(){this._getVisibilityNode();if(null==this._visibilityNode){return}dojo.addClass(this._visibilityNode.parentNode,"private public");dojo.connect(this._visibilityNode,"onclick",function(){var labelPublic=dojo.query("#public-label label")[0];if(null==labelPublic){return}var content="";if(true==this.checked){content=application().getTranslator().translate("addressbook-public")+" :";dojo.addClass(this.parentNode,"public")}else{content=application().getTranslator().translate("addressbook-private")+" :";dojo.removeClass(this.parentNode,"public")}dojo.attr(labelPublic,"innerHTML",content)})},_getVisibilityNode:function(){if(null==this._visibilityNode){this._visibilityNode=dojo.query("#sendto_address-public",this._form)[0]}return this._visibilityNode},_getVisibilityValue:function(){try{return(true==this._getVisibilityNode().checked)?1:0}catch(e){return 0}},_getTagNode:function(){if(null==this._tagNode){this._tagNode=dojo.query("#sendto_address-tag",this._form)[0]}return this._tagNode},_getTagValue:function(){try{return this._getTagNode().value}catch(e){return""}},getPutUrl:function(){var url=application().buildUrl(this.getAction());url+="?public="+this._getVisibilityValue();url+="&tag="+this._getTagValue().replace(" ","|");url+="&referer="+escape(window.location);return url}})}if(!dojo._hasResource["local.Document.Send.AddressBook"]){dojo._hasResource["local.Document.Send.AddressBook"]=true;dojo.provide("local.Document.Send.AddressBook");dojo.declare("Document_Send_AddressBook",Document_Send_Abstract,{_form:null,build:function(){if(null==this._container){throw"Send context requires valid container"}this._buildForm()},_buildForm:function(){try{this._form=new Form_Sendto_AddressBook(dojo.byId("sendto_address"));this._form.enableXhr().build();dojo.subscribe("/form/sendto_address/submited",dojo.hitch(this,function(response,success){if("Exception:not_logged"==response){try{new Popup_User_Login().setHref(application().buildUrl("/login")).setReferer(this._form.getPutUrl()).open()}catch(e){application().log("force login",e,"warn")}}else{this._container.innerHTML=response;this.build()}}))}catch(e){application().log("address book",e,error)}}})}if(!dojo._hasResource["local.Document.Send.Dashboard"]){dojo._hasResource["local.Document.Send.Dashboard"]=true;dojo.provide("local.Document.Send.Dashboard");dojo.declare("Document_Send_Dashboard",Document_Send_Abstract,{_addTrigger:null,_putUrl:"",_processNode:null,build:function(){if(null==this._container){throw"Send context requires valid container"}this._buildXhr()},_buildXhr:function(){try{this._addTrigger=dojo.query(".addto a",this._container)[0];if(null==this._addTrigger){return}this._putUrl=dojo.attr(this._addTrigger,"href")+"&format=partial";dojo.connect(this._addTrigger,"onclick",dojo.hitch(this,function(evt){evt.preventDefault();this.add()}))}catch(e){application().log("dashboard",e,"error")}},add:function(){try{this._showProcess(true);dojo.xhr("get",{url:this._putUrl,load:dojo.hitch(this,"_refresh"),error:dojo.hitch(this,"_refresh"),handleAs:"text",sync:true})}catch(e){}},_showProcess:function(visible){try{if(null==this._processNode){this._processNode=dojo.create("img",{src:"/images/loading.gif",width:"32",height:"32"},this._addTrigger.parentNode,"last")}if(true==visible){dojo.removeClass(this._processNode,"elem-hidden")}else{dojo.addClass(this._processNode,"elem-hidden")}}catch(e){}return this},_refresh:function(response){if("Exception:not_logged"==response){try{new Popup_User_Login().setHref(application().buildUrl("/login")).setReferer(this._putUrl.replace(/&format=partial/,"")+"&referer="+escape(window.location)).open();dojo.subscribe("/popup/close",dojo.hitch(this,function(){this._showProcess(false)}))}catch(e){application().log("force login",e,"warn")}}else{this._container.innerHTML=response;this.build()}}})}if(!dojo._hasResource["local.Document.Send"]){dojo._hasResource["local.Document.Send"]=true;dojo.provide("local.Document.Send");dojo.declare("Document_Send",null,{_container:null,_partials:[],_context:{},_builded:false,constructor:function(){this._container=dojo.query(".send-contents")[0];if(null!=this._container){this._partials=dojo.query(".send-context",this._container);this._tabs=dojo.query(".send-options li",this._container)}},build:function(){if(true==this._builded){return}if(null==this._container||0==this._partials.length){throw"Invalid send context"}this._buildContext()._buildTabs();this._builded=true},_buildContext:function(){this._context={};dojo.forEach(this._partials,function(context){try{var reference=null;switch(context.id){case"send-social":reference=new Document_Send_Social();break;case"send-sms":reference=new Document_Send_Sms();break;case"send-email":reference=new Document_Send_Email();break;case"send-address-book":reference=new Document_Send_AddressBook();break;case"send-dashboard":reference=new Document_Send_Dashboard();break;default:break}if(null!=reference){reference.setContainer(context).build();this._context[context.id]=reference}}catch(e){application().log("send",e)}},this);return this},openTab:function(tab){if(dojo.isString(tab)){if(!/^send-([a-z]+-tab$)/.test(tab)){tab="send-"+tab+"-tab"}tab=dojo.byId(tab)}if(dojo.hasClass(tab,"active-tab")){return}try{this._tabs.removeClass("active-tab");dojo.addClass(tab,"active-tab");for(index in this._context){if(index+"-tab"==tab.id){this._context[index].show()}else{this._context[index].hide()}}}catch(e){console.log(e)}},_buildTabs:function(){var self=this;dojo.forEach(this._tabs,function(tab){dojo.connect(tab,"onclick",function(evt){evt.preventDefault();self.openTab(this)});if(!dojo.hasClass(tab,"active-tab")){try{this._context[tab.id.replace(/-tab$/,"")].hide()}catch(e){}}},this);return this}})}if(!dojo._hasResource["local.widget.GoogleMap.Direction.Dnd"]){dojo._hasResource["local.widget.GoogleMap.Direction.Dnd"]=true;dojo.provide("local.widget.GoogleMap.Direction.Dnd");dojo.declare("GoogleMap_Direction_Dnd",null,{_xpathQueries:{},_targetOptions:{},_container:null,_items:[],_mover:{},_widgets:{},_onStopCallback:null,_onMovedCallback:null,_positions:{start:null,stop:null},constructor:function(xpathQueries,targetOptions){this._xpathQueries=xpathQueries;this._targetOptions=targetOptions;var container=dojo.query(this._xpathQueries.container);if(null==container[0]){return}this._container=container[0];this._build()},_build:function(){var items=dojo.query(this._xpathQueries.item,this._container);if(items.length<=1){return}var _this=this;var _items=[];var _widgets={};dojo.forEach(items,function(item){var handle=dojo.query(_this._xpathQueries.handle,item);if(null==handle[0]){return}dojo.addClass(handle[0],"dnd-handle");_items.push(item);var widget=new dojo.dnd.Moveable(item,{handle:handle[0]});widget.Dnd=_this;_widgets[item.id]=widget;connect=dojo.connect(widget,"onFirstMove",function(mover,leftTop){this.Dnd._onFirstMove(mover,leftTop)});connect=dojo.connect(widget,"onMoved",function(mover,leftTop){this.Dnd._onMoved(mover,leftTop)});connect=dojo.connect(widget,"onMoveStop",function(mover,leftTop){this.Dnd._onStop()})})},_onFirstMove:function(mover,leftTop){this._positions={start:null,stop:null};this._positions.start=dojo.query(this._xpathQueries.item,this._container).indexOf(mover.node);if(null!=this._onFirstMoveCallback){this._onFirstMoveCallback(this)}},_onMoved:function(mover,leftTop){var _this=this;dojo.query(".dnd-target",this._container).forEach(function(target){_this._container.removeChild(target)});this._mover={widget:mover,leftTop:leftTop};dojo.addClass(this._mover.widget["node"],"mover");this._items=new Array();var drags=dojo.query(this._xpathQueries.item,this._container);var index=this._getTargetIndex(drags);var i=0;var _items=[];var _container=this._container;dojo.forEach(drags,function(drag){if(i==index){var target=dojo.doc.createElement(_this._targetOptions.type);dojo.attr(target,{"class":"dnd-target "+_this._targetOptions["class"],innerHTML:"&nbsp;"});dojo.style(target,"height",mover.node.offsetHeight+"px");_container.appendChild(target)}if(drag!=_this._mover.widget.node){_items.push(drag);_container.appendChild(drag)}i+=1});this._container=_container;this._items=_items;this._items.push(this._mover.widget.node);this._container.appendChild(this._mover.widget.node);if(null!=this._onMovedCallback){this._onMovedCallback(this)}},_onStop:function(){var _this=this;var drags=dojo.query(this._xpathQueries.item,this._container);var mover=dojo.query(".mover",this._container);if(null==mover[0]){return}if("undefined"==typeof dojo.query(".dnd-target",this._container)[0]){dojo.attr(mover[0],"style","");dojo.removeClass(mover[0],"mover");return}mover=mover[0];var _container=this._container;var index,i=0;dojo.forEach(drags,function(drag){if(true==dojo.hasClass(drag,"mover")){return}if(true==dojo.hasClass(drag,"dnd-target")){_container.appendChild(mover);_container.removeChild(drag);dojo.removeAttr(mover,"style");index=i}else{_container.appendChild(drag)}i+=1});this._container=_container;var newMover=dojo.query(".mover",this._container);if(null!=newMover[0]){dojo.removeClass(newMover[0],"mover")}this._positions.stop=index;if(null!=this._onStopCallback){this._onStopCallback(this)}},_getTargetIndex:function(widgets){var offsets=[];offsets.push(this._mover.leftTop["t"]);var _mover=this._mover;var _this=this;dojo.forEach(widgets,function(widget){if(widget!=_this._mover.widget.node){offsets.push(widget.offsetTop)}});var sort=function(offsets){var change=function(i,j){var tmp=offsets[i];offsets[i]=offsets[j];offsets[j]=tmp};var length=offsets.length;for(var i=0;i<length;++i){var iMin=i;for(var j=i+1;j<length;++j){if(parseInt(offsets[j])<parseInt(offsets[iMin])){iMin=j}}change(i,iMin)}return offsets};offsets=sort(offsets);var length=offsets.length;for(var index=0;index<length;index++){if(offsets[index]==this._mover.leftTop["t"]){break}}return index},addCallback:function(eventName,callback){if("onStopCallback"==eventName){this._onStopCallback=callback}else{if("onMovedCallback"==eventName){this._onMovedCallback=callback}}},getStartPosition:function(){return this._positions.start},getStopPosition:function(){return this._positions.stop},getDelta:function(){return(this._positions.stop-this._positions.start)},hasMoved:function(){if(this.getStartPosition()!=this.getStopPosition()){return true}return false},destroy:function(){this._xpathQueries={};this._targetOptions={};this._container=null;this._items=[];this._mover={};this._widgets={}}})}if(!dojo._hasResource["local.Document.Directory.Map.Direction"]){dojo._hasResource["local.Document.Directory.Map.Direction"]=true;dojo.provide("local.Document.Directory.Map.Direction");dojo.declare("Document_Directory_Map_Direction",null,{_document:null,_form:null,_steps:{start:null,stop:null},_currentStep:null,_referer:"",constructor:function(form,documentReference){if(dojo.isObject(form)&&null!=form){this._form=form}if(dojo.isObject(documentReference)&&null!=documentReference){this._document=documentReference}this._extractParams()},_extractParams:function(){var inputs=dojo.query("input.route-step",this.getForm());var address=this._document.getFullAddress(", ");if(2!=inputs.length||null==address){return}address+=", France";this._currentStep=address;this._currentStepShort=this._document.getZipAndLocation();this._steps.start=inputs[0];this._steps.stop=inputs[1];this._referer=this._document.getPermalink()},build:function(){if(null==this._form||null==this._document||null==this._currentStep){throw"Direction: invalid config"}dojo.connect(this.getForm(),"onsubmit",dojo.hitch(this,function(evt){evt.preventDefault();this._onSubmit()}));this._setStartPlace();this._buildSwitch()},_buildSwitch:function(){var switchItem=dojo.byId("route-switch");if(null!=switchItem){dojo.connect(switchItem,"onclick",dojo.hitch(this,"_switch"))}var dnd=new GoogleMap_Direction_Dnd({container:".direction-values",item:"p",handle:"label span"},{"class":"drag",type:"p"});var stopCallback=function(dnd){if(false==dnd.hasMoved()){return}var letters=["A","B"];var steps=dojo.query(".direction-values p");var index=0;dojo.forEach(steps,function(step){var handle=dojo.query("label span",step)[0];if(null!=handle){dojo.attr(handle,"innerHTML",letters[index])}var input=dojo.query("input",step)[0];if(null!=input&&0==index){var letter=(true==input.readOnly)?"A":"B";map.markers[0].setImage("/images/document-directory/googlemap/markers/on/"+letter+".png")}index+=1})};dnd.addCallback("onStopCallback",stopCallback)},_setStartPlace:function(){dojo.attr(this._steps.stop,"value",this._currentStep);var geoCoder=new GClientGeocoder();geoCoder.setBaseCountryCode(".fr");geoCoder.getLatLng(this._steps.stop.value,dojo.hitch(this,function(response){if(null!=response){return}dojo.attr(this._steps.stop,"value",this._currentStepShort)}))},_switch:function(){var steps=dojo.clone(this._steps);this._steps.start.value=steps.stop.value;this._steps.stop.value=steps.start.value;if(true==steps.stop.readOnly){dojo.removeAttr(this._steps.stop,"readonly");dojo.attr(this._steps.start,"readonly","readonly")}else{dojo.attr(this._steps.stop,"readonly","readonly");dojo.removeAttr(this._steps.start,"readonly")}var letter=(true==this._steps.start.readOnly)?"A":"B";map.markers[0].setImage("/images/document-directory/googlemap/markers/on/"+letter+".png")},_onSubmit:function(){var directionValue=dojo.trim(this.getValue());if(""==directionValue){return false}var geoCoder=new GClientGeocoder();geoCoder.setBaseCountryCode(".fr");var token=/, France$/;if(false==token.test(directionValue)){directionValue+=", France"}geoCoder.getLocations(directionValue,dojo.hitch(this,function(locations){if(200!=locations.Status.code){oldpopup().alert(application().getTranslator().translate("direction-no-result")).show()}else{if(locations.Placemark.length>1){try{oldpopup().setClass("popup popup-alert").setContent(this._getSuggestions(locations.Placemark),true).show()}catch(e){}}else{if(1==locations.Placemark.length){this.setValue(locations.Placemark[0].address);this._submitIframe()}}}}))},_submitIframe:function(){var url=dojo.attr(this.getForm(),"action")+"?route[]="+encodeURI(this.getFromValue())+"&route[]="+encodeURI(this.getToValue())+"&referer="+this._referer;window.parent.location.href=url},_getSuggestions:function(placemarks){var list=dojo.create("dl");dojo.addClass(list,"directions-suggestions alert-content");var dt=dojo.create("dt");dojo.attr(dt,"innerHTML",application().getTranslator().translate("direction-no-result-tip")+" : <br />");dojo.place(dt,list,"last");for(index in placemarks){var dd=dojo.create("dd");dojo.attr(dd,{innerHTML:"&gt; <span>"+placemarks[index].address+"</span>",title:application().getTranslator().translate("choose")+" "+placemarks[index].address});var _this=this;dojo.connect(dd,"onclick",function(){var value=dojo.query("span",this)[0].innerHTML;isSuggest=true;oldpopup().hide();_this.setValue(value+" (suggest)");_this._submitIframe()});dojo.place(dd,list,"last")}return list},setValue:function(value){if(false==this._steps.start.readOnly){this._steps.start.value=value}else{this._steps.stop.value=value}},getValue:function(){if(false==this._steps.start.readOnly){return this._steps.start.value}else{return this._steps.stop.value}},getFromValue:function(){return this.getValue()},getToValue:function(){if(true==this._steps.start.readOnly){return this._steps.start.value}else{return this._steps.stop.value}},getForm:function(){return this._form}})}if(!dojo._hasResource["local.Document.Directory.Map"]){dojo._hasResource["local.Document.Directory.Map"]=true;dojo.provide("local.Document.Directory.Map");dojo.declare("Document_Directory_Map",null,{_document:null,_container:null,_geocode:null,_gmap:null,constructor:function(container,documentReference){if(dojo.isObject(container)&&null!=container){this._container=container}if(dojo.isObject(documentReference)&&null!=documentReference){this._document=documentReference}this._extractParams()},getGeocode:function(){return this._geocode},_extractParams:function(){this._geocode=this._document.getGeocode()},build:function(){if(null==this._geocode){throw"Geocode value is required"}this._gmap=GoogleMapLocation.loadMapSingleMarker(this._container.id,this._geocode,0);this._gmap.map.checkResize();this._addDirectionWidget()},getObject:function(){return this._gmap},getGmap:function(){return this._gmap.map},_addDirectionWidget:function(){try{GoogleMapControl.location(this._gmap);new Document_Directory_Map_Direction(dojo.byId("form-direction"),this._document).build()}catch(e){}}})}if(!dojo._hasResource["local.widget.GoogleMap.Control"]){dojo._hasResource["local.widget.GoogleMap.Control"]=true;dojo.provide("local.widget.GoogleMap.Control");var options=null;GoogleMapControl={_map:{object:null,gmap:null},geocode:function(currentMap){GoogleMapControl._map.gmap=currentMap;GoogleMapControl._zoom()},location:function(currentMap){GoogleMapControl._defaults(currentMap);GoogleMapControl._types();GoogleMapControl._zoom();GoogleMapControl._routeAndNear()},locations:function(currentMap){GoogleMapControl._defaults(currentMap);GoogleMapControl._types();GoogleMapControl._directions();GoogleMapControl._zoom();GoogleMapControl._views()},directions:function(currentMap){GoogleMapControl._defaults(currentMap);GoogleMapControl._types();GoogleMapControl._directions();GoogleMapControl._zoom()},weather:function(currentMap){GoogleMapControl._defaults(currentMap);GoogleMapControl._types();GoogleMapControl._directions();GoogleMapControl._zoom()},_defaults:function(currentMap){if(null==currentMap){return}GoogleMapControl._map.object=currentMap;GoogleMapControl._map.gmap=currentMap.map;dojo.extend(GControl,{getDefaultPosition:function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(7,7))}})},_types:function(){dojo.extend(GControl,{initTypes:function(){var container=dojo.doc.createElement("div");dojo.attr(container,"class","map-types");var controls=new Array("map-control-type-normal","map-control-type-satellite","map-control-type-hybrid");dojo.forEach(controls,function(entry,index){var control=dojo.doc.createElement("div");dojo.attr(control,"class",entry);var mapZoomMax=17;var mapType=G_NORMAL_MAP;switch(entry){case"map-control-type-normal":control.appendChild(dojo.doc.createTextNode("plan"));break;case"map-control-type-satellite":mapZoomMax=20;mapType=G_SATELLITE_MAP;control.appendChild(dojo.doc.createTextNode("satellite"));break;case"map-control-type-hybrid":mapZoomMax=20;mapType=G_HYBRID_MAP;control.appendChild(dojo.doc.createTextNode("mixte"));break}GEvent.addDomListener(control,"click",function(){GoogleMap._zoomConstraints.max=mapZoomMax;GoogleMapControl._map.gmap.setMapType(mapType);var top=(GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]-(Math.round((GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]/GoogleMap._zoomConstraints.max*GoogleMapControl._map.gmap.getZoom()))));dojo.query(".map-control-zoomslider-handle").style("top",top+"px")});container.appendChild(control)});GoogleMapControl._map.gmap.getContainer().appendChild(container);return container}});var control=new GControl();control.initTypes()},_directions:function(){dojo.extend(GControl,{initDirections:function(){var container=dojo.doc.createElement("div");dojo.attr(container,"class","map-directions");var controls=new Array("map-control-north","map-control-west","map-control-east","map-control-south");dojo.forEach(controls,function(entry,index){var control=dojo.doc.createElement("div");dojo.attr(control,"class",entry);GEvent.addDomListener(control,"click",function(){switch(entry){case"map-control-north":GoogleMapControl._map.gmap.panDirection(0,1);break;case"map-control-west":GoogleMapControl._map.gmap.panDirection(1,0);break;case"map-control-east":GoogleMapControl._map.gmap.panDirection(-1,0);break;case"map-control-south":GoogleMapControl._map.gmap.panDirection(0,-1);break;default:break}});container.appendChild(control)});GoogleMapControl._map.gmap.getContainer().appendChild(container);return container}});var control=new GControl();control.initDirections()},_zoom:function(){dojo.extend(GControl,{initZoom:function(){var container=dojo.doc.createElement("div");dojo.attr(container,"class","map-zoom");var controls=new Array("map-control-zoomin","map-control-zoomslider","map-control-zoomout");dojo.forEach(controls,function(entry,index){var control=dojo.doc.createElement("div");dojo.attr(control,"class",entry);if(entry!="map-control-zoomslider"){GEvent.addDomListener(control,"click",function(){var currentZoom=GoogleMapControl._map.gmap.getZoom();switch(entry){case"map-control-zoomin":if(currentZoom<GoogleMap._zoomConstraints.max){GoogleMapControl._map.gmap.zoomIn()}break;case"map-control-zoomout":if(currentZoom>GoogleMap._zoomConstraints.min){GoogleMapControl._map.gmap.zoomOut()}break;default:break}})}else{var handle=dojo.doc.createElement("div");dojo.attr(handle,"class","map-control-zoomslider-handle");control.appendChild(handle);var currentZoom=GoogleMapControl._map.gmap.getZoom();currentZoom=(currentZoom)?currentZoom:8;GoogleMap._slider.object=new GDraggableObject(handle,{container:control,top:(GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]-(Math.round((GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]/GoogleMap._zoomConstraints.max*currentZoom))))});GEvent.addListener(GoogleMapControl._map.gmap,"zoomend",function(intOldZoom,intNewZoom){if(intNewZoom>GoogleMap._zoomConstraints.max){return}var top=(GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]-(Math.round((GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]/GoogleMap._zoomConstraints.max*intNewZoom))));dojo.query(".map-control-zoomslider-handle").style("top",top+"px")});GEvent.addDomListener(control,"click",function(source,event,handler){var zoomSliderTop=Utils.elementOffsetTop(control);var top=source.clientY-zoomSliderTop;var z=(Math.round((GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]-top)*GoogleMap._zoomConstraints.max/GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]));GoogleMapControl._map.gmap.setZoom(z)});GEvent.addListener(GoogleMap._slider.object,"dragend",function(){var z=(Math.round((GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]-this.top)*GoogleMap._zoomConstraints.max/GoogleMap._sliderHeights[GoogleMap._zoomConstraints.max]));GoogleMapControl._map.gmap.setZoom(z)})}container.appendChild(control)});GoogleMapControl._map.gmap.getContainer().appendChild(container);return container}});var control=new GControl();control.initZoom()},_views:function(){return;dojo.extend(GControl,{initViews:function(){var viewOptions=dojo.doc.createElement("a");viewOptions.setAttribute("id","view-options");viewOptions.setAttribute("title",application().getTranslator().toOctal("location-go-list-view"));viewOptions.setAttribute("href",application().buildUrl("?context="+paginator.context+"&page="+(paginator.pageNumber)+"&view=list","search"));GoogleMapControl._map.gmap.getContainer().appendChild(viewOptions)}});var control=new GControl();control.initViews()},_routeAndNear:function(){dojo.extend(GControl,{showRouteContextOptions:function(mode){var order=("route"==mode)?1:2;var items=dojo.query("#document-map .contents li");var display="block";if(("block"==dojo.style(items[order],"display"))){display="none"}dojo.style(items[0],"display",display);dojo.style(items[1],"display","none");dojo.style(items[2],"display","none");dojo.style(items[order],"display",display);dojo.style(dojo.query("#document-map .contents")[0],"display",display);return display},setRouteMarkerText:function(letter){if("0"!=letter){var inputs=dojo.query(".form-itineraire input[class=route-step]");letter=(true==inputs[0].readOnly)?"A":"B"}GoogleMapControl._map.object.markers[0].setImage("/images/document-directory/googlemap/markers/on/"+letter+".png")},openRoute:function(){var display=this.showRouteContextOptions("route");var letter=("block"==display)?"B":"0";this.setRouteMarkerText(letter)},initRouteAndNear:function(){var nav=dojo.doc.createElement("p");nav.setAttribute("id","marker-options");var subDomain=dojo.config.subDomain;if(""!=subDomain){subDomain+="."}dojo.xhrGet({url:application().buildUrl("/async/partial?name=directory-infowindow"),load:function(response,ioArgs){options=response},error:function(response,ioArgs){return},sync:true,handleAs:"text"});if(null!=options){var nav=dojo.doc.createElement("p");nav.setAttribute("id","marker-options");var route=dojo.doc.createElement("span");dojo.attr(route,{id:"marker-route",title:application().getTranslator().toOctal("direction"),innerHTML:application().getTranslator().toOctal("direction")});dojo.connect(route,"onclick",dojo.hitch(this,"openRoute"));nav.appendChild(route);var content=dojo.doc.createElement("div");dojo.attr(content,{id:"marker-context-options",innerHTML:options});GoogleMapControl._map.gmap.getContainer().appendChild(nav);GoogleMapControl._map.gmap.getContainer().appendChild(content);dojo.connect(dojo.query("span","marker-close-contents")[0],"onclick",function(){dojo.style(dojo.query("#document-map .contents")[0],"display","none");var items=dojo.query("#document-map .contents li");dojo.style(items[0],"display","none");dojo.style(items[1],"display","none");dojo.style(items[2],"display","none");setMarkerText("0")})}}});var control=new GControl();control.initRouteAndNear()},_popup:function(callback){dojo.extend(GControl,{inPopup:function(){var control=dojo.doc.createElement("p");dojo.attr(control,{"class":"map-control-popup",innerHTML:"--"});dojo.connect(control,"onclick",function(){callback()});GoogleMapControl._map.gmap.getContainer().appendChild(control)}});var control=new GControl();control.inPopup()}}}if(!dojo._hasResource["local.widget.GoogleMap.extinfowindow"]){dojo._hasResource["local.widget.GoogleMap.extinfowindow"]=true;dojo.provide("local.widget.GoogleMap.extinfowindow");function ExtInfoWindow(marker,windowId,html,opt_opts){this.html_=html;this.marker_=marker;this.infoWindowId_=windowId;this.options_=opt_opts==null?{}:opt_opts;this.ajaxUrl_=this.options_.ajaxUrl==null?null:this.options_.ajaxUrl;this.callback_=this.options_.ajaxCallback==null?null:this.options_.ajaxCallback;this.borderSize_=this.options_.beakOffset==null?0:this.options_.beakOffset;this.paddingX_=this.options_.paddingX==null?0+this.borderSize_:this.options_.paddingX+this.borderSize_;this.paddingY_=this.options_.paddingY==null?0+this.borderSize_:this.options_.paddingY+this.borderSize_;this.map_=null;this.container_=document.createElement("div");this.container_.style.position="relative";this.container_.style.display="none";this.contentDiv_=document.createElement("div");this.contentDiv_.id=this.infoWindowId_+"_contents";this.contentDiv_.innerHTML=this.html_;this.contentDiv_.style.display="block";this.contentDiv_.style.visibility="hidden";this.wrapperDiv_=document.createElement("div")}ExtInfoWindow.prototype=new GOverlay();ExtInfoWindow.prototype.initialize=function(map){this.map_=map;this.defaultStyles={containerWidth:this.map_.getSize().width/2,borderSize:1};this.wrapperParts={tl:{t:0,l:0,w:0,h:0,domElement:null},t:{t:0,l:0,w:0,h:0,domElement:null},tr:{t:0,l:0,w:0,h:0,domElement:null},l:{t:0,l:0,w:0,h:0,domElement:null},r:{t:0,l:0,w:0,h:0,domElement:null},bl:{t:0,l:0,w:0,h:0,domElement:null},b:{t:0,l:0,w:0,h:0,domElement:null},br:{t:0,l:0,w:0,h:0,domElement:null},beak:{t:0,l:0,w:0,h:0,domElement:null},close:{t:0,l:0,w:0,h:0,domElement:null}};for(var i in this.wrapperParts){var tempElement=document.createElement("div");tempElement.id=this.infoWindowId_+"_"+i;tempElement.style.visibility="hidden";document.body.appendChild(tempElement);tempElement=document.getElementById(this.infoWindowId_+"_"+i);var tempWrapperPart=eval("this.wrapperParts."+i);tempWrapperPart.w=parseInt(this.getStyle_(tempElement,"width"));tempWrapperPart.h=parseInt(this.getStyle_(tempElement,"height"));document.body.removeChild(tempElement)}for(var i in this.wrapperParts){if(i=="close"){this.wrapperDiv_.appendChild(this.contentDiv_)}var wrapperPartsDiv=null;if(this.wrapperParts[i].domElement==null){wrapperPartsDiv=document.createElement("div");this.wrapperDiv_.appendChild(wrapperPartsDiv)}else{wrapperPartsDiv=this.wrapperParts[i].domElement}wrapperPartsDiv.id=this.infoWindowId_+"_"+i;wrapperPartsDiv.style.position="absolute";wrapperPartsDiv.style.width=this.wrapperParts[i].w+"px";wrapperPartsDiv.style.height=this.wrapperParts[i].h+"px";wrapperPartsDiv.style.top=this.wrapperParts[i].t+"px";wrapperPartsDiv.style.left=this.wrapperParts[i].l+"px";this.wrapperParts[i].domElement=wrapperPartsDiv}this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_);this.container_.id=this.infoWindowId_;var containerWidth=this.getStyle_(document.getElementById(this.infoWindowId_),"width");this.container_.style.width=(containerWidth==null?this.defaultStyles.containerWidth:containerWidth);this.map_.getContainer().appendChild(this.contentDiv_);this.contentWidth=this.getDimensions_(this.container_).width;this.contentDiv_.style.width=this.contentWidth+"px";this.contentDiv_.style.position="absolute";this.container_.appendChild(this.wrapperDiv_);GEvent.bindDom(this.container_,"mousedown",this,this.onClick_);GEvent.bindDom(this.container_,"dblclick",this,this.onClick_);GEvent.bindDom(this.container_,"DOMMouseScroll",this,this.onClick_);GEvent.trigger(this.map_,"extinfowindowopen");if(this.ajaxUrl_!=null){this.ajaxRequest_(this.ajaxUrl_)}};ExtInfoWindow.prototype.onClick_=function(e){if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all){window.event.cancelBubble=true;window.event.returnValue=false}else{e.stopPropagation()}};ExtInfoWindow.prototype.remove=function(){if(this.map_.getExtInfoWindow()!=null){GEvent.trigger(this.map_,"extinfowindowbeforeclose");GEvent.clearInstanceListeners(this.container_);if(this.container_.outerHTML){this.container_.outerHTML=""}if(this.container_.parentNode){this.container_.parentNode.removeChild(this.container_)}this.container_=null;GEvent.trigger(this.map_,"extinfowindowclose");this.map_.setExtInfoWindow_(null)}};ExtInfoWindow.prototype.copy=function(){return new ExtInfoWindow(this.marker_,this.infoWindowId_,this.html_,this.options_)};ExtInfoWindow.prototype.redraw=function(force){if(!force||this.container_==null){return}var contentHeight=this.contentDiv_.offsetHeight;this.contentDiv_.style.height=contentHeight+"px";this.contentDiv_.style.left=this.wrapperParts.l.w+"px";this.contentDiv_.style.top=this.wrapperParts.tl.h+"px";this.contentDiv_.style.visibility="visible";this.wrapperParts.tl.t=0;this.wrapperParts.tl.l=0;this.wrapperParts.t.l=this.wrapperParts.tl.w;this.wrapperParts.t.w=(this.wrapperParts.l.w+this.contentWidth+this.wrapperParts.r.w)-this.wrapperParts.tl.w-this.wrapperParts.tr.w;this.wrapperParts.t.h=this.wrapperParts.tl.h;this.wrapperParts.tr.l=this.wrapperParts.t.w+this.wrapperParts.tl.w;this.wrapperParts.l.t=this.wrapperParts.tl.h;this.wrapperParts.l.h=contentHeight;this.wrapperParts.r.l=this.contentWidth+this.wrapperParts.l.w;this.wrapperParts.r.t=this.wrapperParts.tr.h;this.wrapperParts.r.h=contentHeight;this.wrapperParts.bl.t=contentHeight+this.wrapperParts.tl.h;this.wrapperParts.b.l=this.wrapperParts.bl.w;this.wrapperParts.b.t=contentHeight+this.wrapperParts.tl.h;this.wrapperParts.b.w=(this.wrapperParts.l.w+this.contentWidth+this.wrapperParts.r.w)-this.wrapperParts.bl.w-this.wrapperParts.br.w;this.wrapperParts.b.h=this.wrapperParts.bl.h;this.wrapperParts.br.l=this.wrapperParts.b.w+this.wrapperParts.bl.w;this.wrapperParts.br.t=contentHeight+this.wrapperParts.tr.h;this.wrapperParts.close.l=this.wrapperParts.tr.l+this.wrapperParts.tr.w-this.wrapperParts.close.w-this.borderSize_;this.wrapperParts.close.t=this.borderSize_;this.wrapperParts.beak.l=this.borderSize_+(this.contentWidth/2)-(this.wrapperParts.beak.w/2);this.wrapperParts.beak.t=this.wrapperParts.bl.t+this.wrapperParts.bl.h-this.borderSize_;for(var i in this.wrapperParts){if(i=="close"){this.wrapperDiv_.insertBefore(this.contentDiv_,this.wrapperParts[i].domElement)}var wrapperPartsDiv=null;if(this.wrapperParts[i].domElement==null){wrapperPartsDiv=document.createElement("div");this.wrapperDiv_.appendChild(wrapperPartsDiv)}else{wrapperPartsDiv=this.wrapperParts[i].domElement}wrapperPartsDiv.id=this.infoWindowId_+"_"+i;wrapperPartsDiv.style.position="absolute";wrapperPartsDiv.style.width=this.wrapperParts[i].w+"px";wrapperPartsDiv.style.height=this.wrapperParts[i].h+"px";wrapperPartsDiv.style.top=this.wrapperParts[i].t+"px";wrapperPartsDiv.style.left=this.wrapperParts[i].l+"px";this.wrapperParts[i].domElement=wrapperPartsDiv}var currentMarker=this.marker_;var thisMap=this.map_;GEvent.addDomListener(this.wrapperParts.close.domElement,"click",function(){thisMap.closeExtInfoWindow()});var pixelLocation=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());this.container_.style.position="absolute";var markerIcon=this.marker_.getIcon();this.container_.style.left=(pixelLocation.x-(this.contentWidth/2)-markerIcon.iconAnchor.x+markerIcon.infoWindowAnchor.x)+"px";this.container_.style.top=(pixelLocation.y-this.wrapperParts.bl.h-contentHeight-this.wrapperParts.tl.h-this.wrapperParts.beak.h-markerIcon.iconAnchor.y+markerIcon.infoWindowAnchor.y+this.borderSize_)+"px";this.container_.style.display="block";if(this.map_.getExtInfoWindow()!=null){this.repositionMap_()}};ExtInfoWindow.prototype.resize=function(){var tempElement=this.contentDiv_.cloneNode(true);tempElement.id=this.infoWindowId_+"_tempContents";tempElement.style.visibility="hidden";tempElement.style.height="auto";document.body.appendChild(tempElement);tempElement=document.getElementById(this.infoWindowId_+"_tempContents");var contentHeight=tempElement.offsetHeight;document.body.removeChild(tempElement);this.contentDiv_.style.height=contentHeight+"px";var contentWidth=this.contentDiv_.offsetWidth;var pixelLocation=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());var oldWindowHeight=this.wrapperParts.t.domElement.offsetHeight+this.wrapperParts.l.domElement.offsetHeight+this.wrapperParts.b.domElement.offsetHeight;var oldWindowPosTop=this.wrapperParts.t.domElement.offsetTop;this.wrapperParts.l.domElement.style.height=contentHeight+"px";this.wrapperParts.r.domElement.style.height=contentHeight+"px";var newPosTop=this.wrapperParts.b.domElement.offsetTop-contentHeight;this.wrapperParts.l.domElement.style.top=newPosTop+"px";this.wrapperParts.r.domElement.style.top=newPosTop+"px";this.contentDiv_.style.top=newPosTop+"px";windowTHeight=parseInt(this.wrapperParts.t.domElement.style.height);newPosTop-=windowTHeight;this.wrapperParts.close.domElement.style.top=newPosTop+this.borderSize_+"px";this.wrapperParts.tl.domElement.style.top=newPosTop+"px";this.wrapperParts.t.domElement.style.top=newPosTop+"px";this.wrapperParts.tr.domElement.style.top=newPosTop+"px";this.repositionMap_()};ExtInfoWindow.prototype.repositionMap_=function(){var mapNE=this.map_.fromLatLngToDivPixel(this.map_.getBounds().getNorthEast());var mapSW=this.map_.fromLatLngToDivPixel(this.map_.getBounds().getSouthWest());var markerPosition=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());var panX=0;var panY=0;var paddingX=this.paddingX_;var paddingY=this.paddingY_;var infoWindowAnchor=this.marker_.getIcon().infoWindowAnchor;var iconAnchor=this.marker_.getIcon().iconAnchor;var windowT=this.wrapperParts.t.domElement;var windowL=this.wrapperParts.l.domElement;var windowB=this.wrapperParts.b.domElement;var windowR=this.wrapperParts.r.domElement;var windowBeak=this.wrapperParts.beak.domElement;var offsetTop=markerPosition.y-(-infoWindowAnchor.y+iconAnchor.y+this.getDimensions_(windowBeak).height+this.getDimensions_(windowB).height+this.getDimensions_(windowL).height+this.getDimensions_(windowT).height+this.paddingY_);if(offsetTop<mapNE.y){panY=mapNE.y-offsetTop}else{var offsetBottom=markerPosition.y+this.paddingY_;if(offsetBottom>=mapSW.y){panY=-(offsetBottom-mapSW.y)}}var offsetRight=Math.round(markerPosition.x+this.getDimensions_(this.container_).width/2+this.getDimensions_(windowR).width+this.paddingX_+infoWindowAnchor.x-iconAnchor.x);if(offsetRight>mapNE.x){panX=-(offsetRight-mapNE.x)}else{var offsetLeft=-(Math.round((this.getDimensions_(this.container_).width/2-this.marker_.getIcon().iconSize.width/2)+this.getDimensions_(windowL).width+this.borderSize_+this.paddingX_)-markerPosition.x-infoWindowAnchor.x+iconAnchor.x);if(offsetLeft<mapSW.x){panX=mapSW.x-offsetLeft}}if(panX!=0||panY!=0&&this.map_.getExtInfoWindow()!=null){this.map_.panBy(new GSize(panX,panY))}};ExtInfoWindow.prototype.ajaxRequest_=function(url){var thisMap=this.map_;var thisCallback=this.callback_;GDownloadUrl(url,function(response,status){var infoWindow=document.getElementById(thisMap.getExtInfoWindow().infoWindowId_+"_contents");if(response==null||status==-1){infoWindow.innerHTML='<span class="error">ERROR: The Ajax request failed to get HTML content from "'+url+'"</span>'}else{infoWindow.innerHTML=response}if(thisCallback!=null){thisCallback()}thisMap.getExtInfoWindow().resize();GEvent.trigger(thisMap,"extinfowindowupdate")})};ExtInfoWindow.prototype.getDimensions_=function(element){var display=this.getStyle_(element,"display");if(display!="none"&&display!=null){return{width:element.offsetWidth,height:element.offsetHeight}}var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility="hidden";els.position="absolute";els.display="block";var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight}};ExtInfoWindow.prototype.getStyle_=function(element,style){var found=false;style=this.camelize_(style);var value=element.style[style];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null}else{if(element.currentStyle){value=element.currentStyle[style]}}}if((value=="auto")&&(style=="width"||style=="height")&&(this.getStyle_(element,"display")!="none")){if(style=="width"){value=element.offsetWidth}else{value=element.offsetHeight}}return(value=="auto")?null:value};ExtInfoWindow.prototype.camelize_=function(element){var parts=element.split("-"),len=parts.length;if(len==1){return parts[0]}var camelized=element.charAt(0)=="-"?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++){camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1)}return camelized};GMap.prototype.ExtInfoWindowInstance_=null;GMap.prototype.ClickListener_=null;GMap.prototype.InfoWindowListener_=null;GMarker.prototype.openExtInfoWindow=function(map,cssId,html,opt_opts){if(map==null){throw"Error in GMarker.openExtInfoWindow: map cannot be null";return false}if(cssId==null||cssId==""){throw"Error in GMarker.openExtInfoWindow: must specify a cssId";return false}map.closeInfoWindow();if(map.getExtInfoWindow()!=null){map.closeExtInfoWindow()}if(map.getExtInfoWindow()==null){map.setExtInfoWindow_(new ExtInfoWindow(this,cssId,html,opt_opts));if(map.ClickListener_==null){map.ClickListener_=GEvent.addListener(map,"click",function(event){if(!event&&map.getExtInfoWindow()!=null){map.closeExtInfoWindow()}})}if(map.InfoWindowListener_==null){map.InfoWindowListener_=GEvent.addListener(map,"infowindowopen",function(event){if(map.getExtInfoWindow()!=null){map.closeExtInfoWindow()}})}map.addOverlay(map.getExtInfoWindow())}};GMarker.prototype.closeExtInfoWindow=function(map){if(map.getExtInfWindow()!=null){map.closeExtInfoWindow()}};GMap2.prototype.getExtInfoWindow=function(){return this.ExtInfoWindowInstance_};GMap2.prototype.setExtInfoWindow_=function(extInfoWindow){this.ExtInfoWindowInstance_=extInfoWindow};GMap2.prototype.closeExtInfoWindow=function(){if(this.getExtInfoWindow()!=null){this.ExtInfoWindowInstance_.remove()}}}if(!dojo._hasResource["local.widget.GoogleMap"]){dojo._hasResource["local.widget.GoogleMap"]=true;dojo.provide("local.widget.GoogleMap");var options=null;var map=null;GoogleMap={_slider:{object:null},_sliderHeights:{"17":116,"20":112},_zoomConstraints:{max:17,min:2},imagesPath:"/images/",markerPath:"/images/",enableGEvents:true,headerHeight:80,footerHeight:27,init:function(mode,htmlContent){if((typeof GMap2=="undefined")||(!GBrowserIsCompatible())){return false}GUnload();GoogleMap._enableGEvents=true;var returnMap=null;switch(mode){case"map":returnMap=GoogleMapLocation.init(htmlContent);break;case"direction":returnMap=GoogleMapDirection.init(htmlContent);break;default:break}var googleLogo=dojo.query(".gmnoprint",htmlContent);if(null!=googleLogo[0]){dojo.attr(googleLogo[0],"style","");dojo.style(googleLogo[0],{"-moz-user-select":"none",position:"absolute",right:"4px",bottom:"20px",margin:"0"})}return returnMap},setMapType:function(myMap,type){if(type==G_SATELLITE_MAP){GoogleMap._zoomConstraints.max=20}else{GoogleMap._zoomConstraints.max=17}this.enableGEvents=false;myMap.map.setMapType(type);this.enableGEvents=true},extractLatLng:function(latLng){if(false==dojo.isString(latLng)||""==latLng){return null}return latLng.split(";")},loadingMode:function(display){return;var item=dojo.query("#loading");if(null!=item[0]){dojo.style(item[0],"display",display)}}}}if(!dojo._hasResource["local.widget.GoogleMap.Streetview"]){dojo._hasResource["local.widget.GoogleMap.Streetview"]=true;dojo.provide("local.widget.GoogleMap.Streetview");dojo.declare("GoogleMap_Streetview",null,{_container:null,_pano:null,_geocode:null,_pov:{yaw:0,pitch:5,zoom:0},_features:{treetView:true,userPhotos:false},constructor:function(container){this.setContainer(container)},setContainer:function(container){if(null==container||false==dojo.isObject(container)){return}this._container=container;return this},setGeocode:function(geocode){geocode=GoogleMap.extractLatLng(geocode);if(null==geocode){throw"GoogleMap_Streetview requires a valid geocode value"}this._geocode=new GLatLng(geocode[0],geocode[1]);return this},setPov:function(pov){if(null==pov){return this}this._pov=pov;return this},setFeatures:function(features){this._features=features;return this},load:function(){if(null==this._container){throw"GoogleMap_Streetview requires a valid container node"}if(null==this._geocode){throw"GoogleMap_Streetview requires a valid geocode value"}var options={latlng:this._geocode,pov:this._pov,features:this._features};this._pano=new GStreetviewPanorama(this._container,options);GEvent.addListener(this._pano,"error",dojo.hitch(this,function(errCode){var errorMessage=null;if(600==errCode){errorMessage='<p class="panorama-error">'+application().getTranslator().translate("streetview-no-panorama")+"</p>"}else{if(603==errCode){errorMessage='<a href="http://get.adobe.com/flashplayer/" title="Obtenir le player flash"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="adobe flash player" width="158" height="39" /></a>'}}if(null==errorMessage){return}dojo.attr(this._container,"innerHTML",errorMessage)}));GEvent.addListener(this._pano,"initialized",dojo.hitch(this,function(location){var error=dojo.query(".panorama-error",this._container);if(null!=error[0]){dojo.destroy(error[0])}}))},hasPanorama:function(callback){if(null==this._geocode){throw"GoogleMap_Streetview requires a valid geocode value"}var client=new GStreetviewClient();client.getNearestPanoramaLatLng(this._geocode,function(response){var hasPanorama=(null==response)?false:true;callback(hasPanorama)})},getPano:function(){return this._pano},destroy:function(){try{this._pano.remove()}catch(e){}}})}if(!dojo._hasResource["local.Document.Directory.StreetView"]){dojo._hasResource["local.Document.Directory.StreetView"]=true;dojo.provide("local.Document.Directory.StreetView");dojo.declare("Document_Directory_StreetView",null,{_document:null,_container:null,_geocode:null,_pov:null,_streetview:null,_xPathQueries:{},constructor:function(container,documentReference){if(dojo.isObject(container)&&null!=container){this._container=container}if(dojo.isObject(documentReference)&&null!=documentReference){this._document=documentReference}this._extractParams()},_extractParams:function(){this._geocode=this._document.getGeocode();if(null==this._geocode){return}try{var pov=this._document.getConfig("streetview").split(";");if(3==pov.length){this._pov={yaw:parseInt(pov[0]),pitch:parseInt(pov[1]),zoom:parseInt(pov[2])}}}catch(e){}},build:function(){try{this._getStreetview().setGeocode(this._geocode).setPov(this._pov).load()}catch(e){application().log("streetview",e)}},hasPanorama:function(callback){try{this._getStreetview().setGeocode(this._geocode).hasPanorama(callback)}catch(e){application().log("hasPanorama",e)}},getItem:function(){return this._container},_getStreetview:function(){if(null==this._streetview){this._streetview=new GoogleMap_Streetview(this.getItem())}return this._streetview}})}if(!dojo._hasResource["local.Document.Directory"]){dojo._hasResource["local.Document.Directory"]=true;dojo.provide("local.Document.Directory");dojo.declare("Document_Directory",null,{_containersSet:null,_document:null,_context:{},build:function(){this._buildContainerSet()._buildContext()._buildContainers()._buildSignupForm()._buildAuthLinks()},_buildContainerSet:function(){try{this._containersSet=new ContainerSet();dojo.query("dl.content-tab").forEach(function(item){try{var container=new Container_Wipe(item);container.setContentNode(dojo.query("dd.sub-content",item)[0]).connect(dojo.query("dt.sub-content-title",item)[0]);this._containersSet.add(container)}catch(e){}},this);this._containersSet.buildTabOfContent("#tab-of-content li")}catch(e){application().log("containers",e,"error")}return this},_buildContext:function(){try{this._document=new Document_Directory_Context(dojo.query(".resultset-li")[0]);this._document.build()}catch(e){application().log("context",e)}return this},_buildContainers:function(){this._context={};try{for(id in this._containersSet.getAll()){var container=this._containersSet.get(id);var reference=null;switch(id){case"content-directory-photo":reference=new Document_Directory_Gallery(dojo.byId("gallery"));break;case"content-directory-video":this._buildVideoContainer(container,id);reference=null;break;case"content-directory-hour":reference=new Document_Directory_BusinessHour(dojo.query("ul.business-hours")[0]);break;case"content-directory-pricelist":reference=new Document_Directory_PriceList(container.getNode());break;case"content-directory-reservation":application().log("TODO ","reservation","info");reference=new Document_Directory_Reservation(this._document);break;case"content-directory-map":this._buildMapContainer(container,id);reference=null;break;case"content-directory-contact":reference=new Document_Directory_Contact(dojo.byId("sendto_contact"));reference.setContainer(dojo.query(".formulaire-contact")[0]).subscribe("submited",dojo.hitch(reference,"_refresh"));break;case"content-directory-coupon":reference=new Document_Directory_Coupon(container.getNode());break;case"content-directory-send":reference=new Document_Send(container.getNode());break;default:break}if(null!=reference){this._context[id]=reference;if(0==this._containersSet.getIndex(id)||container.isOpen()){this._openContainer(id)}else{dojo.subscribe("/container/"+id+"/firstopen",dojo.hitch(this,"_openContainer"))}}}}catch(e){}return this},_openContainer:function(id){try{this._context[id].build();this._initCustomEvents(id)}catch(e){application().log("open container",e)}},_initCustomEvents:function(id){switch(id){case"content-directory-coupon":dojo.subscribe("document/coupon/send",dojo.hitch(this,function(id){var sendContext=this._context["content-directory-send"];if(null==sendContext){return}sendContext.build();if(false==this._containersSet.get("content-directory-send").isOpen()){this._containersSet.get("content-directory-send").open()}sendContext.openTab(id)}));break;default:break}},_closeContainer:function(id){try{this._context[id].destroy()}catch(e){application().log("close container",e)}},_buildMapContainer:function(container,id){if(false==application().isAppDomain()){return}try{var map=new Document_Directory_Map(dojo.byId("document-map"),this._document);if(null==map.getGeocode()){this._containersSet.destroy(id);return}this._context[id]=map;var openCallback=dojo.hitch(this,function(id){try{this._context[id].build();this._buildStreetviewContainer()}catch(e){this._containersSet.destroy(id)}});if(0==this._containersSet.getIndex(id)||container.isOpen()){openCallback(id)}else{dojo.subscribe("/container/"+id+"/firstopen",openCallback)}}catch(e){}},_buildStreetviewContainer:function(){if(false==application().isAppDomain()){return this}if("null"==this._document.getConfig("streetview")){return this}try{var streetview=new Document_Directory_StreetView(dojo.byId("streetview"),this._document);if(null==streetview){return this}streetview.hasPanorama(function(response){if(true==response){streetview.build();dojo.removeClass(streetview.getItem().parentNode,"hidden")}else{dojo.destroy(streetview.getItem().parentNode)}})}catch(e){}return this},_buildVideoContainer:function(container,id){try{var reference=new Player_Video();reference.setAutostart(false).setContainer(dojo.byId("directory-video")).setSize(615,324);if(null!=reference){this._context[id]=reference;if(0==this._containersSet.getIndex(id)||container.isOpen()){this._openContainer(id)}else{dojo.subscribe("/container/"+id+"/firstopen",dojo.hitch(this,"_openContainer"))}dojo.subscribe("/container/"+id+"/close",dojo.hitch(this,function(){this._context["content-directory-video"].stop()}))}}catch(e){}},_buildSignupForm:function(){try{new Form_User_Signup(dojo.query(".empty-document form#signup")[0]).build()}catch(e){}return this},_buildAuthLinks:function(){if(true==application().isAppDomain()){return this}setAuthLinks=function(response){if("undefined"==typeof response.links){return}var container=dojo.create("div");dojo.addClass(container,"hd-links-account");dojo.place(response.links,container,"last");dojo.place(container,dojo.byId("doc"),"first");layout().initHeaderNavigation(".hd-links-account a")};dojo.io.script.get({url:"http://"+application().getDomainName()+"/async/authentication-links",callbackParamName:"setAuthLinks",content:{referer:window.location,callback:"setAuthLinks"},sync:true});return this}})}if(!dojo._hasResource["local.ajaxify.document.directory"]){dojo._hasResource["local.ajaxify.document.directory"]=true;dojo.provide("local.ajaxify.document.directory");ajaxifyDocument=function(){try{new Document_Directory().build()}catch(e){application().log("directory ",e)}}}if(!dojo._hasResource["local.widget.AudioPlayer"]){dojo._hasResource["local.widget.AudioPlayer"]=true;dojo.provide("local.widget.AudioPlayer");var ap_instances=new Array();function ap_stopAll(playerID){for(var i=0;i<ap_instances.length;i++){try{if(ap_instances[i]!=playerID){document.getElementById("audioplayer"+ap_instances[i].toString()).SetVariable("closePlayer",1)}else{document.getElementById("audioplayer"+ap_instances[i].toString()).SetVariable("closePlayer",0)}}catch(errorObject){}}}function ap_registerPlayers(){var objectID;var objectTags=document.getElementsByTagName("object");for(var i=0;i<objectTags.length;i++){objectID=objectTags[i].id;if(objectID.indexOf("audioplayer")==0){ap_instances[i]=objectID.substring(11,objectID.length)}}}var ap_clearID=setInterval(ap_registerPlayers,100)}if(!dojo._hasResource["local.widget.GoogleMap.Location"]){dojo._hasResource["local.widget.GoogleMap.Location"]=true;dojo.provide("local.widget.GoogleMap.Location");GoogleMapLocation={markersCache:[],init:function(htmlContent){var gmap={map:new GMap2(dojo.byId(htmlContent)),_markersZindex:new Array(),_markerContext:null,init:function(){this.markers=new Array();GEvent.addListener(this.map,"extinfowindowbeforeclose",function(){map.resetMarkersIcons()})},clearOverlays:function(){this.map.closeExtInfoWindow();this.map.clearOverlays();this.markers=new Array();this._markersZindex=new Array();var item=dojo.byId("map-results-markers");if(null!=item){item.innerHTML=""}return this},addMarker:function(order,lat,lng,options){if(null==this._hitTemplate){async().getTemplate("resultset/map",dojo.hitch(this,function(response){this._hitTemplate=response}))}var count=this.markers.length+1;if(count==1){this.setCenter(lat,lng,15)}var typeIcon=(options.single)?"on":"off";var orderItem=(options.single)?options.order:order;var baseIcon=new GIcon();baseIcon.image=GoogleMap.markerPath+"googlemap/markers/"+typeIcon+"/"+orderItem+".png";baseIcon.iconSize=new GSize(39,40);baseIcon.iconAnchor=new GPoint(19,40);baseIcon.infoWindowAnchor=new GPoint(18,0);baseIcon.transparent="";baseIcon.shadowSize=new GSize(40,40);baseIcon.shadow=GoogleMap.markerPath+"googlemap/markers/marker-shadow.png";baseIcon.imageMap="";var markerOptions={icon:baseIcon,clickable:true};var marker=new GMarker(new GLatLng(lat,lng),markerOptions);var showMarkerWindow=function(){if(null!=map.map){if("undefined"==options.html||null==options.html){dojo.xhrGet({url:application().buildUrl("/async/partial?name=item-directory&params[id]="+options.id+"&params[order]="+options.order),load:function(response,ioArgs){options.html=response},error:function(response,ioArgs){options.html=application().getTranslator().translate("location-partial-error")},sync:true,handleAs:"text"})}map.map.closeExtInfoWindow();map.changeMarkerIcon(marker,true);selectorStyle.set("m-"+options.id);map.markerZindex("on",marker);marker.openExtInfoWindow(map.map,"window","<ul>"+options.html+"</ul>",{beakOffset:2});map.panTo(lat,lng);try{ajaxifyResultsetDocument((count-1))}catch(e){}}};if(!options.single){GEvent.addListener(marker,"click",function(){showMarkerWindow()})}this.map.addOverlay(marker);this.markerZindex("add",marker);var markersList=dojo.byId("map-results-markers");if(null!=markersList){var tpl=dojo.clone(this._hitTemplate);var distance=null;if(null!=this._markerContext){try{distance=(marker.getLatLng().distanceFrom(this._markerContext.getLatLng()))*0.001;distance=(Math.round(distance*100)/100)}catch(e){distance=null}}var values={order:orderItem,name:(options.title.length<=24)?options.title:options.title.substr(0,20)+"...",phonenumber:options.tel,permalink:options.permalink,distance:distance};tpl=dojo.replace(tpl,values);var li=dojo.create("li",{innerHTML:tpl,id:"m-"+options.id,"class":(count%2==0)?"marker odd":"marker peer"},markersList,"last");if(null==options.permalink){dojo.destroy(dojo.query(".location-info",li)[0])}if(null==distance){dojo.destroy(dojo.query(".location-distance",li)[0])}dojo.query(".location-name",li).onclick(function(){showMarkerWindow()})}this.markers.push(marker);return marker},getMarker:function(index){if("undefined"!=this.markers[index]){return this.markers[index]}return null},setCenter:function(lat,lng,zoom){this.map.setCenter(new GLatLng(lat,lng),zoom);return this},getZoom:function(){this.map.getZoom()},setZoom:function(zoom){this.map.setZoom(zoom)},panTo:function(lat,lng){this.map.panTo(new GLatLng(lat,lng))},initMarkers:function(datas,pageNumber,context){this.clearOverlays();if(null!=pageNumber&&"undefined"!=pageNumber){GoogleMapLocation.markersCache[pageNumber]=new Array()}this.setCenter(0,0,8);this.markerInit=new GMarker(new GLatLng(0,0));this.map.addOverlay(this.markerInit);this.markerInit.hide();this.initContext(context);var i=(1+pageNumber);dojo.forEach(datas,function(markerDatas){markerDatas=dojo.fromJson(markerDatas);options={id:"directory-"+markerDatas.id,order:i,single:false,html:null,title:markerDatas.title,tel:"",permalink:markerDatas.permalink,related:null};if("undefined"!=typeof markerDatas.number[0]){options.tel=markerDatas.number[0]["type"]+" : "+markerDatas.number[0]["number"]}var lat=(markerDatas.geocode[0])?markerDatas.geocode[0]:markerDatas.geocode["latitude"];options.lat=lat;var lng=(markerDatas.geocode[1])?markerDatas.geocode[1]:markerDatas.geocode["longitude"];options.lng=lng;marker=map.addMarker(options.order,lat,lng,options);if(null!=pageNumber&&"undefined"!=pageNumber){GoogleMapLocation.markersCache[pageNumber].push(options)}i+=1});this.map.removeOverlay(this.markerInit);this._getBoundsZoomLevel()},initContext:function(context){var latLng=GoogleMap.extractLatLng(context);if(null==latLng){return}var icon=new GIcon();icon.image=GoogleMap.markerPath+"googlemap/context.png";icon.iconSize=new GSize(27,26);icon.iconAnchor=new GPoint(14,16);icon.infoWindowAnchor=new GPoint(0,0);icon.transparent="";icon.shadowSize=new GSize(27,26);icon.shadow="";icon.imageMap="";this._markerContext=new GMarker(new GPoint(latLng[1],latLng[0]),{icon:icon,clickable:false});this.map.addOverlay(this._markerContext)},_getBoundsZoomLevel:function(){var bounds=new GLatLngBounds();dojo.forEach(this.markers,function(marker){bounds.extend(marker.getLatLng())});this.map.setCenter(bounds.getCenter(),this.map.getBoundsZoomLevel(bounds))},loadMarkersFromCache:function(markers){this.clearOverlays();dojo.forEach(markers,function(marker){map.addMarker(marker.order,marker.lat,marker.lng,marker)});this._getBoundsZoomLevel()},changeMarkerIcon:function(marker,active){var token=(!active)?/on/:/off/;var replace=(!active)?"off":"on";var icon=marker.getIcon().image.replace(token,replace);marker.setImage(icon)},resetMarkersIcons:function(){this.markerZindex("off");dojo.forEach(this.markers,function(marker){this.changeMarkerIcon(marker,false)},this)},markerZindex:function(state,marker){try{if("off"!=state&&"undefined"==typeof marker){return}if("on"==state){var node=dojo.byId(dojo.attr(marker.nD,"id"));if(null!=node){dojo.style(node,"zIndex","1")}}else{if("off"==state){dojo.forEach(this.markers,function(marker){var node=dojo.byId(dojo.attr(marker.nD,"id"));if(null!=node){dojo.style(node,"zIndex",parseFloat(map._markersZindex[node.id]))}})}else{if("add"==state){var node=marker.nD;if(null!=node){map._markersZindex[dojo.attr(node,"id")]=dojo.style(node,"zIndex")}}}}}catch(e){application().log("GoogleMapLocation.markerZindex",e)}}};var selectorStyle={reset:function(){var selectors=dojo.query("#map-results-markers li");dojo.forEach(selectors,function(selector){dojo.attr(selector,"class",selector.className.replace(/ active/,""))})},set:function(element){selectorStyle.reset();if(typeof element=="string"){element=dojo.byId(element)}var currentClass=element.className;dojo.attr(element,"class",currentClass+" active")}};gmap.init();return gmap},loadMapSingleMarker:function(mapContentId,latLng,order){latLng=GoogleMap.extractLatLng(latLng);if(null==latLng){return false}map=new GoogleMap.init("map",mapContentId);GoogleMap.markerPath="/images/document-directory/";if(map){map.addMarker(order,latLng[0],latLng[1],{single:true,order:order});map.setCenter(latLng[0],latLng[1],15);map.map.panBy(new GSize(42,45))}return map},loadMarkersFromJson:function(markers,mapContentId,pageNumber,context){Utils.setElementsFullHeight((GoogleMap.headerHeight+GoogleMap.footerHeight),["view-map","map-results"]);map=new GoogleMap.init("map",mapContentId);if(map){map.initMarkers(markers,pageNumber,context);GoogleMapControl.locations(map)}return map}}}}}});