Type.registerNamespace("PhotoSite.Framework");PhotoSite.Framework.FrameworkScriptManager=function(){if(window["$scriptManager"]){return;}this._templates=null;this.templateManager=null;PhotoSite.Framework.FrameworkScriptManager.initializeBase(this);};PhotoSite.Framework.FrameworkScriptManager.prototype={_loadedScripts:{},_loadingScripts:{},_loadedScriptIdHash:{},initialize:function(){PhotoSite.Framework.FrameworkScriptManager.callBaseMethod(this,"initialize");if(!window["$scriptManager"]){window["$scriptManager"]=this;this.templateManager=new PhotoSite.Framework.TemplateManager(this._templates);window["$templateManager"]=this.templateManager;}},dispose:function(){PhotoSite.Framework.FrameworkScriptManager.callBaseMethod(this,"dispose");if(window["$scriptManager"]==this){window["$scriptManager"]=null;}if(window["$templateManager"]==this.templateManager){window["$templateManager"]=null;}delete this.templateManager;delete this._templates;},get_templates:function(){return this._templates;},set_templates:function(A){this._templates=A;},get_scriptReferences:function(){return null;},set_scriptReferences:function(B){this._loadedScriptIdHash={};for(var C=0,A=B.length;C<A;C++){this._loadedScriptIdHash[B[C]]=B[C];}},_listenScriptLoad:function(A,C,B){A.onreadystatechange=A.onload=Function.createDelegate(this,function(){if(Sys.Browser.agent!=Sys.Browser.InternetExplorer||/loaded|complete/.test(A.readyState)){if(A._callbackCalled){return;}A._callbackCalled=true;this._loadedScripts[A.src]=true;this._loadedScriptIdHash[B]=B;delete this._loadingScripts[A.src];C();}});},_loadScript:function(A,D,B){A=unescape(A).replace(/&amp;/g,"&");if(this._loadedScripts[A]||(B&&this._loadedScriptIdHash[B])){if(D){D();}return;}if(this._loadingScripts[A]){setTimeout(Function.createDelegate(this,function(){this._loadScript(A,D,B);}),0);return;}this._loadingScripts[A]=true;var C=document.createElement("script");C.src=A;C.type="text/javascript";this._listenScriptLoad(C,D,B);document.getElementsByTagName("head")[0].appendChild(C);},_loadScripts:function(A,F,B,D){var E=-1;var C=Function.createDelegate(this,function(){if(++E<A.length){if(!D){this._loadScript(A[E],C);}else{this._loadScript(A[E].Path,C,A[E].Id);}}else{if(F){F(B);}}});C();},load:function(A,C,B){A=A instanceof Array?A:[A];if(A.length==0){C(B);}this._loadScripts(A,C,B,(A[0] instanceof Object));}};PhotoSite.Framework.FrameworkScriptManager.registerClass("PhotoSite.Framework.FrameworkScriptManager",Sys.Component);PhotoSite.Framework.TemplateManager=function(A){PhotoSite.Framework.TemplateManager.initializeBase(this);this._templates=A;};PhotoSite.Framework.TemplateManager.prototype={initialize:function(){PhotoSite.Framework.TemplateManager.callBaseMethod(this,"initialize");},dispose:function(){delete this._templates;PhotoSite.Framework.TemplateManager.callBaseMethod(this,"dispose");},getTemplate:function(A){if(!this._templates){return null;}return this._templates[A];}};PhotoSite.Framework.TemplateManager.registerClass("PhotoSite.Framework.TemplateManager",Sys.Component);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();