if(typeof (AC)=="undefined"){AC={};}if(typeof (document.event)=="undefined"){document.event={};}if(Event.Publisher){Object.extend(document.event,Event.Publisher);}AC.SwapView=Class.create({_view:null,currentContent:null,delegate:null,initialize:function(P){if(typeof P==="string"){this._viewId=P;}else{this._view=$(P);}if(this._view){var d=this._view.childNodes,a;while(a=d[0]){this._view.removeChild(a);}this._view.addClassName("swapView");}},view:function(){if(!this._view){this._view=$(this._viewId);if(this._view){this._view.innerHTML="";this._view.addClassName("swapView");}}return this._view;},setDelegate:function(P){this.delegate=P;},setContent:function(P){if(P==this.currentContent){return ;}if(this.currentContent&&typeof (this.delegate.willClose)=="function"){this.delegate.willClose(this,this.currentContent);}if(P&&typeof (this.delegate.isContentLoaded)=="function"){if(!this.delegate.isContentLoaded(this,P)){if(typeof (this.delegate.loadContent)=="function"){this.delegate.loadContent(this,P);return ;}}}this.setLoadedContent(P);},setLoadedContent:function(a){if(typeof (this.delegate.willShow)=="function"){a=this.delegate.willShow(this,this.currentContent,a);}var P=true;if(typeof (this.delegate.shouldAnimateContentChange)=="function"){P=this.delegate.shouldAnimateContentChange(this,this.currentContent,a);}if(P&&typeof (this.delegate.willAnimate)=="function"){this.didAnimate=true;if(a&&this.currentContent!==a){this.view().appendChild(a);}var d=this.delegate.willAnimate(this,this.currentContent,a,this.didShow.bind(this,a));}else{this.didAnimate=false;if(this.currentContent!==a){if(this.currentContent&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent);}if(a){this.view().appendChild(a);}}if(a){$(a).setOpacity(1);}this.didShow(a);}},didShow:function(P){if(this.currentContent&&(this.currentContent!==P)&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent);}if(typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.currentContent,P);}this.currentContent=P;}});if(typeof (AC.ViewMaster)=="undefined"){AC.ViewMaster={};}AC.ViewMaster.Viewer=Class.create({view:null,triggerClassName:null,currentSection:null,requestedSection:null,sections:null,orderedSections:null,_locked:false,_didShowInitial:false,options:null,initialSectionFromId:function(P){return this.sectionWithId(P);},sectionWithId:function(W){if(!W){return null;}var d=null;if(W&&this.sections.get(W)){d=this.sections.get(W);}if(!d){var a,P=null;a=document.getElementById(W);if(a===this.view._view){a=null;}if(!a){P=document.getElementsByName(W);}if(P&&P.length>0){a=P[0];}if(a===this.view._view){a=null;}if(a){if(a.tagName.toLowerCase()==="a"){if(Element.Methods.hasClassName(a,this.triggerClassName)){d=this.addSection(a);}}else{d=this.addSection(a);}}}return d;},indexOfSection:function(P){return this.orderedSections.indexOf(P.id);},initialize:function(Q,P,H,a){this.triggerClassName=H;this.sections=$H();this.orderedSections=[];this.options=a||{};var X=null;if(Q){for(var W=0;W<Q.length;W++){section=this.addSection(Q.item(W));if(!X){X=section;}}}this.view=new AC.SwapView(P);this.view.setDelegate(this);var d=document.location.hash.replace(/#/,""),f;if(d!==this.view._viewId){f=this.sectionWithId(d);}if(f){X=f;}if(!X&&typeof this.options.initialId==="string"&&this.options.initialId.length>0){X=this.sectionWithId(this.options.initialId);}this.show(X);Event.observe(document,"click",this._triggerClicked.bindAsEventListener(this));if(AC.Detector.isIEStrict()){Event.observe(document,"mouseup",this._triggerClicked.bindAsEventListener(this));}if(typeof (this.listenForEvent)=="function"){this.selectSectionFromEventHandler=this.selectSectionFromEvent.bind(this);this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);if(this.options.parentSectionId){this.listenForEvent(AC.ViewMaster,"ViewMasterWillCloseNotification",false,function(n){var o=n.event_data.data;if(this===o.sender){return ;}if(o.outgoingView&&o.outgoingView.id===this.options.parentSectionId){this.willClose(this.view,this.currentSection);}});}}},selectSectionFromEvent:function(P){if(P.event_data.data.sender===this){return ;}if(P.event_data.data.parentTriggerClassName!==this.triggerClassName){return ;}this.selectSectionWithIdEvent(P.event_data.data.parentSectionId,P.event_data.data.event);},selectSectionWithIdEvent:function(Q,f){var P=this.sectionWithId(Q),W=null,a,d,H=false;if(P){W=P.triggers();if(W&&W.length>0){for(a=0;(d=W[a]);a++){if(Element.Methods.hasClassName(d,this.triggerClassName)){H=true;break;}}}if(!H){d=document.createElement("a");d.className=this.triggerClassName;d.href="#"+Q;d.style.display="none";document.body.appendChild(d);P._triggers.push(d);}this.triggerClicked(f,$(d));}},setDelegate:function(P){this.delegate=P;if(this.delegate&&typeof (this.delegate.didShow)==="function"&&this.currentSection&&this.currentSection.isContentLoaded()){this.delegate.didShow(this,this.previousSection,this.currentSection);}},addSection:function(P){var a=new AC.ViewMaster.Section(P,this);this.sections.set(a.id,a);this.orderedSections.push(a.id);return a;},triggerClicked:function(P,a){a.addClassName("active");if(P&&this.options.silentTriggers){Event.stop(P);}var W=null;if(!!a.href.match(/#previous/)){W=this.getPreviousSection();}else{if(!!a.href.match(/#next/)){W=this.getNextSection();}else{if(!this.sectionRegExp){this.sectionRegExp=this.options.sectionRegExp||new RegExp(/#(.*)$/);}var d=a.href.match(this.sectionRegExp);if(d){var f=d[1];}else{f=a.name;}W=this.sections.get(f);}}if(!W){W=this.addSection(a);}if(W.isContentRemote()){if(W.isContentLoaded()){W.clearTrigger(a);}if(P){Event.stop(P);}}if(W==this.currentSection){if(P){Event.stop(P);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterDidShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection});}return ;}else{if(!W){return ;}}this._didShowInitial=true;setTimeout(this.show.bind(this,W),1);},_triggerClicked:function(P){if(this._locked){Event.stop(P);return ;}var d=P.element();if(AC.Detector.isIEStrict()&&P.type==="mouseup"){if(d&&d.nodeName.toUpperCase()==="A"){d=d.down("."+this.triggerClassName);}}else{while(d&&d.nodeName.toUpperCase()!="A"&&d.nodeName.toUpperCase()!="BODY"){d=d.parentNode;}}if(d&&d.href&&Element.Methods.hasClassName(d,this.triggerClassName)){if(this.options.parentSectionId&&(typeof (this.stopListeningForEvent)=="function")&&(typeof (this.listenForEvent)=="function")&&(typeof (AC.ViewMaster.dispatchEvent)=="function")){var a=this;Event.stop(P);this.stopListeningForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);this.listenForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",false,function(W){this.stopListeningForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",false,arguments.callee);a.triggerClicked(W,d);this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);});AC.ViewMaster.dispatchEvent("ViewMasterSelectSectionWithIdNotification",{sender:this,parentSectionId:this.options.parentSectionId,parentTriggerClassName:this.options.parentTriggerClassName,event:P});}else{this.triggerClicked(P,d);}}},isContentLoaded:function(a,P){return P.isContentLoaded();},loadContent:function(a,P){if(P){P.loadContent();}},_showContentDidLoad:false,contentDidLoad:function(d,a,P){if(a&&a.firstChild){this._showContentDidLoad=true;}this.view.setLoadedContent(d);AC.loadRemoteContent.insertScriptFragment(a);if(this._showContentDidLoad&&this.delegate&&typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.previousSection,this.currentSection);}this._showContentDidLoad=false;},show:function(a,P){if(this._locked||(!a&&!P)){return ;}if(!this.options.alwaysShowSection&&a==this.currentSection){return ;}this._locked=true;this.previousSection=this.currentSection;this.currentSection=a;this.view.setContent(a);if(typeof this.options.ensureInView==="boolean"&&this.options.ensureInView){if(this._didShowInitial){var d=a.content.viewportOffset()[1];if(d<0||d>(document.viewport.getHeight()*0.75)){new Effect.ScrollTo(a.content,{duration:0.3});}}else{$(document.body).scrollTo();}}},showFirst:function(){this.show(this.getFirstSection());},getFirstSection:function(){return this.sections.get(this.orderedSections[0]);},showNext:function(){this.show(this.getNextSection());},getNextSection:function(){var a=this.orderedSections.indexOf(this.currentSection.id);var P=(this.orderedSections.length-1)==a?0:a+1;return this.sections.get(this.orderedSections[P]);},showPrevious:function(){this.show(this.getPreviousSection());},getPreviousSection:function(){var P=this.orderedSections.indexOf(this.currentSection.id);var a=0==P?this.orderedSections.length-1:P-1;return this.sections.get(this.orderedSections[a]);},willShow:function(a,d,P){if(this.delegate&&typeof (this.delegate.willShow)=="function"){this.delegate.willShow(this,this.previousSection,this.currentSection);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterWillShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection});}this._repaintTriggers(this.previousSection,this.currentSection);if(this._didShowInitial&&P&&P!=this.previousSection){$(P.content).setOpacity(0);$(P.content).removeClassName("hidden");}if(P){return P.willShow(this);}return null;},willClose:function(P,a){if(this.delegate&&typeof (this.delegate.willClose)=="function"){this.delegate.willClose(this,this.previousSection,this.currentSection);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterWillCloseNotification",{sender:this,outgoingView:a});}if(this.previousSection){this.previousSection.willClose(this);}},shouldAnimateContentChange:function(d,a,P){return (typeof this.options.shouldAnimateContentChange==="boolean")?this.options.shouldAnimateContentChange:true;},willAnimate:function(a,d,P,f){var Q=this.options.animationDuration||0.4;var W=Math.random()+"Queue";if(!this._didShowInitial&&typeof (f)=="function"){f();return ;}if(d){return new Effect.Parallel([new Effect.Opacity(d,{sync:true,from:1,to:0}),new Effect.Opacity(P,{sync:true,from:0,to:1})],{duration:Q,afterFinish:f,queue:{scope:W}});}else{return new Effect.Opacity(P,{from:0,to:1,duration:Q,afterFinish:f,queue:{scope:W}});}},didShow:function(a,d,P){if(this.currentSection){this.currentSection.didShow(this);}this._didShowInitial=true;this._locked=false;if(!this._showContentDidLoad&&this.delegate&&typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.previousSection,this.currentSection);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterDidShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection});}},_repaintTriggers:function(a,P){if(a){var Q=a.triggers();for(var d=0,W;(W=Q[d]);d++){W.removeClassName("active");}Q=a.relatedElements();for(var d=0,W;(W=Q[d]);d++){W.removeClassName("active");}}if(P){var f=P.triggers();for(var d=0,W;(W=f[d]);d++){W.addClassName("active");}f=P.relatedElements();for(var d=0,W;(W=f[d]);d++){W.addClassName("active");}}}});if(Event.Publisher){Object.extend(AC.ViewMaster,Event.Publisher);}if(Event.Listener){Object.extend(AC.ViewMaster.Viewer.prototype,Event.Listener);}AC.ViewMaster.Section=Class.create({content:null,moviePanel:null,controllerPanel:null,movie:null,_movieController:null,movieLink:null,endState:null,hasShown:false,_isContentRemote:false,isContentRemote:function(){return this._isContentRemote;},_isContentLoaded:true,isContentLoaded:function(){return this._isContentLoaded;},_onMoviePlayable:Prototype.EmptyFunction,_onMovieFinished:Prototype.EmptyFunction,id:null,triggers:function(){if(!this._triggers){this._triggers=[];var W=new RegExp("#"+this.id+"$");if(this.viewMaster.sectionRegExp||this.viewMaster.options.sectionRegExp){W=this.viewMaster.sectionRegExp||this.viewMaster.options.sectionRegExp;W=W.toString().replace(/^\//,"").replace(/\/$/,"");W=new RegExp(W.replace("(.*)",this.id));}var d=document.getElementsByClassName(this.viewMaster.triggerClassName);for(var P=0,a;(a=$(d[P]));P++){if(a.tagName.toLowerCase()!=="a"){continue;}if(a.href.match(W)){this._triggers.push(a);}}}return this._triggers;},relatedElements:function(){if(!this._relatedElements){this._relatedElements=document.getElementsByClassName(this.id);}return this._relatedElements;},initialize:function(d,H){this.content=$(d);if(this.content.tagName.toLowerCase()==="a"){var P=this.content.href;var f=P.split("#");this._contentURL=f[0];var W=window.location.href.split("#");var Q=d.className;if(f.length===2){this.id=f[1];}if(this._contentURL.length>0&&(this._contentURL!==W[0])&&(!this._contentURL.startsWith("#")||this._contentURL!==P)){this._isContentRemote=true;this._isContentLoaded=false;}else{var X=$(this.id)||$("MASKED-"+this.id);if(X){this.content=X;}}if(!this.id){this.id=this.content.name;}}else{this.id=d.id;}if(!this._isContentRemote||this._isContentLoaded){this.content.setAttribute("id","MASKED-"+this.id);}if(H){this.viewMaster=H;}if(!this._isContentRemote&&this._isContentLoaded&&!this.content.hasClassName("content")){var a=this.content.getElementsByClassName("content")[0];if(a){this.content=a;}}this.isMobile=AC.Detector.isMobile();},clearTrigger:function(P){if(P.href===("#"+this.id)){return ;}P.href="#"+this.id;P.removeAttribute("id");P.removeAttribute("name");},remoteContentDidLoad:function(P,a){this.clearTrigger(this.content);this.content=$(P);this.content.setAttribute("id","MASKED-"+this.id);this._isContentLoaded=true;this.viewMaster.contentDidLoad(this,a);},loadContent:function(){if(this._isContentLoaded){var a=this;a.viewMaster.contentDidLoad(a,null);}else{if(this.content.className.indexOf("imageLink")!==-1){var P=document.createElement("div");P.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(P);}else{if(this.content.className.indexOf("movieLink")!==-1){var P=document.createElement("div");P.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(P);}else{AC.loadRemoteContent(this._contentURL,true,true,this.remoteContentDidLoad.bind(this));}}}},willShow:function(){if(!this.hasShown){this.hasShown=true;var P=this.content.getElementsByClassName("imageLink");for(var a=0;a<P.length;a++){this._loadImage(P[a]);}if(!this.moviePanel){this.movieLink=this.content.getElementsByClassName("movieLink")[0];this.posterLink=this.content.getElementsByClassName("posterLink")[0];if(this.movieLink){this._loadMovie();}}}return this.content;},_loadImage:function(a){var P=document.createElement("img");P.setAttribute("src",a.href);P.setAttribute("alt",a.title);a.parentNode.replaceChild(P,a);},_loadMovie:function(){this.moviePanel=$(document.createElement("div"));this.moviePanel.addClassName("moviePanel");this.movieLink.parentNode.replaceChild(this.moviePanel,this.movieLink);this.controllerPanel=$(document.createElement("div"));this.controllerPanel.addClassName("controllerPanel");this.moviePanel.parentNode.insertBefore(this.controllerPanel,this.moviePanel.nextSibling);this.endState=$(this.content.getElementsByClassName("endState")[0]);if(this.endState){this.endState.parentNode.removeChild(this.endState);var P=$(this.endState.getElementsByClassName("replay")[0]);if(P){P.observe("click",function(a){Event.stop(a);this.replayMovie();}.bindAsEventListener(this));}}},didShow:function(a){var P=this.hasMovie()&&!this.isMobile;if(P){this._movieController=new AC.QuicktimeController();this.controllerPanel.innerHTML="";this.controllerPanel.appendChild(this._movieController.render());}this._playMovie();if(P){this._onMoviePlayable=this._movieController.monitorMovie.bind(this._movieController);this._onMovieFinished=this.didFinishMovie.bind(this);this._movieController.attachToMovie(this.movie,{onMoviePlayable:this._onMoviePlayable,onMovieFinished:this._onMovieFinished});}},willClose:function(P){this._closeController();this._closeMovie();},_closeMovie:function(){if(this.movie&&this.moviePanel){this.moviePanel.removeChild(this.movie);this.movie=null;this.moviePanel.innerHTML="";}},_closeController:function(){if(this._movieController&&this._movieController.movie&&this.hasMovie()&&!this.isMobile){this._movieController.Stop();this._movieController.detachFromMovie();this.controllerPanel.addClassName("inactive");this._movieController.replay=this.replayMovie.bind(this);this.controllerPanel.observe("click",this._movieController.replay);}},hasMovie:function(){return !!this.movieLink;},didFinishMovie:function(){if(!this.hasMovie()){return ;}this._closeController();this._closeMovie();if(this.endState){this.moviePanel.appendChild(this.endState);}if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didFinishMovie",this);}},_playMovie:function(){if(this.movieLink&&this.moviePanel){this.moviePanel.innerHTML="";if(this.posterLink&&this.posterLink.href){var a=this.posterLink.href;}var f=this.movieLink.getAttribute("href",2).toQueryParams();var W=f.width||640;var P=f.height||480;var d=f.bgcolor||"white";this.movie=AC.Quicktime.packageMovie(this.movieLink.id+"movieId",this.movieLink.getAttribute("href",2),{width:W,height:P,controller:false,posterFrame:a,showlogo:false,autostart:true,cache:true,bgcolor:d,aggressiveCleanup:false});this.moviePanel.appendChild(this.movie);if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didStart",this);}}},replayMovie:function(){if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("replayMovie",this);}this._playMovie();this.controllerPanel.removeClassName("inactive");this.controllerPanel.stopObserving("click",this._movieController.replay);this._movieController.replay=null;this._movieController.attachToMovie(this.movie,{onMoviePlayable:this._onMoviePlayable,onMovieFinished:this._onMovieFinished});}});AC.ViewMaster.SlideshowViewer=Class.create();Object.extend(AC.ViewMaster.SlideshowViewer.prototype,AC.ViewMaster.Viewer.prototype);Object.extend(AC.ViewMaster.SlideshowViewer.prototype,{_superInitialize:AC.ViewMaster.Viewer.prototype.initialize,initialize:function(W,P,f,d,a){this._superInitialize(W,P,f,a);this.slideshow=new AC.ViewMaster.Slideshow(this,d,a);},start:function(){this.slideshow.start();},stop:function(){this.slideshow.stop();},reset:function(){if(this._isLocked){this._needsReset=true;}else{this.slideshow.reset();}},superDidShow:AC.ViewMaster.Viewer.prototype.didShow,didShow:function(a,d,P){this.superDidShow(a,d,P);if(this._needsReset){this._needsReset=false;this.slideshow.reset();}},next:function(){this.slideshow.next();},previous:function(){this.slideshow.previous();}});AC.ViewMaster.Slideshow=Class.create();if(Event.Listener){Object.extend(AC.ViewMaster.Slideshow.prototype,Event.Listener);}if(Event.Publisher){Object.extend(AC.ViewMaster.Slideshow.prototype,Event.Publisher);}Object.extend(AC.ViewMaster.Slideshow.prototype,{contentController:null,animationTimeout:null,options:null,_playing:false,_active:false,_progress:0,setProgress:function(P){this._progress=P;},progress:function(){return this._progress;},initialize:function(P,d,a){this.contentController=P;this.triggerClassName=d;this.options=a||{};if(!a.addNoListeners){this.listenForEvent(AC.ViewMaster,"ViewMasterWillShowNotification",true,this.willShow);this.listenForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",true,this.didShow);}if(this.options.autoplay){this.start();}if(this.triggerClassName){Event.observe(document,"click",this._triggerHandler.bindAsEventListener(this));}},start:function(){if(this._active){return ;}this._active=true;if(this.options.wipeProgress=="always"||this.options.wipeProgress=="on start"){this._progress=0;}this.play(true);this._repaintTriggers();if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didStart",this);}},stop:function(){if(!this._active){return ;}this._active=false;this.pause();this._repaintTriggers();if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didEnd",this);}},play:function(P){if(!this._active){return ;}if(this.options.wipeProgress=="always"||(this.options.wipeProgress=="on play"&&!P)){this._progress=0;}this.animationTimeout=setTimeout(this._update.bind(this),this._heartbeatDelay());this._playing=true;},_update:function(){if(typeof (this.options.onProgress)=="function"){this.options.onProgress(this._progress,this.delay());}if(this._progress>=this.delay()){this._progress=0;this.next();}else{this._progress+=this._heartbeatDelay();this.animationTimeout=setTimeout(this._update.bind(this),this._heartbeatDelay());}},delay:function(){return this.options.delay||5000;},_heartbeatDelay:function(){return this.options.heartbeatDelay||100;},pause:function(){clearTimeout(this.animationTimeout);this._playing=false;},next:function(){if(this.options.willEnd&&(this.contentController.getNextSection()==this.contentController.getFirstSection())){if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didEnd",this);}return ;}this.contentController.showNext();},previous:function(){this.contentController.showPrevious();},reset:function(){this.contentController.showFirst();this.setProgress(0);},willShow:function(P){if(P.event_data.data.sender!=this.contentController){return ;}this.pause();},didShow:function(P){if(P.event_data.data.sender!=this.contentController){return ;}this.play();},_triggerHandler:function(P){var a=P.element();var d=null;if(a.hasClassName(this.triggerClassName)&&a.href.match(/#slideshow-toggle/)){Event.stop(P);if(this._active){this.stop();}else{this.start();}}},_repaintTriggers:function(){if(!this.triggerClassName){return ;}var a=document.getElementsByClassName(this.triggerClassName);for(var P=a.length-1;P>=0;P--){this._repaintTrigger(a[P]);}},_repaintTrigger:function(P){var a=$(P);if(this._active){a.addClassName("playing");}else{a.removeClassName("playing");}}});AC.loadRemoteContent=function(X,P,d,H,W,Q){if(typeof X!=="string"){return ;}if(typeof P!=="boolean"){P=true;}if(typeof d!=="boolean"){d=true;}var f=arguments.callee;var a=f._loadArgumentsByUrl[X];if(!a){f._loadArgumentsByUrl[X]={contentURL:X,importScripts:P,importCSS:d,callback:H,context:W,delegate:Q};new Ajax.Request(X,{method:"get",requestHeaders:{Accept:"text/xml"},onSuccess:arguments.callee.loadTemplateHTMLFromRequest,onFailure:arguments.callee.failedToadTemplateHTMLFromRequest,onException:function(n,o){throw (o);},onCreate:function(n){n.request.overrideMimeType("text/xml");}});}};AC.loadRemoteContent._loadArgumentsByUrl={};AC.loadRemoteContent.loadTemplateHTMLFromRequest=function(a){var W=a.request.url;var N=arguments.callee;var X=AC.loadRemoteContent._loadArgumentsByUrl[W];var j=window.document;var o=a.responseXMLValue().documentElement;if(AC.Detector.isIEStrict()){o=o.ownerDocument;}var j=window.document;var J=document.createDocumentFragment();if(X.importScripts){AC.loadRemoteContent.importScriptsFromXMLDocument(o,J,X);}if(X.importCSS){AC.loadRemoteContent.importCssFromXMLDocumentAtLocation(o,W,X);}var S=null;var P=null;var H=o.getElementsByTagName("body")[0];if(!H){return ;}H.normalize();var P=Element.Methods.childNodeWithNodeTypeAtIndex(H,Node.ELEMENT_NODE,0);var Q=AC.Detector.isSafari2();if(P){if(Q){S=j._importNode(P,true);}else{S=j.importNode(P,true);}if(S.cleanSpaces){S.cleanSpaces(true);}}else{if(H.cleanSpaces){H.cleanSpaces(true);}else{if(typeof H.normalize==="function"){H.normalize();}}var n=H.childNodes;S=j.createDocumentFragment();var l=/\S/;for(var f=0,d=0;(d=n[f]);f++){var Y=(Q)?j._importNode(d,true):j.importNode(d,true);S.appendChild(Y);}}var G=X.callback;G(S,J,X.context);};AC.loadRemoteContent.javascriptTypeValueRegExp=new RegExp("text/javascript","i");AC.loadRemoteContent.javascriptLanguageValueRegExp=new RegExp("javascript","i");AC.loadRemoteContent.documentScriptsBySrc=function(){if(!AC.loadRemoteContent._documentScriptsBySrc){AC.loadRemoteContent._documentScriptsBySrc={};var a=document.getElementsByTagName("script");if(!a||a.length===0){return AC.loadRemoteContent._documentScriptsBySrc;}for(var d=0,P=null;(P=a[d]);d++){var W=P.getAttribute("type");var Q=null;var H=P.getAttribute("language");if(!this.javascriptTypeValueRegExp.test(W)&&!this.javascriptLanguageValueRegExp.test(H)){continue;}if(P.hasAttribute){var f=P.hasAttribute("src");}else{var f=Element.Methods.hasAttribute(P,"src");}if(f){var Q=P.getAttribute("src");AC.loadRemoteContent._documentScriptsBySrc[Q]=Q;}}}return AC.loadRemoteContent._documentScriptsBySrc;};AC.loadRemoteContent.importScriptsFromXMLDocument=function(Y,d,I){var Q=Y.getElementsByTagName("script"),H,n,j,v,W=I.contentURL,V=I.delegate,f=I.context,a=(V&&typeof V.shouldImportScript==="function"),o=true;if(!d){d=document.createDocumentFragment();}var N=AC.loadRemoteContent.documentScriptsBySrc();for(var C=0,l=null;(l=Q[C]);C++){H=l.getAttribute("type");n=null;o=true;j=l.getAttribute("language");if(!this.javascriptTypeValueRegExp.test(H)&&!this.javascriptLanguageValueRegExp.test(j)){continue;}if(l.hasAttribute){v=l.hasAttribute("src");n=l.getAttribute("src");}else{n=l.getAttribute("src");v=((n!=null)&&(n!==""));}if(l.getAttribute("id")==="Redirect"||(a&&!V.shouldImportScriptForContentURL(l,W,f))){continue;}if(v){if(!N.hasOwnProperty(n)){var G=document.createElement("script");G.setAttribute("type","text/javascript");G.src=n;AC.loadRemoteContent._documentScriptsBySrc[n]=n;d.appendChild(G);}}else{var G=document.createElement("script");G.setAttribute("type","text/javascript");if(AC.Detector.isIEStrict()){var J=new Function(l.text);G.onreadystatechange=function(){var L=window.event.srcElement;if(!L.isLoaded&&((L.readyState=="complete")||(L.readyState=="loaded"))){L.onreadystatechange=null;L.isLoaded=true;J();}};}else{var S=navigator.userAgent.toLowerCase();var P=(S.indexOf("applewebkit")!=-1);var X=parseInt(parseFloat(S.substring(S.lastIndexOf("safari/")+7)));var y=(P&&X>=419);if(y){G.innerHTML=l.innerHTML;}else{G.text=l.text;}}AC.loadRemoteContent._documentScriptsBySrc[n]=n;d.appendChild(G);}}return d;};AC.loadRemoteContent.insertScriptFragment=function(a){if(!a){return ;}var P=document.getElementsByTagName("head")[0];P.appendChild(a);P=null;};AC.loadRemoteContent.documentLinksByHref=function(){if(!AC.loadRemoteContent._documentLinksByHref){AC.loadRemoteContent._documentLinksByHref={};var a=document.getElementsByTagName("link");if(!a||a.length===0){return AC.loadRemoteContent._documentLinksByHref;}for(var d=0,f=null;(f=a[d]);d++){var W=f.getAttribute("type");if(f.type.toLowerCase()!=="text/css"){continue;}var Q=null;if(f.hasAttribute){var P=f.hasAttribute("href");}else{var P=Element.hasAttribute(f,"href");}if(P){var Q=f.getAttribute("href");AC.loadRemoteContent._documentLinksByHref[Q]=Q;}}}return AC.loadRemoteContent._documentLinksByHref;};AC.loadRemoteContent.__importCssElementInHeadFromLocation=function(f,H,a){var W=(f.tagName.toUpperCase()==="LINK");if(W){var Q=f.getAttribute("type");if(!Q||Q&&Q.toLowerCase()!=="text/css"){return ;}var d=f.getAttribute("href");if(!d.startsWith("http")&&!d.startsWith("/")){var n=d;if(a.pathExtension().length>0){a=a.stringByDeletingLastPathComponent();}d=a.stringByAppendingPathComponent(n);}if(AC.Detector.isIEStrict()){var P=window.document.createStyleSheet(d,1);}else{var X=window.document.importNode(f,true);X.href=d;}AC.loadRemoteContent.documentLinksByHref()[d]=d;}if(!AC.Detector.isIEStrict()||(AC.Detector.isIEStrict()&&!W)){H.insertBefore(X,H.firstChild);}};AC.loadRemoteContent.importCssFromXMLDocumentAtLocation=function(X,a,H){var n=window.document.getElementsByTagName("head")[0];var d=[];d.addObjectsFromArray(X.getElementsByTagName("style"));d.addObjectsFromArray(X.getElementsByTagName("link"));if(d){var W=AC.loadRemoteContent.documentLinksByHref();for(var f=0,Q=null;(Q=d[f]);f++){var P=Q.getAttribute("href");if(W.hasOwnProperty(P)){continue;}this.__importCssElementInHeadFromLocation(Q,n,a);}}};Ajax.Request.prototype._overrideMimeType=null;Ajax.Request.prototype.overrideMimeType=function(P){this._overrideMimeType=P;if(this.transport.overrideMimeType){this.transport.overrideMimeType(P);}};Ajax.Request.prototype._doesOverrideXMLMimeType=function(){return (this._overrideMimeType==="text/xml");};Ajax.Response.prototype.responseXMLValue=function(){if(AC.Detector.isIEStrict()){var P=this.transport.responseXML.documentElement;if(!P&&this.request._doesOverrideXMLMimeType()){this.transport.responseXML.loadXML(this.transport.responseText);}}return this.transport.responseXML;};