window.undefined=window.undefined;Ext={version:"3.1.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b);}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a];}}return d;};(function(){var h=0,t=Object.prototype.toString,u=navigator.userAgent.toLowerCase(),z=function(e){return e.test(u);},j=document,m=j.compatMode=="CSS1Compat",B=z(/opera/),i=z(/chrome/),v=z(/webkit/),y=!i&&z(/safari/),g=y&&z(/applewebkit\/4/),b=y&&z(/version\/3/),C=y&&z(/version\/4/),s=!B&&z(/msie/),q=s&&z(/msie 7/),p=s&&z(/msie 8/),r=s&&!q&&!p,o=!v&&z(/gecko/),d=o&&z(/rv:1\.8/),a=o&&z(/rv:1\.9/),w=s&&!m,A=z(/windows|win32/),l=z(/macintosh|mac os x/),k=z(/adobeair/),n=z(/linux/),c=/^https/i.test(window.location.protocol);if(r){try{j.execCommand("BackgroundImageCache",false,true);}catch(x){}}Ext.apply(Ext,{SSL_SECURE_URL:c&&s?'javascript:""':"about:blank",isStrict:m,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(D,E){if(D){for(var e in E){if(!Ext.isDefined(D[e])){D[e]=E[e];}}}return D;},id:function(e,D){return(e=Ext.getDom(e)||{}).id=e.id||(D||"ext-gen")+(++h);},extend:function(){var D=function(F){for(var E in F){this[E]=F[E];}};var e=Object.prototype.constructor;return function(K,H,J){if(Ext.isObject(H)){J=H;H=K;K=J.constructor!=e?J.constructor:function(){H.apply(this,arguments);};}var G=function(){},I,E=H.prototype;G.prototype=E;I=K.prototype=new G();I.constructor=K;K.superclass=E;if(E.constructor==e){E.constructor=H;}K.override=function(F){Ext.override(K,F);};I.superclass=I.supr=(function(){return E;});I.override=D;Ext.override(K,J);K.extend=function(F){return Ext.extend(K,F);};return K;};}(),override:function(e,E){if(E){var D=e.prototype;Ext.apply(D,E);if(Ext.isIE&&E.hasOwnProperty("toString")){D.toString=E.toString;}}},namespace:function(){var D,e;Ext.each(arguments,function(E){e=E.split(".");D=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(F){D=D[F]=D[F]||{};});});return D;},urlEncode:function(H,G){var E,D=[],F=encodeURIComponent;Ext.iterate(H,function(e,I){E=Ext.isEmpty(I);Ext.each(E?e:I,function(J){D.push("&",F(e),"=",(!Ext.isEmpty(J)&&(J!=e||!E))?(Ext.isDate(J)?Ext.encode(J).replace(/"/g,""):F(J)):"");});});if(!G){D.shift();G="";}return G+D.join("");},urlDecode:function(E,D){if(Ext.isEmpty(E)){return{};}var H={},G=E.split("&"),I=decodeURIComponent,e,F;Ext.each(G,function(J){J=J.split("=");e=I(J[0]);F=I(J[1]);H[e]=D||!H[e]?F:[].concat(H[e]).concat(F);});return H;},urlAppend:function(e,D){if(!Ext.isEmpty(D)){return e+(e.indexOf("?")===-1?"?":"&")+D;}return e;},toArray:function(){return s?function(E,H,F,G){G=[];for(var D=0,e=E.length;D<e;D++){G.push(E[D]);}return G.slice(H||0,F||G.length);}:function(e,E,D){return Array.prototype.slice.call(e,E||0,D||e.length);};}(),isIterable:function(e){if(Ext.isArray(e)||e.callee){return true;}if(/NodeList|HTMLCollection/.test(t.call(e))){return true;}return((typeof e.nextNode!="undefined"||e.item)&&Ext.isNumber(e.length));},each:function(G,F,E){if(Ext.isEmpty(G,true)){return;}if(!Ext.isIterable(G)||Ext.isPrimitive(G)){G=[G];}for(var D=0,e=G.length;D<e;D++){if(F.call(E||G[D],G[D],D,G)===false){return D;}}},iterate:function(E,D,e){if(Ext.isEmpty(E)){return;}if(Ext.isIterable(E)){Ext.each(E,D,e);return;}else{if(Ext.isObject(E)){for(var F in E){if(E.hasOwnProperty(F)){if(D.call(e||E,F,E[F],E)===false){return;}}}}}},getDom:function(e){if(!e||!j){return null;}return e.dom?e.dom:(Ext.isString(e)?j.getElementById(e):e);},getBody:function(){return Ext.get(j.body||j.documentElement);},removeNode:s&&!p?function(){var e;return function(D){if(D&&D.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(D,true):Ext.EventManager.removeAll(D);e=e||j.createElement("div");e.appendChild(D);e.innerHTML="";delete Ext.elCache[D.id];}};}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e,true):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.elCache[e.id];}},isEmpty:function(D,e){return D===null||D===undefined||((Ext.isArray(D)&&!D.length))||(!e?D==="":false);},isArray:function(e){return t.apply(e)==="[object Array]";},isDate:function(e){return t.apply(e)==="[object Date]";},isObject:function(e){return !!e&&Object.prototype.toString.call(e)==="[object Object]";},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e);},isFunction:function(e){return t.apply(e)==="[object Function]";},isNumber:function(e){return typeof e==="number"&&isFinite(e);},isString:function(e){return typeof e==="string";},isBoolean:function(e){return typeof e==="boolean";},isElement:function(e){return !!e&&e.tagName;},isDefined:function(e){return typeof e!=="undefined";},isOpera:B,isWebKit:v,isChrome:i,isSafari:y,isSafari3:b,isSafari4:C,isSafari2:g,isIE:s,isIE6:r,isIE7:q,isIE8:p,isGecko:o,isGecko2:d,isGecko3:a,isBorderBox:w,isLinux:n,isWindows:A,isMac:l,isAir:k});Ext.ns=Ext.namespace;})();Ext.ns("Ext.util","Ext.lib","Ext.data");Ext.elCache={};Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null;};},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a);};},createDelegate:function(c,b,a){var d=this;return function(){var g=b||arguments;if(a===true){g=Array.prototype.slice.call(arguments,0);g=g.concat(b);}else{if(Ext.isNumber(a)){g=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(g,e);}}return d.apply(c||window,g);};},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c);}d();return 0;}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d];});}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c<a;++c){if(this[c]===b){return c;}}return -1;},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1);}return this;}});Ext.util.TaskRunner=function(e){e=e||10;var g=[],a=[],b=0,h=false,d=function(){h=false;clearInterval(b);b=0;},i=function(){if(!h){h=true;b=setInterval(j,e);}},c=function(k){a.push(k);if(k.onStop){k.onStop.apply(k.scope||k);}},j=function(){var m=a.length,o=new Date().getTime();if(m>0){for(var q=0;q<m;q++){g.remove(a[q]);}a=[];if(g.length<1){d();return;}}for(var q=0,p,l,n,k=g.length;q<k;++q){p=g[q];l=o-p.taskRunTime;if(p.interval<=l){n=p.run.apply(p.scope||p,p.args||[++p.taskRunCount]);p.taskRunTime=o;if(n===false||p.taskRunCount===p.repeat){c(p);return;}}if(p.duration&&p.duration<=(o-p.taskStartTime)){c(p);}}};this.start=function(k){g.push(k);k.taskStartTime=new Date().getTime();k.taskRunTime=0;k.taskRunCount=0;i();return k;};this.stop=function(k){c(k);return k;};this.stopAll=function(){d();for(var l=0,k=g.length;l<k;l++){if(g[l].onStop){g[l].onStop();}}g=[];a=[];};};Ext.TaskMgr=new Ext.util.TaskRunner();Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[]);};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i);};e.cancel=function(){if(g){clearInterval(g);g=null;}};};(function(){var b;function c(d){if(!b){b=new Ext.Element.Flyweight();}b.dom=d;return b;}(function(){var h=document,e=h.compatMode=="CSS1Compat",g=Math.max,d=Math.round,i=parseInt;Ext.lib.Dom={isAncestor:function(k,l){var j=false;k=Ext.getDom(k);l=Ext.getDom(l);if(k&&l){if(k.contains){return k.contains(l);}else{if(k.compareDocumentPosition){return !!(k.compareDocumentPosition(l)&16);}else{while(l=l.parentNode){j=l==k||j;}}}}return j;},getViewWidth:function(j){return j?this.getDocumentWidth():this.getViewportWidth();},getViewHeight:function(j){return j?this.getDocumentHeight():this.getViewportHeight();},getDocumentHeight:function(){return g(!e?h.body.scrollHeight:h.documentElement.scrollHeight,this.getViewportHeight());},getDocumentWidth:function(){return g(!e?h.body.scrollWidth:h.documentElement.scrollWidth,this.getViewportWidth());},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?h.documentElement.clientHeight:h.body.clientHeight):self.innerHeight;},getViewportWidth:function(){return !Ext.isStrict&&!Ext.isOpera?h.body.clientWidth:Ext.isIE?h.documentElement.clientWidth:self.innerWidth;},getY:function(j){return this.getXY(j)[1];},getX:function(j){return this.getXY(j)[0];},getXY:function(l){var k,r,t,w,m,n,v=0,s=0,u,j,o=(h.body||h.documentElement),q=[0,0];l=Ext.getDom(l);if(l!=o){if(l.getBoundingClientRect){t=l.getBoundingClientRect();u=c(document).getScroll();q=[d(t.left+u.left),d(t.top+u.top)];}else{k=l;j=c(l).isStyle("position","absolute");while(k){r=c(k);v+=k.offsetLeft;s+=k.offsetTop;j=j||r.isStyle("position","absolute");if(Ext.isGecko){s+=w=i(r.getStyle("borderTopWidth"),10)||0;v+=m=i(r.getStyle("borderLeftWidth"),10)||0;if(k!=l&&!r.isStyle("overflow","visible")){v+=m;s+=w;}}k=k.offsetParent;}if(Ext.isSafari&&j){v-=o.offsetLeft;s-=o.offsetTop;}if(Ext.isGecko&&!j){n=c(o);v+=i(n.getStyle("borderLeftWidth"),10)||0;s+=i(n.getStyle("borderTopWidth"),10)||0;}k=l.parentNode;while(k&&k!=o){if(!Ext.isOpera||(k.tagName!="TR"&&!c(k).isStyle("display","inline"))){v-=k.scrollLeft;s-=k.scrollTop;}k=k.parentNode;}q=[v,s];}}return q;},setXY:function(k,l){(k=Ext.fly(k,"_setXY")).position();var m=k.translatePoints(l),j=k.dom.style,n;for(n in m){if(!isNaN(m[n])){j[n]=m[n]+"px";}}},setX:function(k,j){this.setXY(k,[j,false]);},setY:function(j,k){this.setXY(j,[false,k]);}};})();Ext.lib.Event=function(){var x=false,h={},B=0,q=[],d,D=false,l=window,H=document,m=200,t=20,C=0,s=0,j=1,n=2,u=2,y=3,v="scrollLeft",r="scrollTop",g="unload",A="mouseover",G="mouseout",e=function(){var I;if(l.addEventListener){I=function(M,K,L,J){if(K=="mouseenter"){L=L.createInterceptor(p);M.addEventListener(A,L,(J));}else{if(K=="mouseleave"){L=L.createInterceptor(p);M.addEventListener(G,L,(J));}else{M.addEventListener(K,L,(J));}}return L;};}else{if(l.attachEvent){I=function(M,K,L,J){M.attachEvent("on"+K,L);return L;};}else{I=function(){};}}return I;}(),i=function(){var I;if(l.removeEventListener){I=function(M,K,L,J){if(K=="mouseenter"){K=A;}else{if(K=="mouseleave"){K=G;}}M.removeEventListener(K,L,(J));};}else{if(l.detachEvent){I=function(L,J,K){L.detachEvent("on"+J,K);};}else{I=function(){};}}return I;}();function p(I){return !w(I.currentTarget,z.getRelatedTarget(I));}function w(I,J){if(I&&I.firstChild){while(J){if(J===I){return true;}J=J.parentNode;if(J&&(J.nodeType!=1)){J=null;}}}return false;}function E(){var K=false,O=[],M,L,I,J,N=!x||(B>0);if(!D){D=true;for(L=0,I=q.length;L<I;L++){J=q[L];if(J&&(M=H.getElementById(J.id))){if(!J.checkReady||x||M.nextSibling||(H&&H.body)){M=J.override?(J.override===true?J.obj:J.override):M;J.fn.call(M,J.obj);q.remove(J);}else{O.push(J);}}}B=(O.length===0)?0:B-1;if(N){o();}else{clearInterval(d);d=null;}K=!(D=false);}return K;}function o(){if(!d){var I=function(){E();};d=setInterval(I,t);}}function F(){var I=H.documentElement,J=H.body;if(I&&(I[r]||I[v])){return[I[v],I[r]];}else{if(J){return[J[v],J[r]];}else{return[0,0];}}}function k(I,J){I=I.browserEvent||I;var K=I["page"+J];if(!K&&K!==0){K=I["client"+J]||0;if(Ext.isIE){K+=F()[J=="X"?0:1];}}return K;}var z={extAdapter:true,onAvailable:function(K,I,L,J){q.push({id:K,fn:I,obj:L,override:J,checkReady:false});B=m;o();},addListener:function(K,I,J){K=Ext.getDom(K);if(K&&J){if(I==g){if(h[K.id]===undefined){h[K.id]=[];}h[K.id].push([I,J]);return J;}return e(K,I,J,false);}return false;},removeListener:function(O,K,N){O=Ext.getDom(O);var M,J,I,L;if(O&&N){if(K==g){if((L=h[O.id])!==undefined){for(M=0,J=L.length;M<J;M++){if((I=L[M])&&I[s]==K&&I[j]==N){h[id].splice(M,1);}}}return;}i(O,K,N,false);}},getTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.target||I.srcElement);},resolveTextNode:Ext.isGecko?function(J){if(!J){return;}var I=HTMLElement.prototype.toString.call(J);if(I=="[xpconnect wrapped native prototype]"||I=="[object XULElement]"){return;}return J.nodeType==3?J.parentNode:J;}:function(I){return I&&I.nodeType==3?I.parentNode:I;},getRelatedTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.relatedTarget||(I.type==G?I.toElement:I.type==A?I.fromElement:null));},getPageX:function(I){return k(I,"X");},getPageY:function(I){return k(I,"Y");},getXY:function(I){return[this.getPageX(I),this.getPageY(I)];},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I);},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation();}else{I.cancelBubble=true;}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault();}else{I.returnValue=false;}},getEvent:function(I){I=I||l.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break;}J=J.caller;}}return I;},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0;},getListeners:function(J,I){Ext.EventManager.getListeners(J,I);},purgeElement:function(J,K,I){Ext.EventManager.purgeElement(J,K,I);},_load:function(J){x=true;var I=Ext.lib.Event;if(Ext.isIE&&J!==true){i(l,"load",arguments.callee);}},_unload:function(P){var J=Ext.lib.Event,M,L,K,S,Q,I,O,N,T;for(I in h){Q=h[I];for(M=0,O=Q.length;M<O;M++){S=Q[M];if(S){try{T=S[y]?(S[y]===true?S[u]:S[y]):l;S[j].call(T,J.getEvent(P),S[u]);}catch(R){}}}}h=null;Ext.EventManager._unload();i(l,g,J._unload);}};z.on=z.addListener;z.un=z.removeListener;if(H&&H.body){z._load(true);}else{e(l,"load",z._load);}e(l,g,z._unload);E();return z;}();Ext.lib.Ajax=function(){var h=["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d="Content-Type";function i(t){var s=t.conn,u;function r(v,w){for(u in w){if(w.hasOwnProperty(u)){v.setRequestHeader(u,w[u]);}}}if(l.defaultHeaders){r(s,l.defaultHeaders);}if(l.headers){r(s,l.headers);delete l.headers;}}function e(u,t,s,r){return{tId:u,status:s?-1:0,statusText:s?"transaction aborted":"communication failure",isAbort:s,isTimeout:r,argument:t};}function k(r,s){(l.headers=l.headers||{})[r]=s;}function p(A,y){var u={},w,x=A.conn,r,v;try{w=A.conn.getAllResponseHeaders();Ext.each(w.replace(/\r\n/g,"\n").split("\n"),function(s){r=s.indexOf(":");if(r>=0){v=s.substr(0,r).toLowerCase();if(s.charAt(r+1)==" "){++r;}u[v]=s.substr(r+1);}});}catch(z){}return{tId:A.tId,status:x.status,statusText:x.statusText,getResponseHeader:function(s){return u[s.toLowerCase()];},getAllResponseHeaders:function(){return w;},responseText:x.responseText,responseXML:x.responseXML,argument:y};}function o(r){r.conn=null;r=null;}function g(w,x,s,r){if(!x){o(w);return;}var u,t;try{if(w.conn.status!==undefined&&w.conn.status!=0){u=w.conn.status;}else{u=13030;}}catch(v){u=13030;}if((u>=200&&u<300)||(Ext.isIE&&u==1223)){t=p(w,x.argument);if(x.success){if(!x.scope){x.success(t);}else{x.success.apply(x.scope,[t]);}}}else{switch(u){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:t=e(w.tId,x.argument,(s?s:false),r);if(x.failure){if(!x.scope){x.failure(t);}else{x.failure.apply(x.scope,[t]);}}break;default:t=p(w,x.argument);if(x.failure){if(!x.scope){x.failure(t);}else{x.failure.apply(x.scope,[t]);}}}}o(w);t=null;}function n(t,w){w=w||{};var r=t.conn,v=t.tId,s=l.poll,u=w.timeout||null;if(u){l.timeout[v]=setTimeout(function(){l.abort(t,w,true);},u);}s[v]=setInterval(function(){if(r&&r.readyState==4){clearInterval(s[v]);s[v]=null;if(u){clearTimeout(l.timeout[v]);l.timeout[v]=null;}g(t,w);}},l.pollInterval);}function j(v,s,u,r){var t=m()||null;if(t){t.conn.open(v,s,true);if(l.useDefaultXhrHeader){k("X-Requested-With",l.defaultXhrHeader);}if(r&&l.useDefaultHeader&&(!l.headers||!l.headers[d])){k(d,l.defaultPostHeader);}if(l.defaultHeaders||l.headers){i(t);}n(t,u);t.conn.send(r||null);}return t;}function m(){var s;try{if(s=q(l.transactionId)){l.transactionId++;}}catch(r){}finally{return s;}}function q(u){var r;try{r=new XMLHttpRequest();}catch(t){for(var s=0;s<h.length;++s){try{r=new ActiveXObject(h[s]);break;}catch(t){}}}finally{return{conn:r,tId:u};}}var l={request:function(r,t,u,v,z){if(z){var w=this,s=z.xmlData,x=z.jsonData,y;Ext.applyIf(w,z);if(s||x){y=w.headers;if(!y||!y[d]){k(d,s?"text/xml":"application/json");}v=s||(!Ext.isPrimitive(x)?Ext.encode(x):x);}}return j(r||z.method||"POST",t,u,v);},serializeForm:function(s){var t=s.elements||(document.forms[s]||Ext.getDom(s)).elements,z=false,y=encodeURIComponent,w,A,r,u,v="",x;Ext.each(t,function(B){r=B.name;x=B.type;if(!B.disabled&&r){if(/select-(one|multiple)/i.test(x)){Ext.each(B.options,function(C){if(C.selected){v+=String.format("{0}={1}&",y(r),y((C.hasAttribute?C.hasAttribute("value"):C.getAttribute("value")!==null)?C.value:C.text));}});}else{if(!/file|undefined|reset|button/i.test(x)){if(!(/radio|checkbox/i.test(x)&&!B.checked)&&!(x=="submit"&&z)){v+=y(r)+"="+y(B.value)+"&";z=/submit/i.test(x);}}}}});return v.substr(0,v.length-1);},useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",poll:{},timeout:{},pollInterval:50,transactionId:0,abort:function(u,w,r){var t=this,v=u.tId,s=false;if(t.isCallInProgress(u)){u.conn.abort();clearInterval(t.poll[v]);t.poll[v]=null;clearTimeout(l.timeout[v]);t.timeout[v]=null;g(u,w,(s=true),r);}return s;},isCallInProgress:function(r){return r.conn&&!{0:true,4:true}[r.conn.readyState];}};return l;}();(function(){var h=Ext.lib,j=/width|height|opacity|padding/i,g=/^((width|height)|(top|left))$/,d=/width|height|top$|bottom$|left$|right$/i,i=/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i,k=function(l){return typeof l!=="undefined";},e=function(){return new Date();};h.Anim={motion:function(o,m,p,q,l,n){return this.run(o,m,p,q,l,n,Ext.lib.Motion);},run:function(p,m,r,s,l,o,n){n=n||Ext.lib.AnimBase;if(typeof s=="string"){s=Ext.lib.Easing[s];}var q=new n(p,m,r,s);q.animateX(function(){if(Ext.isFunction(l)){l.call(o);}});return q;}};h.AnimBase=function(m,l,n,o){if(m){this.init(m,l,n,o);}};h.AnimBase.prototype={doMethod:function(l,o,m){var n=this;return n.method(n.curFrame,o,m-o,n.totalFrames);},setAttr:function(l,n,m){if(j.test(l)&&n<0){n=0;}Ext.fly(this.el,"_anim").setStyle(l,n+m);},getAttr:function(l){var n=Ext.fly(this.el),o=n.getStyle(l),m=g.exec(l)||[];if(o!=="auto"&&!i.test(o)){return parseFloat(o);}return(!!(m[2])||(n.getStyle("position")=="absolute"&&!!(m[3])))?n.dom["offset"+m[0].charAt(0).toUpperCase()+m[0].substr(1)]:0;},getDefaultUnit:function(l){return d.test(l)?"px":"";},animateX:function(o,l){var m=this,n=function(){m.onComplete.removeListener(n);if(Ext.isFunction(o)){o.call(l||m,m);}};m.onComplete.addListener(n,m);m.animate();},setRunAttr:function(q){var s=this,t=this.attributes[q],u=t.to,r=t.by,v=t.from,w=t.unit,m=(this.runAttrs[q]={}),n;if(!k(u)&&!k(r)){return false;}var l=k(v)?v:s.getAttr(q);if(k(u)){n=u;}else{if(k(r)){if(Ext.isArray(l)){n=[];for(var o=0,p=l.length;o<p;o++){n[o]=l[o]+r[o];}}else{n=l+r;}}}Ext.apply(m,{start:l,end:n,unit:k(w)?w:s.getDefaultUnit(q)});},init:function(m,q,p,l){var s=this,o=0,t=h.AnimMgr;Ext.apply(s,{isAnimated:false,startTime:null,el:Ext.getDom(m),attributes:q||{},duration:p||1,method:l||h.Easing.easeNone,useSec:true,curFrame:0,totalFrames:t.fps,runAttrs:{},animate:function(){var v=this,w=v.duration;if(v.isAnimated){return false;}v.curFrame=0;v.totalFrames=v.useSec?Math.ceil(t.fps*w):w;t.registerElement(v);},stop:function(v){var w=this;if(v){w.curFrame=w.totalFrames;w._onTween.fire();}t.stop(w);}});var u=function(){var w=this,v;w.onStart.fire();w.runAttrs={};for(v in this.attributes){this.setRunAttr(v);}w.isAnimated=true;w.startTime=e();o=0;};var r=function(){var w=this;w.onTween.fire({duration:e()-w.startTime,curFrame:w.curFrame});var x=w.runAttrs;for(var v in x){this.setAttr(v,w.doMethod(v,x[v].start,x[v].end),x[v].unit);}++o;};var n=function(){var v=this,x=(e()-v.startTime)/1000,w={duration:x,frames:o,fps:o/x};v.isAnimated=false;o=0;v.onComplete.fire(w);};s.onStart=new Ext.util.Event(s);s.onTween=new Ext.util.Event(s);s.onComplete=new Ext.util.Event(s);(s._onStart=new Ext.util.Event(s)).addListener(u);(s._onTween=new Ext.util.Event(s)).addListener(r);(s._onComplete=new Ext.util.Event(s)).addListener(n);}};Ext.lib.AnimMgr=new function(){var p=this,n=null,m=[],l=0;Ext.apply(p,{fps:1000,delay:1,registerElement:function(r){m.push(r);++l;r._onStart.fire();p.start();},unRegister:function(s,r){s._onComplete.fire();r=r||q(s);if(r!=-1){m.splice(r,1);}if(--l<=0){p.stop();}},start:function(){if(n===null){n=setInterval(p.run,p.delay);}},stop:function(t){if(!t){clearInterval(n);for(var s=0,r=m.length;s<r;++s){if(m[0].isAnimated){p.unRegister(m[0],0);}}m=[];n=null;l=0;}else{p.unRegister(t);}},run:function(){var u,t,r,s;for(t=0,r=m.length;t<r;t++){s=m[t];if(s&&s.isAnimated){u=s.totalFrames;if(s.curFrame<u||u===null){++s.curFrame;if(s.useSec){o(s);}s._onTween.fire();}else{p.stop(s);}}}}});var q=function(t){var s,r;for(s=0,r=m.length;s<r;s++){if(m[s]===t){return s;}}return -1;};var o=function(s){var w=s.totalFrames,v=s.curFrame,u=s.duration,t=(v*u*1000/w),r=(e()-s.startTime),x=0;if(r<u*1000){x=Math.round((r/t-1)*v);}else{x=w-(v+1);}if(x>0&&isFinite(x)){if(s.curFrame+x>=w){x=w-(v+1);}s.curFrame+=x;}};};h.Bezier=new function(){this.getPosition=function(q,p){var s=q.length,o=[],r=1-p,m,l;for(m=0;m<s;++m){o[m]=[q[m][0],q[m][1]];}for(l=1;l<s;++l){for(m=0;m<s-l;++m){o[m][0]=r*o[m][0]+p*o[parseInt(m+1,10)][0];o[m][1]=r*o[m][1]+p*o[parseInt(m+1,10)][1];}}return[o[0][0],o[0][1]];};};h.Easing={easeNone:function(m,l,o,n){return o*m/n+l;},easeIn:function(m,l,o,n){return o*(m/=n)*m+l;},easeOut:function(m,l,o,n){return -o*(m/=n)*(m-2)+l;}};(function(){h.Motion=function(q,p,r,s){if(q){h.Motion.superclass.constructor.call(this,q,p,r,s);}};Ext.extend(h.Motion,Ext.lib.AnimBase);var o=h.Motion.superclass,n=h.Motion.prototype,m=/^points$/i;Ext.apply(h.Motion.prototype,{setAttr:function(p,t,s){var r=this,q=o.setAttr;if(m.test(p)){s=s||"px";q.call(r,"left",t[0],s);q.call(r,"top",t[1],s);}else{q.call(r,p,t,s);}},getAttr:function(p){var r=this,q=o.getAttr;return m.test(p)?[q.call(r,"left"),q.call(r,"top")]:q.call(r,p);},doMethod:function(p,s,q){var r=this;return m.test(p)?h.Bezier.getPosition(r.runAttrs[p],r.method(r.curFrame,0,100,r.totalFrames)/100):o.doMethod.call(r,p,s,q);},setRunAttr:function(w){if(m.test(w)){var y=this,r=this.el,B=this.attributes.points,u=B.control||[],z=B.from,A=B.to,x=B.by,C=h.Dom,q,t,s,v,p;if(u.length>0&&!Ext.isArray(u[0])){u=[u];}else{}Ext.fly(r,"_anim").position();C.setXY(r,k(z)?z:C.getXY(r));q=y.getAttr("points");if(k(A)){s=l.call(y,A,q);for(t=0,v=u.length;t<v;++t){u[t]=l.call(y,u[t],q);}}else{if(k(x)){s=[q[0]+x[0],q[1]+x[1]];for(t=0,v=u.length;t<v;++t){u[t]=[q[0]+u[t][0],q[1]+u[t][1]];}}}p=this.runAttrs[w]=[q];if(u.length>0){p=p.concat(u);}p[p.length]=s;}else{o.setRunAttr.call(this,w);}}});var l=function(p,r){var q=h.Dom.getXY(this.el);return[p[0]-q[0]+r[0],p[1]-q[1]+r[1]];};})();})();(function(){var d=Math.abs,j=Math.PI,i=Math.asin,h=Math.pow,e=Math.sin,g=Ext.lib;Ext.apply(g.Easing,{easeBoth:function(l,k,n,m){return((l/=m/2)<1)?n/2*l*l+k:-n/2*((--l)*(l-2)-1)+k;},easeInStrong:function(l,k,n,m){return n*(l/=m)*l*l*l+k;},easeOutStrong:function(l,k,n,m){return -n*((l=l/m-1)*l*l*l-1)+k;},easeBothStrong:function(l,k,n,m){return((l/=m/2)<1)?n/2*l*l*l*l+k:-n/2*((l-=2)*l*l*l-2)+k;},elasticIn:function(m,k,r,q,l,o){if(m==0||(m/=q)==1){return m==0?k:k+r;}o=o||(q*0.3);var n;if(l>=d(r)){n=o/(2*j)*i(r/l);}else{l=r;n=o/4;}return -(l*h(2,10*(m-=1))*e((m*q-n)*(2*j)/o))+k;},elasticOut:function(m,k,r,q,l,o){if(m==0||(m/=q)==1){return m==0?k:k+r;}o=o||(q*0.3);var n;if(l>=d(r)){n=o/(2*j)*i(r/l);}else{l=r;n=o/4;}return l*h(2,-10*m)*e((m*q-n)*(2*j)/o)+r+k;},elasticBoth:function(m,k,r,q,l,o){if(m==0||(m/=q/2)==2){return m==0?k:k+r;}o=o||(q*(0.3*1.5));var n;if(l>=d(r)){n=o/(2*j)*i(r/l);}else{l=r;n=o/4;}return m<1?-0.5*(l*h(2,10*(m-=1))*e((m*q-n)*(2*j)/o))+k:l*h(2,-10*(m-=1))*e((m*q-n)*(2*j)/o)*0.5+r+k;},backIn:function(l,k,o,n,m){m=m||1.70158;return o*(l/=n)*l*((m+1)*l-m)+k;},backOut:function(l,k,o,n,m){if(!m){m=1.70158;}return o*((l=l/n-1)*l*((m+1)*l+m)+1)+k;},backBoth:function(l,k,o,n,m){m=m||1.70158;return((l/=n/2)<1)?o/2*(l*l*(((m*=(1.525))+1)*l-m))+k:o/2*((l-=2)*l*(((m*=(1.525))+1)*l+m)+2)+k;},bounceIn:function(l,k,n,m){return n-g.Easing.bounceOut(m-l,0,n,m)+k;},bounceOut:function(l,k,n,m){if((l/=m)<(1/2.75)){return n*(7.5625*l*l)+k;}else{if(l<(2/2.75)){return n*(7.5625*(l-=(1.5/2.75))*l+0.75)+k;}else{if(l<(2.5/2.75)){return n*(7.5625*(l-=(2.25/2.75))*l+0.9375)+k;}}}return n*(7.5625*(l-=(2.625/2.75))*l+0.984375)+k;},bounceBoth:function(l,k,n,m){return(l<m/2)?g.Easing.bounceIn(l*2,0,n,m)*0.5+k:g.Easing.bounceOut(l*2-m,0,n,m)*0.5+n*0.5+k;}});})();(function(){var i=Ext.lib;i.Anim.color=function(q,o,r,s,n,p){return i.Anim.run(q,o,r,s,n,p,i.ColorAnim);};i.ColorAnim=function(o,n,p,q){i.ColorAnim.superclass.constructor.call(this,o,n,p,q);};Ext.extend(i.ColorAnim,i.AnimBase);var k=i.ColorAnim.superclass,j=/color$/i,g=/^transparent|rgba\(0, 0, 0, 0\)$/,m=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,d=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,e=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,h=function(n){return typeof n!=="undefined";};function l(o){var q=parseInt,p,n=null,r;if(o.length==3){return o;}Ext.each([d,m,e],function(t,s){p=(s%2==0)?16:10;r=t.exec(o);if(r&&r.length==4){n=[q(r[1],p),q(r[2],p),q(r[3],p)];return false;}});return n;}Ext.apply(i.ColorAnim.prototype,{getAttr:function(n){var p=this,o=p.el,q;if(j.test(n)){while(o&&g.test(q=Ext.fly(o).getStyle(n))){o=o.parentNode;q="fff";}}else{q=k.getAttr.call(p,n);}return q;},doMethod:function(t,n,p){var u=this,o,r=Math.floor,q,s,w;if(j.test(t)){o=[];for(q=0,s=n.length;q<s;q++){w=n[q];o[q]=k.doMethod.call(u,t,w,p[q]);}o="rgb("+r(o[0])+","+r(o[1])+","+r(o[2])+")";}else{o=k.doMethod.call(u,t,n,p);}return o;},setRunAttr:function(s){var u=this,v=u.attributes[s],w=v.to,t=v.by,o;k.setRunAttr.call(u,s);o=u.runAttrs[s];if(j.test(s)){var n=l(o.start),p=l(o.end);if(!h(w)&&h(t)){p=l(t);for(var q=0,r=n.length;q<r;q++){p[q]=n[q]+p[q];}}o.start=n;o.end=p;}}});})();(function(){var d=Ext.lib;d.Anim.scroll=function(k,i,l,m,h,j){return d.Anim.run(k,i,l,m,h,j,d.Scroll);};d.Scroll=function(i,h,j,k){if(i){d.Scroll.superclass.constructor.call(this,i,h,j,k);}};Ext.extend(d.Scroll,d.ColorAnim);var g=d.Scroll.superclass,e="scroll";Ext.apply(d.Scroll.prototype,{doMethod:function(h,n,i){var l,k=this,m=k.curFrame,j=k.totalFrames;if(h==e){l=[k.method(m,n[0],i[0]-n[0],j),k.method(m,n[1],i[1]-n[1],j)];}else{l=g.doMethod.call(k,h,n,i);}return l;},getAttr:function(h){var i=this;if(h==e){return[i.el.scrollLeft,i.el.scrollTop];}else{return g.getAttr.call(i,h);}},setAttr:function(h,k,j){var i=this;if(h==e){i.el.scrollLeft=k[0];i.el.scrollTop=k[1];}else{g.setAttr.call(i,h,k,j);}}});})();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a);}window.attachEvent("onunload",a);}})();(function(){var i=Ext.util,l=Ext.toArray,k=Ext.each,a=Ext.isObject,h=true,j=false;i.Observable=function(){var m=this,n=m.events;if(m.listeners){m.on(m.listeners);delete m.listeners;}m.events=n||{};};i.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var m=l(arguments),o=m[0].toLowerCase(),p=this,n=h,s=p.events[o],r,t;if(p.eventsSuspended===h){if(r=p.eventQueue){r.push(m);}}else{if(a(s)&&s.bubble){if(s.fire.apply(s,m.slice(1))===j){return j;}t=p.getBubbleTarget&&p.getBubbleTarget();if(t&&t.enableBubble){if(!t.events[o]||!Ext.isObject(t.events[o])||!t.events[o].bubble){t.enableBubble(o);}return t.fireEvent.apply(t,m);}}else{if(a(s)){m.shift();n=s.fire.apply(s,m);}}}return n;},addListener:function(p,s,u,n){var r=this,q,v,t,m;if(a(p)){n=p;for(q in n){v=n[q];if(!r.filterOptRe.test(q)){r.addListener(q,v.fn||v,v.scope||n.scope,v.fn?v:n);}}}else{p=p.toLowerCase();m=r.events[p]||h;if(Ext.isBoolean(m)){r.events[p]=m=new i.Event(r,p);}m.addListener(s,u,a(n)?n:{});}},removeListener:function(m,o,n){var p=this.events[m.toLowerCase()];if(a(p)){p.removeListener(o,n);}},purgeListeners:function(){var o=this.events,m,n;for(n in o){m=o[n];if(a(m)){m.clearListeners();}}},addEvents:function(q){var p=this;p.events=p.events||{};if(Ext.isString(q)){var m=arguments,n=m.length;while(n--){p.events[m[n]]=p.events[m[n]]||h;}}else{Ext.applyIf(p.events,q);}},hasListener:function(m){var n=this.events[m];return a(n)&&n.listeners.length>0;},suspendEvents:function(m){this.eventsSuspended=h;if(m&&!this.eventQueue){this.eventQueue=[];}},resumeEvents:function(){var m=this,n=m.eventQueue||[];m.eventsSuspended=j;delete m.eventQueue;k(n,function(o){m.fireEvent.apply(m,o);});}};var e=i.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;i.Observable.releaseCapture=function(m){m.fireEvent=e.fireEvent;};function g(n,p,m){return function(){if(p.target==arguments[0]){n.apply(m,l(arguments));}};}function c(p,q,m,n){m.task=new i.DelayedTask();return function(){m.task.delay(q.buffer,p,n,l(arguments));};}function d(o,p,n,m){return function(){p.removeListener(n,m);return o.apply(m,arguments);};}function b(p,q,m,n){return function(){var o=new i.DelayedTask();if(!m.tasks){m.tasks=[];}m.tasks.push(o);o.delay(q.delay||10,p,n,l(arguments));};}i.Event=function(n,m){this.name=m;this.obj=n;this.listeners=[];};i.Event.prototype={addListener:function(p,o,n){var q=this,m;o=o||q.obj;if(!q.isListening(p,o)){m=q.createListener(p,o,n);if(q.firing){q.listeners=q.listeners.slice(0);}q.listeners.push(m);}},createListener:function(q,p,r){r=r||{},p=p||this.obj;var m={fn:q,scope:p,options:r},n=q;if(r.target){n=g(n,r,p);}if(r.delay){n=b(n,r,m,p);}if(r.single){n=d(n,this,q,p);}if(r.buffer){n=c(n,r,m,p);}m.fireFn=n;return m;},findListener:function(q,p){var r=this.listeners,n=r.length,m,o;while(n--){m=r[n];if(m){o=m.scope;if(m.fn==q&&(o==p||o==this.obj)){return n;}}}return -1;},isListening:function(n,m){return this.findListener(n,m)!=-1;},removeListener:function(r,q){var p,m,n,s=this,o=j;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0);}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task;}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel();}delete m.tasks;}s.listeners.splice(p,1);o=h;}return o;},clearListeners:function(){var o=this,m=o.listeners,n=m.length;while(n--){o.removeListener(m[n].fn,m[n].scope);}},fire:function(){var r=this,o=l(arguments),q=r.listeners,m=q.length,p=0,n;if(m>0){r.firing=h;for(;p<m;p++){n=q[p];if(n&&n.fireFn.apply(n.scope||r.obj||window,o)===j){return(r.firing=j);}}}r.firing=j;return h;}};})();Ext.DomHelper=function(){var s=null,j=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,l=/^table|tbody|tr|td$/i,p,m="afterbegin",n="afterend",c="beforebegin",o="beforeend",a="<table>",h="</table>",b=a+"<tbody>",i="</tbody>"+h,k=b+"<tr>",r="</tr>"+i;function g(w,y,x,z,v,t){var u=p.insertHtml(z,Ext.getDom(w),q(y));return x?Ext.get(u,true):u;}function q(z){var v="",u,y,x,t,A;if(Ext.isString(z)){v=z;}else{if(Ext.isArray(z)){for(var w=0;w<z.length;w++){if(z[w]){v+=q(z[w]);}}}else{v+="<"+(z.tag=z.tag||"div");Ext.iterate(z,function(B,C){if(!/tag|children|cn|html$/i.test(B)){if(Ext.isObject(C)){v+=" "+B+'="';Ext.iterate(C,function(E,D){v+=E+":"+D+";";});v+='"';}else{v+=" "+({cls:"class",htmlFor:"for"}[B]||B)+'="'+C+'"';}}});if(j.test(z.tag)){v+="/>";}else{v+=">";if((A=z.children||z.cn)){v+=q(A);}else{if(z.html){v+=z.html;}}v+="</"+z.tag+">";}}}return v;}function e(A,x,w,y){s.innerHTML=[x,w,y].join("");var t=-1,v=s,u;while(++t<A){v=v.firstChild;}if(u=v.nextSibling){var z=document.createDocumentFragment();while(v){u=v.nextSibling;z.appendChild(v);v=u;}v=z;}return v;}function d(t,u,w,v){var x,y;s=s||document.createElement("div");if(t=="td"&&(u==m||u==o)||!/td|tr|tbody/i.test(t)&&(u==c||u==n)){return;}y=u==c?w:u==n?w.nextSibling:u==m?w.firstChild:null;if(u==c||u==n){w=w.parentNode;}if(t=="td"||(t=="tr"&&(u==o||u==m))){x=e(4,k,v,r);}else{if((t=="tbody"&&(u==o||u==m))||(t=="tr"&&(u==c||u==n))){x=e(3,b,v,i);}else{x=e(2,a,v,h);}}w.insertBefore(x,y);return x;}p={markup:function(t){return q(t);},applyStyles:function(w,x){if(x){var u=0,t,v;w=Ext.fly(w);if(Ext.isFunction(x)){x=x.call();}if(Ext.isString(x)){x=x.trim().split(/\s*(?::|;)\s*/);for(t=x.length;u<t;){w.setStyle(x[u++],x[u++]);}}else{if(Ext.isObject(x)){w.setStyle(x);}}}},insertHtml:function(y,t,z){var x={},v,B,A,C,w,u;y=y.toLowerCase();x[c]=["BeforeBegin","previousSibling"];x[n]=["AfterEnd","nextSibling"];if(t.insertAdjacentHTML){if(l.test(t.tagName)&&(u=d(t.tagName.toLowerCase(),y,t,z))){return u;}x[m]=["AfterBegin","firstChild"];x[o]=["BeforeEnd","lastChild"];if((v=x[y])){t.insertAdjacentHTML(v[0],z);return t[v[1]];}}else{A=t.ownerDocument.createRange();B="setStart"+(/end/i.test(y)?"After":"Before");if(x[y]){A[B](t);C=A.createContextualFragment(z);t.parentNode.insertBefore(C,y==c?t:t.nextSibling);return t[(y==c?"previous":"next")+"Sibling"];}else{w=(y==m?"first":"last")+"Child";if(t.firstChild){A[B](t[w]);C=A.createContextualFragment(z);if(y==m){t.insertBefore(C,t.firstChild);}else{t.appendChild(C);}}else{t.innerHTML=z;}return t[w];}}throw'Illegal insertion point -> "'+y+'"';},insertBefore:function(t,v,u){return g(t,v,u,c);},insertAfter:function(t,v,u){return g(t,v,u,n,"nextSibling");},insertFirst:function(t,v,u){return g(t,v,u,m,"firstChild");},append:function(t,v,u){return g(t,v,u,o,"",true);},overwrite:function(t,v,u){t=Ext.getDom(t);t.innerHTML=q(v);return u?Ext.get(t.firstChild):t.firstChild;},createHtml:q};return p;}();Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("");}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a);}else{c.push(a);}});d=c.join("");}}e.html=d;if(e.compiled){e.compile();}};Ext.Template.prototype={re:/\{([\w-]+)\}/g,applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:"";});},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b;},compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'";}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me;},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c);},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c);},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c);},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c);},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d;},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild;}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"");};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n;}}n=n.nextSibling;}return null;}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n;}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n;}function children(d){var n=d.firstChild,ni=-1,nx;while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}n=nx;}return this;}function byClassName(c,a,v){if(!v){return c;}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci;}}return r;}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];}if(!n){return null;}if(attr=="for"){return n.htmlFor;}if(attr=="class"||attr=="className"){return n.className;}return n.getAttribute(attr)||n[attr];}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result;}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci;}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj;}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n;}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n;}}}}}}}return result;}function concat(a,b){if(b.slice){return a.concat(b);}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i];}return a;}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs];}if(!tagName){return cs;}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci;}}return r;}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs];}if(!id){return cs;}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r;}}return r;}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{",f=Ext.DomQuery.operators[op],a,ih;for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue;}ih=ci.innerHTML;if(ih!==null&&ih!==undefined){if(st){a=Ext.DomQuery.getStyle(ci,attr);}else{if(attr=="class"||attr=="className"){a=ci.className;}else{if(attr=="for"){a=ci.htmlFor;}else{if(attr=="href"){a=ci.getAttribute("href",2);}else{a=ci.getAttribute(attr);}}}}}else{a=ci.getAttribute(attr);}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci;}}return r;}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value);}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c;}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup");}return r;}function nodup(cs){if(!cs){return[];}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs;}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs);}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d;}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j];}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj;}}return r;}}return r;}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d);}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i];}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff");}return r;}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2;}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2);}for(var i=0;i<len1;i++){c1[i]._qdiff=d;}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i];}}return r;}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id);}ns=getNodes(ns,mode,"*");return byId(ns,null,id);}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name);},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],q=path,mode,lq,tk=Ext.DomQuery.matchers,tklen=tk.length,mm,lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"");}while(path.substr(0,1)=="/"){path=path.substr(1);}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");';}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");';}q=q.replace(tm[0],"");}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");';}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");';}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");';}q=q.replace(tm[0],"");}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i];});q=q.replace(m[0],"");matched=true;break;}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"';}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"");}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f;},select:function(path,root,type){if(!root||root==document){root=document;}if(typeof root=="string"){root=document.getElementById(root);}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector";}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result);}}if(paths.length>1){return nodup(results);}return results;},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0];},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select");}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize();}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v);},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v);},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el);}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0);},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple");}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result;},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v;},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;},"%=":function(a,v){return(a%v)==0;},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-");},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1;}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci;}}return r;},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci;}}return r;},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j;}}pn._batch=batch;}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n;}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n;}}}return r;},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci;}}return r;},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break;}}if(empty){r[++ri]=ci;}}return r;},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci;}}return r;},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci;}}return r;},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci;}}return r;},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true);},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break;}}}return r;},odd:function(c){return this["nth-child"](c,"odd");},even:function(c){return this["nth-child"](c,"even");},nth:function(c,a){return c[a-1]||[];},first:function(c){return c[0]||[];},last:function(c){return c[c.length-1]||[];},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci;}}return r;},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;}}};}();Ext.query=Ext.DomQuery.select;Ext.EventManager=function(){var u,m,i=false,l=Ext.lib.Event,n=Ext.lib.Dom,b=document,v=window,e="ie-deferred-loader",o="DOMContentLoaded",g=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,q=[];function k(y){var B=false,x=0,w=q.length,B=false,z=false,A;if(y){if(y.getElementById||y.navigator){for(;x<w;++x){A=q[x];if(A.el===y){B=A.id;break;}}if(!B){B=Ext.id(y);q.push({id:B,el:y});z=true;}}else{B=Ext.id(y);}if(!Ext.elCache[B]){Ext.Element.addToCache(new Ext.Element(y),B);if(z){Ext.elCache[B].skipGC=true;}}}return B;}function j(y,A,D,z,x,F){y=Ext.getDom(y);var w=k(y),E=Ext.elCache[w].events,B;B=l.on(y,A,x);E[A]=E[A]||[];E[A].push([D,x,F,B,z]);if(A=="mousewheel"&&y.addEventListener){var C=["DOMMouseScroll",x,false];y.addEventListener.apply(y,C);Ext.EventManager.addListener(v,"unload",function(){y.removeEventListener.apply(y,C);});}if(A=="mousedown"&&y==document){Ext.EventManager.stoppedMouseDownEvent.addListener(x);}}function c(){if(!i){Ext.isReady=i=true;if(m){clearInterval(m);}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(o,c,false);}if(Ext.isIE){var w=b.getElementById(e);if(w){w.onreadystatechange=null;w.parentNode.removeChild(w);}}if(u){u.fire();u.listeners=[];}}}function a(){var w="complete";u=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(o,c,false);}else{if(Ext.isIE){b.write("<script id="+e+' defer="defer" src="//:"><\/script>');b.getElementById(e).onreadystatechange=function(){if(this.readyState==w){c();}};}else{if(Ext.isWebKit){m=setInterval(function(){if(b.readyState==w){c();}},10);}}}l.on(v,"load",c);}function s(w,x){return function(){var y=Ext.toArray(arguments);if(x.target==Ext.EventObject.setEvent(y[0]).target){w.apply(this,y);}};}function t(x,y,w){return function(z){w.delay(y.buffer,x,null,[new Ext.EventObjectImpl(z)]);};}function p(A,z,w,y,x){return function(B){Ext.EventManager.removeListener(z,w,y,x);A(B);};}function d(x,y,w){return function(A){var z=new Ext.util.DelayedTask(x);if(!w.tasks){w.tasks=[];}w.tasks.push(z);z.delay(y.delay||10,x,null,[new Ext.EventObjectImpl(A)]);};}function h(B,A,w,D,E){var x=!Ext.isObject(w)?{}:w,y=Ext.getDom(B),z;D=D||x.fn;E=E||x.scope;if(!y){throw'Error listening for "'+A+'". Element "'+B+"\" doesn't exist.";}function C(G){if(!Ext){return;}G=Ext.EventObject.setEvent(G);var F;if(x.delegate){if(!(F=G.getTarget(x.delegate,y))){return;}}else{F=G.target;}if(x.stopEvent){G.stopEvent();}if(x.preventDefault){G.preventDefault();}if(x.stopPropagation){G.stopPropagation();}if(x.normalized){G=G.browserEvent;}D.call(E||y,G,F,x);}if(x.target){C=s(C,x);}if(x.delay){C=d(C,x,D);}if(x.single){C=p(C,y,A,D,E);}if(x.buffer){z=new Ext.util.DelayedTask(C);C=t(C,x,z);}j(y,A,D,z,C,E);return C;}var r={addListener:function(y,w,A,z,x){if(Ext.isObject(w)){var D=w,B,C;for(B in D){C=D[B];if(!g.test(B)){if(Ext.isFunction(C)){h(y,B,D,C,D.scope);}else{h(y,B,C);}}}}else{h(y,w,x,A,z);}},removeListener:function(z,D,H,I){z=Ext.getDom(z);var w=k(z),F=z&&(Ext.elCache[w].events)[D]||[],x,C,A,B,y,E,G;for(C=0,E=F.length;C<E;C++){if(Ext.isArray(G=F[C])&&G[0]==H&&(!I||G[2]==I)){if(G[4]){G[4].cancel();}B=H.tasks&&H.tasks.length;if(B){while(B--){H.tasks[B].cancel();}delete H.tasks;}y=x=G[1];if(l.extAdapter){y=G[3];}l.un(z,D,y);F.splice(C,1);if(F.length===0){delete Ext.elCache[w].events[D];}for(B in Ext.elCache[w].events){return false;}Ext.elCache[w].events={};return false;}}if(D=="mousewheel"&&z.addEventListener&&x){z.removeEventListener("DOMMouseScroll",x,false);}if(D=="mousedown"&&z==b&&x){Ext.EventManager.stoppedMouseDownEvent.removeListener(x);}},removeAll:function(x){x=Ext.getDom(x);var w=k(x),C=Ext.elCache[w]||{},F=C.events||{},B,A,D,y,E,z;for(y in F){if(F.hasOwnProperty(y)){B=F[y];for(A=0,D=B.length;A<D;A++){E=B[A];if(E[4]){E[4].cancel();}if(E[0].tasks&&(z=E[0].tasks.length)){while(z--){E[0].tasks[z].cancel();}delete E.tasks;}l.un(x,y,l.extAdapter?E[3]:E[1]);}}}if(Ext.elCache[w]){Ext.elCache[w].events={};}},getListeners:function(z,w){z=Ext.getDom(z);var B=k(z),x=Ext.elCache[B]||{},A=x.events||{},y=[];if(A&&A[w]){return A[w];}else{return null;}},purgeElement:function(y,w,A){y=Ext.getDom(y);var x=k(y),D=Ext.elCache[x]||{},E=D.events||{},z,C,B;if(A){if(E&&E.hasOwnProperty(A)){C=E[A];for(z=0,B=C.length;z<B;z++){Ext.EventManager.removeListener(y,A,C[z][0]);}}}else{Ext.EventManager.removeAll(y);}if(w&&y&&y.childNodes){for(z=0,B=y.childNodes.length;z<B;z++){Ext.EventManager.purgeElement(y.childNodes[z],w,A);}}},_unload:function(){var w;for(w in Ext.elCache){Ext.EventManager.removeAll(w);}},onDocumentReady:function(y,x,w){if(i){u.addListener(y,x,w);u.fire();u.listeners=[];}else{if(!u){a();}w=w||{};w.delay=w.delay||1;u.addListener(y,x,w);}}};r.on=r.addListener;r.un=r.removeListener;r.stoppedMouseDownEvent=new Ext.util.Event();return r;}();Ext.onReady=Ext.EventManager.onDocumentReady;(function(){var a=function(){var c=document.body||document.getElementsByTagName("body")[0];if(!c){return false;}var b=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":(Ext.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];if(Ext.isSafari){b.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")));}else{if(Ext.isChrome){b.push("ext-chrome");}}if(Ext.isMac){b.push("ext-mac");}if(Ext.isLinux){b.push("ext-linux");}if(Ext.isStrict||Ext.isBorderBox){var d=c.parentNode;if(d){d.className+=Ext.isStrict?" ext-strict":" ext-border-box";}}c.className+=b.join(" ");return true;};if(!a()){Ext.onReady(a);}})();Ext.EventObject=function(){var b=Ext.lib.Event,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},c=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(d){if(d){this.setEvent(d.browserEvent||d);}};Ext.EventObjectImpl.prototype={setEvent:function(g){var d=this;if(g==d||(g&&g.browserEvent)){return g;}d.browserEvent=g;if(g){d.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&d.button==-1){d.button=0;}d.type=g.type;d.shiftKey=g.shiftKey;d.ctrlKey=g.ctrlKey||g.metaKey||false;d.altKey=g.altKey;d.keyCode=g.keyCode;d.charCode=g.charCode;d.target=b.getTarget(g);d.xy=b.getXY(g);}else{d.button=-1;d.shiftKey=false;d.ctrlKey=false;d.altKey=false;d.keyCode=0;d.charCode=0;d.target=null;d.xy=[0,0];}return d;},stopEvent:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d);}b.stopEvent(d.browserEvent);}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent);}},stopPropagation:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d);}b.stopPropagation(d.browserEvent);}},getCharCode:function(){return this.charCode||this.keyCode;},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode);},normalizeKey:function(d){return Ext.isSafari?(a[d]||d):d;},getPageX:function(){return this.xy[0];},getPageY:function(){return this.xy[1];},getXY:function(){return this.xy;},getTarget:function(e,g,d){return e?Ext.fly(this.target).findParent(e,g,d):(d?Ext.get(this.target):this.target);},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null;},getWheelDelta:function(){var d=this.browserEvent;var g=0;if(d.wheelDelta){g=d.wheelDelta/120;}else{if(d.detail){g=-d.detail/3;}}return g;},within:function(g,h,d){if(g){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&((d?(e==Ext.getDom(g)):false)||Ext.fly(g).contains(e));}return false;}};return new Ext.EventObjectImpl();}();(function(){var j=document;Ext.Element=function(o,p){var q=typeof o=="string"?j.getElementById(o):o,r;if(!q){return null;}r=q.id;if(!p&&r&&Ext.elCache[r]){return Ext.elCache[r].el;}this.dom=q;this.id=r||Ext.id(q);};var a=Ext.lib.Dom,g=Ext.DomHelper,m=Ext.lib.Event,e=Ext.lib.Anim,h=Ext.Element,b=Ext.elCache;h.prototype={set:function(t,q){var r=this.dom,p,s,q=(q!==false)&&!!r.setAttribute;for(p in t){if(t.hasOwnProperty(p)){s=t[p];if(p=="style"){g.applyStyles(r,s);}else{if(p=="cls"){r.className=s;}else{if(q){r.setAttribute(p,s);}else{r[p]=s;}}}}}return this;},defaultUnit:"px",is:function(o){return Ext.DomQuery.is(this.dom,o);},focus:function(r,q){var o=this,q=q||o.dom;try{if(Number(r)){o.focus.defer(r,null,[null,q]);}else{q.focus();}}catch(p){}return o;},blur:function(){try{this.dom.blur();}catch(o){}return this;},getValue:function(o){var p=this.dom.value;return o?parseInt(p,10):p;},addListener:function(o,r,q,p){Ext.EventManager.on(this.dom,o,r,q||this,p);return this;},removeListener:function(o,q,p){Ext.EventManager.removeListener(this.dom,o,q,p||this);return this;},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this;},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this;},addUnits:function(o){if(o===""||o=="auto"||o===undefined){o=o||"";}else{if(!isNaN(o)||!k.test(o)){o=o+(this.defaultUnit||"px");}}return o;},load:function(p,q,o){Ext.Ajax.request(Ext.apply({params:q,url:p.url||p,callback:o,el:this.dom,indicatorText:p.indicatorText||""},Ext.isObject(p)?p:{}));return this;},isBorderBox:function(){return i[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox;},remove:function(){var o=this,p=o.dom;if(p){delete o.dom;Ext.removeNode(p);}},hover:function(p,o,r,q){var s=this;s.on("mouseenter",p,r||s.dom,q);s.on("mouseleave",o,r||s.dom,q);return s;},contains:function(o){return !o?false:Ext.lib.Dom.isAncestor(this.dom,o.dom?o.dom:o);},getAttributeNS:function(p,o){return this.getAttribute(o,p);},getAttribute:Ext.isIE?function(o,q){var r=this.dom,p=typeof r[q+":"+o];if(["undefined","unknown"].indexOf(p)==-1){return r[q+":"+o];}return r[o];}:function(o,p){var q=this.dom;return q.getAttributeNS(p,o)||q.getAttribute(p+":"+o)||q.getAttribute(o)||q[o];},update:function(o){if(this.dom){this.dom.innerHTML=o;}return this;}};var n=h.prototype;h.addMethods=function(p){Ext.apply(n,p);};n.on=n.addListener;n.un=n.removeListener;n.autoBoxAdjust=true;var k=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,d;h.get=function(p){var o,s,r;if(!p){return null;}if(typeof p=="string"){if(!(s=j.getElementById(p))){return null;}if(b[p]&&b[p].el){o=b[p].el;o.dom=s;}else{o=h.addToCache(new h(s));}return o;}else{if(p.tagName){if(!(r=p.id)){r=Ext.id(p);}if(b[r]&&b[r].el){o=b[r].el;o.dom=p;}else{o=h.addToCache(new h(p));}return o;}else{if(p instanceof h){if(p!=d){p.dom=j.getElementById(p.id)||p.dom;}return p;}else{if(p.isComposite){return p;}else{if(Ext.isArray(p)){return h.select(p);}else{if(p==j){if(!d){var q=function(){};q.prototype=h.prototype;d=new q();d.dom=j;}return d;}}}}}}return null;};h.addToCache=function(o,p){p=p||o.id;b[p]={el:o,data:{},events:{}};return o;};h.data=function(p,o,q){p=h.get(p);if(!p){return null;}var r=b[p.id].data;if(arguments.length==2){return r[o];}else{return(r[o]=q);}};function l(){if(!Ext.enableGarbageCollector){clearInterval(h.collectorThreadId);}else{var p,r,u,s;for(p in b){s=b[p];if(s.skipGC){continue;}r=s.el;u=r.dom;if(!u||!u.parentNode||(!u.offsetParent&&!j.getElementById(p))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(u);}delete b[p];}}if(Ext.isIE){var q={};for(p in b){q[p]=b[p];}b=Ext.elCache=q;}}}h.collectorThreadId=setInterval(l,30000);var c=function(){};c.prototype=h.prototype;h.Flyweight=function(o){this.dom=o;};h.Flyweight.prototype=new c();h.Flyweight.prototype.isFlyweight=true;h._flyweights={};h.fly=function(q,o){var p=null;o=o||"_global";if(q=Ext.getDom(q)){(h._flyweights[o]=h._flyweights[o]||new h.Flyweight()).dom=q;p=h._flyweights[o];}return p;};Ext.get=h.get;Ext.fly=h.fly;var i=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){i.button=1;}Ext.EventManager.on(window,"unload",function(){delete b;delete h._flyweights;});})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null;}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE;}while(j&&j.nodeType==1&&k<l&&j!=g&&j!=i){if(e.is(j,m)){return h?a(j):j;}k++;j=j.parentNode;}return null;},findParentNode:function(j,i,g){var h=Ext.fly(this.dom.parentNode,"_internal");return h?h.findParent(j,i,g):null;},up:function(h,g){return this.findParentNode(h,g,true);},select:function(g){return Ext.Element.select(g,this.dom);},query:function(g){return e.select(g,this.dom);},child:function(g,h){var i=e.selectNode(g,this.dom);return h?i:a(i);},down:function(g,h){var i=e.selectNode(" > "+g,this.dom);return h?i:a(i);},parent:function(g,h){return this.matchNode(d,d,g,h);},next:function(g,h){return this.matchNode(b,b,g,h);},prev:function(g,h){return this.matchNode(c,c,g,h);},first:function(g,h){return this.matchNode(b,"firstChild",g,h);},last:function(g,h){return this.matchNode(c,"lastChild",g,h);},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j;}j=j[h];}return null;}};}());Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this);},appendTo:function(d){c(d).appendChild(this.dom);return this;},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this;},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this;},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e;}else{return this.createChild(e,this.dom.firstChild,d);}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this;},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom);}else{d=b.insertBefore(e.dom,d);}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e;},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true);},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g;},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h;}};}());Ext.Element.addMethods(function(){var h={},x=/(-[a-z])/gi,b={},s=document.defaultView,u=Ext.isIE?"styleFloat":"cssFloat",C=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,A=Ext.Element,d="padding",c="margin",y="border",t="-left",q="-right",w="-top",o="-bottom",j="-width",r=Math,z="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",B="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+o+j},g={l:d+t,r:d+q,t:d+w,b:d+o},a={l:c+t,r:c+q,t:c+w,b:c+o},D=Ext.Element.data;function p(E,F){return F.charAt(1).toUpperCase();}function v(E){return h[E]||(h[E]=E=="float"?u:E.replace(x,p));}return{adjustWidth:function(E){var F=this;var G=Ext.isNumber(E);if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("lr")+F.getPadding("lr"));}return(G&&E<0)?0:E;},adjustHeight:function(E){var F=this;var G=Ext.isNumber(E);if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("tb")+F.getPadding("tb"));}return(G&&E<0)?0:E;},addClass:function(H){var I=this,G,E,F;H=Ext.isArray(H)?H:[H];for(G=0,E=H.length;G<E;G++){F=H[G];if(F){I.dom.className+=(!I.hasClass(F)&&F?" "+F:"");}}return I;},radioClass:function(H){var I=this.dom.parentNode.childNodes,F;H=Ext.isArray(H)?H:[H];for(var G=0,E=I.length;G<E;G++){F=I[G];if(F&&F.nodeType==1){Ext.fly(F,"_internal").removeClass(H);}}return this.addClass(H);},removeClass:function(H){var I=this,F;H=Ext.isArray(H)?H:[H];if(I.dom&&I.dom.className){for(var G=0,E=H.length;G<E;G++){F=H[G];if(F){I.dom.className=I.dom.className.replace(b[F]=b[F]||new RegExp("(?:^|\\s+)"+F+"(?:\\s+|$)","g")," ");}}}return I;},toggleClass:function(E){return this.hasClass(E)?this.removeClass(E):this.addClass(E);},hasClass:function(E){return E&&(" "+this.dom.className+" ").indexOf(" "+E+" ")!=-1;},replaceClass:function(F,E){return this.removeClass(F).addClass(E);},isStyle:function(E,F){return this.getStyle(E)==F;},getStyle:function(){return s&&s.getComputedStyle?function(K){var H=this.dom,E,G,F,I,J=Ext.isWebKit,I;if(H==document){return null;}K=v(K);if(J&&/marginRight/.test(K)){I=this.getStyle("display");H.style.display="inline-block";}F=(E=H.style[K])?E:(G=s.getComputedStyle(H,""))?G[K]:null;if(J){if(F=="rgba(0, 0, 0, 0)"){F="transparent";}else{if(I){H.style.display=I;}}}return F;}:function(I){var G=this.dom,E,F;if(G==document){return null;}if(I=="opacity"){if(G.style.filter.match){if(E=G.style.filter.match(C)){var H=parseFloat(E[1]);if(!isNaN(H)){return H?H/100:0;}}}return 1;}I=v(I);return G.style[I]||((F=G.currentStyle)?F[I]:null);};}(),getColor:function(E,F,J){var H=this.getStyle(E),G=Ext.isDefined(J)?J:"#",I;if(!H||/transparent|inherit/.test(H)){return F;}if(/^r/.test(H)){Ext.each(H.slice(4,H.length-1).split(","),function(K){I=parseInt(K,10);G+=(I<16?"0":"")+I.toString(16);});}else{H=H.replace("#","");G+=H.length==3?H.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):H;}return(G.length>5?G.toLowerCase():F);},setStyle:function(I,H){var F,G,E;if(!Ext.isObject(I)){F={};F[I]=H;I=F;}for(G in I){H=I[G];G=="opacity"?this.setOpacity(H):this.dom.style[v(G)]=H;}return this;},setOpacity:function(F,E){var I=this,G=I.dom.style;if(!E||!I.anim){if(Ext.isIE){var H=F<1?"alpha(opacity="+F*100+")":"",J=G.filter.replace(C,"").replace(l,"");G.zoom=1;G.filter=J+(J.length>0?" ":"")+H;}else{G.opacity=F;}}else{I.anim({opacity:{to:F}},I.preanim(arguments,1),null,0.35,"easeIn");}return I;},clearOpacity:function(){var E=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(E.filter)){E.filter=E.filter.replace(C,"").replace(l,"");}}else{E.opacity=E["-moz-opacity"]=E["-khtml-opacity"]="";}return this;},getHeight:function(G){var F=this,I=F.dom,H=Ext.isIE&&F.isStyle("display","none"),E=r.max(I.offsetHeight,H?0:I.clientHeight)||0;E=!G?E:E-F.getBorderWidth("tb")-F.getPadding("tb");return E<0?0:E;},getWidth:function(F){var G=this,I=G.dom,H=Ext.isIE&&G.isStyle("display","none"),E=r.max(I.offsetWidth,H?0:I.clientWidth)||0;E=!F?E:E-G.getBorderWidth("lr")-G.getPadding("lr");return E<0?0:E;},setWidth:function(F,E){var G=this;F=G.adjustWidth(F);!E||!G.anim?G.dom.style.width=G.addUnits(F):G.anim({width:{to:F}},G.preanim(arguments,1));return G;},setHeight:function(E,F){var G=this;E=G.adjustHeight(E);!F||!G.anim?G.dom.style.height=G.addUnits(E):G.anim({height:{to:E}},G.preanim(arguments,1));return G;},getBorderWidth:function(E){return this.addStyles(E,i);},getPadding:function(E){return this.addStyles(E,g);},clip:function(){var E=this,F=E.dom;if(!D(F,e)){D(F,e,true);D(F,B,{o:E.getStyle(k),x:E.getStyle(n),y:E.getStyle(m)});E.setStyle(k,z);E.setStyle(n,z);E.setStyle(m,z);}return E;},unclip:function(){var E=this,G=E.dom;if(D(G,e)){D(G,e,false);var F=D(G,B);if(F.o){E.setStyle(k,F.o);}if(F.x){E.setStyle(n,F.x);}if(F.y){E.setStyle(m,F.y);}}return E;},addStyles:function(J,I){var K=0,F=J.match(/\w/g),H;for(var G=0,E=F.length;G<E;G++){H=F[G]&&parseInt(this.getStyle(I[F[G]]),10);if(H){K+=r.abs(H);}}return K;},margins:a};}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",i="bottom",h="position",c="static",e="relative",j="auto",k="z-index";Ext.Element.addMethods({getX:function(){return a.getX(this.dom);},getY:function(){return a.getY(this.dom);},getXY:function(){return a.getXY(this.dom);},getOffsetsTo:function(l){var n=this.getXY(),m=Ext.fly(l,"_internal").getXY();return[n[0]-m[0],n[1]-m[1]];},setX:function(l,m){return this.setXY([l,this.getY()],this.animTest(arguments,m,1));},setY:function(m,l){return this.setXY([this.getX(),m],this.animTest(arguments,l,1));},setLeft:function(l){this.setStyle(b,this.addUnits(l));return this;},setTop:function(l){this.setStyle(d,this.addUnits(l));return this;},setRight:function(l){this.setStyle(g,this.addUnits(l));return this;},setBottom:function(l){this.setStyle(i,this.addUnits(l));return this;},setXY:function(n,l){var m=this;if(!l||!m.anim){a.setXY(m.dom,n);}else{m.anim({points:{to:n}},m.preanim(arguments,1),"motion");}return m;},setLocation:function(l,n,m){return this.setXY([l,n],this.animTest(arguments,m,2));},moveTo:function(l,n,m){return this.setXY([l,n],this.animTest(arguments,m,2));},getLeft:function(l){return !l?this.getX():parseInt(this.getStyle(b),10)||0;},getRight:function(l){var m=this;return !l?m.getX()+m.getWidth():(m.getLeft(true)+m.getWidth())||0;},getTop:function(l){return !l?this.getY():parseInt(this.getStyle(d),10)||0;},getBottom:function(l){var m=this;return !l?m.getY()+m.getHeight():(m.getTop(true)+m.getHeight())||0;},position:function(p,o,l,n){var m=this;if(!p&&m.isStyle(h,c)){m.setStyle(h,e);}else{if(p){m.setStyle(h,p);}}if(o){m.setStyle(k,o);}if(l||n){m.setXY([l||false,n||false]);}},clearPositioning:function(l){l=l||"";this.setStyle({left:l,right:l,top:l,bottom:l,"z-index":"",position:c});return this;},getPositioning:function(){var m=this.getStyle(b);var n=this.getStyle(d);return{position:this.getStyle(h),left:m,right:m?"":this.getStyle(g),top:n,bottom:n?"":this.getStyle(i),"z-index":this.getStyle(k)};},setPositioning:function(l){var n=this,m=n.dom.style;n.setStyle(l);if(l.right==j){m.right="";}if(l.bottom==j){m.bottom="";}return n;},translatePoints:function(m,u){u=isNaN(m[1])?u:m[1];m=isNaN(m[0])?m:m[0];var q=this,r=q.isStyle(h,e),s=q.getXY(),n=parseInt(q.getStyle(b),10),p=parseInt(q.getStyle(d),10);n=!isNaN(n)?n:(r?0:q.dom.offsetLeft);p=!isNaN(p)?p:(r?0:q.dom.offsetTop);return{left:(m-s[0]+n),top:(u-s[1]+p)};},animTest:function(m,l,n){return !!l&&this.preanim?this.preanim(m,n):false;}});})();Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth;},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this;},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop;}else{b=window.pageXOffset;g=window.pageYOffset;}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)};}else{e={left:i.scrollLeft,top:i.scrollTop};}return e;}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",j="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,i=function(m){var l=g(m,a);if(l===undefined){g(m,a,l="");}return l;},k=function(n){var l=g(n,c);if(l===undefined){g(n,c,l=1);}return l;};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(l){g(this.dom,c,l);return this;},animate:function(m,o,n,p,l){this.anim(m,{duration:o,callback:n,easing:p},l);return this;},anim:function(o,p,m,r,n,l){m=m||"run";p=p||{};var q=this,s=Ext.lib.Anim[m](q.dom,o,(p.duration||r)||0.35,(p.easing||n)||"easeOut",function(){if(l){l.call(q);}if(p.callback){p.callback.call(p.scope||q,q,p);}},q);p.anim=s;return s;},preanim:function(l,m){return !l[m]?false:(Ext.isObject(l[m])?l[m]:{duration:l[m+1],callback:l[m+2],easing:l[m+3]});},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,j);},setVisible:function(p,m){var n=this,o=n.dom,l=k(this.dom)==e;if(!m||!n.anim){if(l){n.setDisplayed(p);}else{n.fixDisplay();o.style.visibility=p?"visible":b;}}else{if(p){n.setOpacity(0.01);n.setVisible(true);}n.anim({opacity:{to:(p?1:0)}},n.preanim(arguments,1),null,0.35,"easeIn",function(){if(!p){o.style[l?d:h]=(l)?j:b;Ext.fly(o).setOpacity(1);}});}return n;},toggle:function(l){var m=this;m.setVisible(!m.isVisible(),m.preanim(arguments,0));return m;},setDisplayed:function(l){if(typeof l=="boolean"){l=l?i(this.dom):j;}this.setStyle(d,l);return this;},fixDisplay:function(){var l=this;if(l.isStyle(d,j)){l.setStyle(h,b);l.setStyle(d,i(this.dom));if(l.isStyle(d,j)){l.setStyle(d,"block");}}},hide:function(l){this.setVisible(false,this.preanim(arguments,0));return this;},show:function(l){this.setVisible(true,this.preanim(arguments,0));return this;}};}());(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{};},p=function(B){d.dom=B;d.id=Ext.id(B);return d;},c=function(B){if(!v[B]){v[B]=[];}return v[B];},b=function(C,B){v[C]=B;};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C]);},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E);}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z);}R[ac]=R[ab]="0";if(aa){Y.width=aa;}if(W){Y.height=W;}if(T){Y.points=T;}return Y;}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P);});return J;},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D);}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R;}if(T){P[T]=Q;}return P;}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M);});return H;},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H);}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I);});return F;},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F);}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G);}).defer(100);});});return D;},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H);}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I);});return F;},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B;}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K);};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx();}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H);}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop();}};}I();});return D;},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({});},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({});}};});return this;},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity();}p(C).afterFx(D);});});return B;},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity();}p(D).afterFx(E);});});return C;},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this;},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]};}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]};}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D);});});return this;},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C);}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M];},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L);});return G;},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B;},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B;},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this);}},hasActiveFx:function(){return c(this.dom.id)[0];},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k);}else{b(E,[]);}}}return C;},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k;}return t;}return k;},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block;},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx();}}else{B.call(C);}}return C;},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY();}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative");}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B);}}return C;},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove();}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height};},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle);}if(C.afterCls){p(B).addClass(C.afterCls);}if(C.remove==k){p(B).remove();}if(C.callback){C.callback.call(C.scope,p(B));}if(!C.concurrent){c(D).shift();p(B).nextFx();}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H;}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx);})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight();};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b;},transformElement:function(a){return Ext.getDom(a);},getCount:function(){return this.elements.length;},add:function(d,b){var e=this,g=e.elements;if(!d){return this;}if(Ext.isString(d)){d=Ext.Element.selectorFunction(d,b);}else{if(d.isComposite){d=d.elements;}else{if(!Ext.isIterable(d)){d=[d];}}}for(var c=0,a=d.length;c<a;++c){g.push(e.transformElement(d[c]));}return e;},invoke:function(g,b){var h=this,d=h.elements,a=d.length,j,c;for(c=0;c<a;c++){j=d[c];if(j){Ext.Element.prototype[g].apply(h.getElement(j),b);}}return h;},item:function(b){var d=this,c=d.elements[b],a=null;if(c){a=d.getElement(c);}return a;},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g);}}return this;},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)){break;}}}return h;},fill:function(a){var b=this;b.elements=[];b.add(a);return b;},filter:function(a){var b=[],d=this,e=d.elements,c=Ext.isFunction(a)?a:function(g){return g.is(a);};d.each(function(j,g,h){if(c(j,h)!==false){b[b.length]=d.transformElement(j);}});d.elements=b;return d;},indexOf:function(a){return this.elements.indexOf(this.transformElement(a));},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g);}this.elements.splice(b,1,c);}return this;},clear:function(){this.elements=[];}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments);};}).call(a,c);}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select;}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b);}else{if(a.length!==undefined){c=a;}else{throw"Invalid selector";}}return new Ext.CompositeElementLite(c);};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(j){Ext.apply(this,j);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this);};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText='<div class="loading-indicator">'+n.indicatorText+"</div>";}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText;}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText;});}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:n.timeout||s.timeout},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n);}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n);}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||/multipart\/form-data/i.test(m.getAttribute("enctype"))){return s.doFormUpload.call(s,n,l,k);}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t;}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()));}n.headers=Ext.apply(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort();}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l="";}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n));}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null;}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId;},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId);}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k);}if(k.callback){k.callback.call(k.scope,k,true,j);}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k);}if(k.callback){k.callback.call(k.scope,k,false,j);}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden"});v.body.appendChild(r);Ext.fly(r).set({src:Ext.SSL_SECURE_URL});if(Ext.isIE){document.frames[l].name=l;}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t);});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value;}else{w.responseText=A.body.innerHTML;}}w.responseXML=A.XMLDocument||A;}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B);}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r);},100);}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,function(o){Ext.removeNode(o);});}});})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a);}});Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]";}return useNative;};}(),pad=function(n){return n<10?"0"+n:n;},doDecode=function(json){return eval("("+json+")");},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null";}else{if(Ext.isArray(o)){return encodeArray(o);}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o);}else{if(Ext.isString(o)){return encodeString(o);}else{if(typeof o=="number"){return isFinite(o)?String(o):"null";}else{if(Ext.isBoolean(o)){return String(o);}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",");}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true;}}}}a.push("}");return a.join("");}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}return'"'+s+'"';},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",");}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true;}}a.push("]");return a.join("");};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"';};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode;}return ec(o);};}();this.decode=function(){var dc;return function(json){if(!dc){dc=isNative()?JSON.parse:doDecode;}return dc(json);};}();})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;
/*
 * Ext Core Library 3.0
 * http://extjs.com/
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * 
 * MIT Licensed - http://extjs.com/license/mit.txt
 */
Ext.ns("Ext.ux");Ext.ux.JSONP=(function(){var _queue=[],_current=null,_nextRequest=function(){_current=null;if(_queue.length){_current=_queue.shift();_current.script.src=_current.url+"?"+_current.params;document.getElementsByTagName("head")[0].appendChild(_current.script);}};return{request:function(url,o){if(!url){return;}var me=this;o.params=o.params||{};if(o.callbackKey){o.params[o.callbackKey]="Ext.ux.JSONP.callback";}var params=Ext.urlEncode(o.params);var script=document.createElement("script");script.type="text/javascript";if(o.isRawJSON){if(Ext.isIE){Ext.fly(script).on("readystatechange",function(){if(script.readyState=="complete"){var data=script.innerHTML;if(data.length){me.callback(Ext.decode(data));}}});}else{Ext.fly(script).on("load",function(){var data=script.innerHTML;if(data.length){me.callback(Ext.decode(data));}});}}_queue.push({url:url,script:script,callback:o.callback||function(){},scope:o.scope||window,params:params||null});if(!_current){_nextRequest();}},callback:function(json){_current.callback.apply(_current.scope,[json]);Ext.fly(_current.script).removeAllListeners();document.getElementsByTagName("head")[0].removeChild(_current.script);_nextRequest();}};})();var 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;}}};}();var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings);};}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo();}catch(ex){delete SWFUpload.instances[this.movieName];throw ex;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof(url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url;}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/";}else{path=window.location.pathname.substr(0,indexSlash)+"/";}return path+url;};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName];};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime();}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url);}delete this.ensureDefault;};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement();}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("");};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("");};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName);}if(this.movieElement===null){throw"Could not find Flash element";}return this.movieElement;};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof(postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()));}}}return paramStringPairs.join("&amp;");};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof(movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof(movieElement[i])==="function"){movieElement[i]=null;}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement);}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true;}catch(ex2){return false;}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""));};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value);}else{return(this.settings[name]=value);}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name];}return"";};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString);}catch(ex){throw"Call to "+functionName+" failed";}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue);}return returnValue;};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile");};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles");};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID]);};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true;}this.callFlash("CancelUpload",[fileID,triggerErrorEvent]);};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload");};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats");};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject]);};SWFUpload.prototype.getFile=function(fileID){if(typeof(fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID]);}else{return this.callFlash("GetFile",[fileID]);}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value]);};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name]);};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url]);};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject]);};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params]);};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params]);};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description]);};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit]);};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit]);};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit]);};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName]);};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString]);};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError]);};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",");}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes]);};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds]);};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled]);};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL="";}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL]);};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px";}this.callFlash("SetButtonDimensions",[width,height]);};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html]);};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top]);};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css]);};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled]);};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction]);};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor]);};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[];}else{if(!(argumentArray instanceof Array)){argumentArray=[argumentArray];}}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray);});setTimeout(function(){self.executeNextEvent();},0);}else{if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function";}}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof(f)==="function"){f.apply(this);}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)));}unescapedPost[uk]=file.post[k];}}file.post=unescapedPost;}return file;};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface");}catch(ex){return false;}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return;}this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler");};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof(movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof(movieElement[key])==="function"){movieElement[key]=null;}}catch(ex){}}}}catch(ex1){}window["__flash__removeCallback"]=function(instance,name){try{if(instance){instance[name]=null;}}catch(flashEx){}};};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler");};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file);};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message]);};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue]);};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file);};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file);}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function";}}if(returnValue===undefined){returnValue=true;}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue]);};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal]);};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message]);};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived]);};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file);};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message);};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key]);}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage);}else{SWFUpload.Console.writeLine(message);}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console);}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight;}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message);}};var SWFUpload;if(typeof(SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(oldInitSettings){return function(){if(typeof(oldInitSettings)==="function"){oldInitSettings.call(this);}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null;};})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(fileID){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[fileID]);};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var stats=this.getStats();while(stats.files_queued>0){this.cancelUpload();stats=this.getStats();}};SWFUpload.queue.uploadStartHandler=function(file){var returnValue;if(typeof(this.queueSettings.user_upload_start_handler)==="function"){returnValue=this.queueSettings.user_upload_start_handler.call(this,file);}returnValue=(returnValue===false)?false:true;this.queueSettings.queue_cancelled_flag=!returnValue;return returnValue;};SWFUpload.queue.uploadCompleteHandler=function(file){var user_upload_complete_handler=this.queueSettings.user_upload_complete_handler;var continueUpload;if(file.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++;}if(typeof(user_upload_complete_handler)==="function"){continueUpload=(user_upload_complete_handler.call(this,file)===false)?false:true;}else{if(file.filestatus===SWFUpload.FILE_STATUS.QUEUED){continueUpload=false;}else{continueUpload=true;}}if(continueUpload){var stats=this.getStats();if(stats.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload();}else{if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0;}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;}}}};}var extMouseWheel=function(){var keepDeltaAtPlusMinusThree=true;var f=[];var thisMovie=function(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName];}else{return document[movieName];}};var findPosX=function(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break;}obj=obj.offsetParent;}}else{if(obj.x){curleft+=obj.x;}}return curleft;};var findPosY=function(obj){var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent){break;}obj=obj.offsetParent;}}else{if(obj.y){curtop+=obj.y;}}return curtop;};var uaContains=function(str){return(navigator.userAgent.indexOf(str)!=-1);};var onWheelHandler=function(event){var delta=0;if(!event){event=window.event;}if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera){delta=-delta;}}else{if(event.detail){delta=-event.detail*3;}}if(keepDeltaAtPlusMinusThree){if(delta>0){delta=3;}else{if(delta==0){delta=0;}else{delta=-3;}}}if(delta){var thisFlashMovieId=null;for(var j in f){if(f[j]!=null&&f[j]==event.currentTarget){thisFlashMovieId=j;}}var thisMouse;if(uaContains("Camino")){thisMouse={x:event.layerX,y:event.layerY};}else{if(uaContains("Firefox")){thisMouse={x:(event.layerX-findPosX(event.currentTarget)),y:(event.layerY-findPosY(event.currentTarget))};}else{thisMouse={x:event.offsetX,y:event.offsetY};}}thisMouse.ctrlKey=(uaContains("Mac"))?(event.metaKey||event.ctrlKey):event.ctrlKey;thisMouse.altKey=event.altKey;thisMouse.shiftKey=event.shiftKey;thisMouse.buttonDown=false;if(thisMovie(thisFlashMovieId).dispatchExternalMouseWheelEvent){thisMovie(thisFlashMovieId).dispatchExternalMouseWheelEvent(delta,thisMouse.x,thisMouse.y,thisMouse.ctrlKey,thisMouse.altKey,thisMouse.shiftKey,thisMouse.buttonDown);}}if(event.preventDefault){event.preventDefault();}event.returnValue=false;};return{initCaptureFor:function(aFlashObjectId){if(uaContains("Mac")||uaContains("Safari")){var parentdiv=document.getElementById(aFlashObjectId).parentNode;while(parentdiv!=null&&parentdiv.nodeName!="DIV"){parentdiv=parentdiv.parentNode;}if(parentdiv!=undefined&&parentdiv!=null){f[aFlashObjectId]=parentdiv;if(parentdiv.addEventListener){parentdiv.addEventListener("DOMMouseScroll",onWheelHandler,false);}parentdiv.onmousewheel=onWheelHandler;return true;}else{return false;}}else{return false;}}};}();Ext.ns("Sp");Ext.ns("Sp.fb");Ext.ns("Sp.ui");Ext.ns("Sp.form");Ext.ns("Sp.util");Ext.ns("Sp.vimeo");try{console.log();}catch(e){console={log:function(){},info:function(){},warn:function(){},error:function(){},debug:function(){}};}Ext.Element.prototype.update=function(html,loadScripts,callback){html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(Ext.isFunction(callback)){callback();}return this;}var id=Ext.id(),dom=this.dom;html+='<span id="'+id+'"></span>';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2];}hd.appendChild(s);}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2]);}else{window.eval(match[2]);}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el);}if(Ext.isFunction(callback)){callback();}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this;};Sp.Ajax={request:function(o){if(!o.url){throw"Sp.Ajax.request: Unspecified url";}if(!o.method){throw"Sp.Ajax.request: Unspecified method";}var helper=new Sp.Ajax.RequestHelper(o);return helper.fireRequest();}};Sp.Ajax.RequestHelper=function(o){this.o=o;};Sp.Ajax.RequestHelper.prototype={_callback:function(o,s,r){var j=Ext.decode(r.responseText);if(j===undefined){j={response:{status:{code:503,message:r.statusText}}};}var res=new Sp.AjaxResult(j);if(s&&res.isSuccess()){this._onSuccess(res,o);}else{this._onFailure(res,o);}},_onSuccess:function(r,o){if(this.o.success){this.o.success.call(this.o.scope,r,o);}},_onFailure:function(r,o){if(this.o["on_"+r.getStatusCode()]){this.o["on_"+r.getStatusCode()].call(this.o.scope,r,o);}else{if(this.o.failure){this.o.failure.call(this.o.scope,r,o);}else{}}},fireRequest:function(){var o={};Ext.apply(o,this.o);Ext.apply(o,{callback:this._callback,scope:this,success:undefined,failure:undefined},this.o);return Ext.Ajax.request(o);}};Sp.AjaxResult=function(r){this._result=r.response;};Sp.AjaxResult.prototype={getStatusCode:function(){return this._result.status.code;},getStatusMessage:function(){return this._result.status.message;},isSuccess:function(){return this.getStatusCode()===200;},get:function(n){if(this._result[n]){return this._result[n];}else{return null;}},getValidator:function(n){if(this._result[n]){return new Sp.AjaxResultValidator(this._result[n]);}else{return null;}}};Sp.AjaxResultValidator=function(r){this._result=r;};Sp.AjaxResultValidator.prototype={isValid:function(){return this._result.valid;},getErrors:function(){return this._result.errors;}};Sp.Api={METHOD_GET:"GET",METHOD_POST:"POST",METHOD_PUT:"PUT",METHOD_DELETE:"DELETE",getEpisode:function(show_id,episode_id,options){this._request(Sp.Config.API_URL+"/show/"+show_id+"/episode/"+episode_id,this.METHOD_GET,{},options);},getShow:function(show_id,options){this._request(Sp.Config.API_URL+"/show/"+show_id,this.METHOD_GET,{},options);},postEpisodeShare:function(show_id,episode_id,post_id,options){this._request(Sp.Config.API_URL+"/show/"+show_id+"/episode/"+episode_id+"/shares",this.METHOD_POST,{post_id:post_id},options);},createUser:function(options){this._request(Sp.Config.API_URL+"/users",this.METHOD_POST,{},options);},updateFacebookUserId:function(fb_user_id,options){this._request(Sp.Config.API_URL+"/facebook/user",this.METHOD_PUT,{fb_user_id:fb_user_id},options);},_request:function(url,method,params,options){Ext.ux.JSONP.request(url,{callbackKey:"jsoncallback",params:Ext.apply(params||{},{sf_format:"jsonp",sf_method:method,_dc:new Date().getTime()}),callback:function(o){if(o.response.error){if(options&&options.failure){options.failure.call(options.scope||window,o.response);}}else{if(options&&options.success){options.success.call(options.scope||window,o.response);}}}});}};Sp.Config={API_URL:"",SITE_URL:"",VALIDATION_URL:"",PLAYER_URL:"",UPLOADER_URL:"",UPLOADER_MAX_FILE_SIZE:"200 MB",FB_API_KEY:"",FB_SHARE_ICON:""};Sp.EventManager={_listeners:null,_resizeTask:null,_resizeFn:null,_scrollFn:null,onWindowResize:function(fn,s,o){this._initResize();this._listeners.on("resize",fn,s,o);},unWindowResize:function(fn,s){var h=this._listeners;if(h){h.un("resize",fn,s);if(!h.hasListener("resize")){this._destroyResize();}}},onWindowScroll:function(fn,s,o){this._initScroll();this._listeners.on("scroll",fn,s,o);},unWindowScroll:function(fn,s){var h=this._listeners;if(h){h.un("scroll",fn,s);if(!h.hasListener("scroll")){this._destroyScroll();}}},_initListeners:function(){if(!this._listeners){this._listeners=new Ext.util.Observable();this._listeners.addEvents("resize","scroll");}},_initScroll:function(){this._initListeners();if(!this._scrollFn){this._scrollFn=this._onWindowScroll.createDelegate(this);Ext.lib.Event.on(window,"scroll",this._scrollFn);}},_destroyScroll:function(){if(this._scrollFn){Ext.lib.Event.un(window,"scroll",this._scrollFn);this._scrollFn=null;}},_initResize:function(){this._initListeners();if(!this._resizeTask){this._resizeTask=new Ext.util.DelayedTask(this._doWindowResize,this);}if(!this._resizeFn){this._resizeFn=this._onWindowResize.createDelegate(this);Ext.lib.Event.on(window,"resize",this._resizeFn);}},_destroyResize:function(){if(this._resizeFn){Ext.lib.Event.un(window,"resize",this._resizeFn);this._resizeFn=null;}},_onWindowResize:function(){if(Ext.isIE||Ext.isAir){this._resizeTask.delay(50);}else{var D=Ext.lib.Dom;this._listeners.fireEvent("resize",D.getViewWidth(),D.getViewHeight());}},_doWindowResize:function(){var D,w,h;D=Ext.lib.Dom;w=D.getViewWidth();h=D.getViewHeight();this._listeners.fireEvent("resize",w,h);},_onWindowScroll:function(){this._listeners.fireEvent("scroll");}};Sp.fb.AuthFlash={_object:null,init:function(object){this._object=object;FB.ensureInit(this._onInitialized.createDelegate(this));FB.init(Sp.Config.FB_API_KEY,"/xd_receiver.htm",{});},requireSession:function(){FB.Connect.forceSessionRefresh();FB.Connect.requireSession(this._onRequestSessionSuccess.createDelegate(this),this._onRequestSessionFailure.createDelegate(this),true);},_onInitialized:function(){FB.Connect.forceSessionRefresh();},_onRequestSessionSuccess:function(){this._notifyUserConnected(FB.Facebook.apiClient.get_session());},_onRequestSessionFailure:function(){this._notifyUserDisconnected();},_notifyUserConnected:function(sessionRecord){if(this._object){try{this._object.onFacebookUserConnected(sessionRecord.session_key,sessionRecord.secret,sessionRecord.uid,sessionRecord.sig);}catch(exception){}}},_notifyUserDisconnected:function(){if(this._object){try{this._object.onFacebookUserDisconnected();}catch(exception){}}}};Sp.fb.Connect={_initialized:false,_listeners:[],init:function(){FB.ensureInit(this._onInitialized.createDelegate(this));FB.init(Sp.Config.FB_API_KEY,"/xd_receiver.htm");},addListener:function(fn){this._listeners.push(fn);},isInitialized:function(){return this._initialized;},_onInitialized:function(){this._initialized=true;FB.XFBML.Host.autoParseDomTree=false;Sp.fb.FBML._onInitialized();Ext.each(this._listeners,function(listener){listener.call();},this);this._listeners=[];}};Sp.fb.FBML={_initialized:false,_queue:[],parse:function(e){var el=Ext.get(e);if(this._initialized){this._parseElement(el);}else{this._queueElement(el);}},_onInitialized:function(){Ext.each(this._queue,this._parseElement,this);_initialized:true;},_parseElement:function(e){FB.XFBML.Host.parseDomElement(e.dom);},_queueElement:function(e){this._queue.push(e);}};Sp.fb.Share={_userId:null,shareEpisode:function(show_id,episode_id,user_hint){if(Sp.fb.Connect.isInitialized()){this._doShareEpisode(show_id,episode_id);}else{Sp.fb.Connect.addListener(this._doShareEpisode.createDelegate(this,[show_id,episode_id]));Sp.fb.Connect.init();}return false;},shareShow:function(show_url){if(Sp.fb.Connect.isInitialized()){FB.Connect.showShareDialog(show_url);}else{Sp.fb.Connect.addListener(FB.Connect.showShareDialog.createDelegate(this,[show_url]));Sp.fb.Connect.init();}return false;},_doShareEpisode:function(show_id,episode_id){Sp.Api.getEpisode(show_id,episode_id,{success:this._onGetEpisodeSuccess,failure:this._onGetEpisodeFailure,scope:this});},_onAuthFailure:function(){},_onGetEpisodeSuccess:function(response){var episode=response.episode;var show=episode.show;var name=show.title;if(episode.type==="LIVE"){name+=" - LIVE "+episode.published_at_locale;}else{if(episode.title){name+=" - "+episode.title;}}var description="";if(episode.description){description=episode.description;}else{if(show.description){description=show.description;}}var properties={Length:Math.ceil(episode.length/60000)+" min"};if(episode.type==="LIVE"&&episode.title){properties.Title=episode.title;}else{if(episode.type!=="LIVE"){properties.Recorded=episode.published_at_locale;}}var attachment={name:name,href:show.site_url,caption:Sp.Config.SITE_URL,description:description,properties:properties,media:[{type:"flash",swfsrc:Ext.urlEncode({AUTOPLAY:true,API_BASE_URL:Sp.Config.API_URL,STATION_URL:episode.api_url,DEBUG:false,EXTERNAL_INTERFACE:false,REFERRER:"www.facebook.com"},Sp.Config.PLAYER_URL+"?"),imgsrc:show.image?show.image.medium_url:Sp.Config.FB_SHARE_ICON,width:100,height:100,expanded_width:300,expanded_height:330}]};FB.Connect.streamPublish("",attachment,this._getActionLinks(),null,"Invite your friends to listen to this show",this._onEpisodeShared.createDelegate(this,[show.show_id,episode.episode_id],0));},_onGetEpisodeFailure:function(response){},_onEpisodeShared:function(show_id,episode_id,post_id,exception){if(!post_id||post_id==="null"){return;}if(this._userId!==null){this._doPostEpisodeShare(show_id,episode_id,post_id);return;}Sp.Api.createUser({success:function(response){if(response.user&&response.user.user_id){this._userId=response.user.user_id;}this._doPostEpisodeShare(show_id,episode_id,post_id);},scope:this});},_doPostEpisodeShare:function(show_id,episode_id,post_id){Sp.Api.postEpisodeShare(show_id,episode_id,post_id,{success:this._onPostEpisodeShareSuccess,failure:this._onPostEpisodeShareFailure,scope:this});},_onPostEpisodeShareSuccess:function(response){},_onPostEpisodeShareFailure:function(response){},_getActionLinks:function(){return[{text:"Create your own show",href:Sp.Config.SITE_URL+"/create"}];}};Sp.form.BaseForm=function(id,name,fo,so){this._form=Ext.get(id);this._formName=name;this._formOptions=Ext.isObject(fo)?fo:{};this._submitOptions=Ext.isObject(so)?so:{};this._init();this._registerHints();this._registerSubmits();};Sp.form.BaseForm.prototype={validate:function(){var h,i,t,U=Sp.util.Form;U.disableHintFields(this._form);U.disableFileFields(this._form);if(this._form.dom.enctype){t=this._form.dom.enctype;this._form.dom.enctype="";}Sp.Ajax.request({url:Sp.Config.VALIDATION_URL,method:"POST",form:this._form,success:this._onValidateSuccess.createDelegate(this),params:{formName:this._formName,formOptions:Ext.encode(this._formOptions)}});U.enableHintFields(this._form);U.enableFileFields(this._form);if(t){this._form.dom.enctype=t;}return false;},submit:function(){var U=Sp.util.Form,o=this._submitOptions;this._form.dom.action=this._getFormAction();if(o.submit_ajax===true){U.disableHintFields(this._form);Sp.Ajax.request(Ext.apply({url:this._form.dom.action,method:"POST",form:this._form,params:{formOptions:Ext.encode(this._formOptions)},success:this._onSubmitSuccess.createDelegate(this),failure:this._onSubmitFailure.createDelegate(this)},o));this._disable();this._toggleLoadingOnSubmits(true);U.enableHintFields(this._form);}else{U.clearHintFields(this._form);this._form.dom.submit();}},showErrors:function(es){var n=this._form.getAttribute("name");for(var i in es){if(es.hasOwnProperty(i)){var e=Ext.get(n+"_"+i);if(e){var cs=[];for(var j in es[i]){if(es[i].hasOwnProperty(j)){cs.push({tag:"li",html:es[i][j]});}}var x=Ext.DomHelper.insertAfter(e,{tag:"ul","class":"error_list",children:cs},true);}}}},clearErrors:function(){var es=this._form.select("ul.error_list");var l=es.getCount();for(var i=0;i<l;i++){es.item(i).remove();}},_getFormAction:function(){var s=this._form.dom.action.indexOf("/block");if(s!==-1){return this._form.dom.action.substring(0,s)+this._form.dom.action.substring(s+6);}return this._form.dom.action;},_onValidateSuccess:function(r,ro){var v=r.getValidator("validator");if(v){this.clearErrors();if(v.isValid()){this.submit();}else{this.showErrors(v.getErrors());}}},_onSubmitSuccess:function(r,ro){this._toggleLoadingOnSubmits(false);this._enable();var h=r.get("html");if(h&&this._submitOptions&&this._submitOptions.submit_container){Ext.fly(this._submitOptions.submit_container).update(h,true);}},_onSubmitFailure:function(){this._toggleLoadingOnSubmits(false);this._enable();},_init:function(){},_disable:function(){Ext.each(this._getDomElements(),function(el){Sp.util.Form.disableField(el);},this);},_enable:function(){Ext.each(this._getDomElements(),function(el){Sp.util.Form.enableField(el);},this);},_registerHints:function(){Ext.each(this._getDomElements(),function(el){el=Ext.get(el);var h=el.getAttributeNS("sp","hint");if(h){el.on({"focus":{fn:this._onElementFocus,scope:this},"blur":{fn:this._onElementBlur,scope:this}});Sp.util.Form.showHint(el);}},this);},_registerSubmits:function(){this._form.on("submit",this._onSubmitClick,this);this._form.select("input[type=submit]").on("click",this._onSubmitClick,this);this._form.select("a").each(function(el){if(el.getAttributeNS("sp","type")==="submit"){el.on("click",this._onSubmitClick,this);}},this);},_getDomElements:function(){return this._form.elements||(document.forms[this._form]||Ext.getDom(this._form)).elements;},_onElementFocus:function(e){Sp.util.Form.hideHint(e.getTarget());},_onElementBlur:function(e){Sp.util.Form.showHint(e.getTarget());},_onSubmitClick:function(e){var t=e.getTarget(undefined,undefined,true);var a=t.getAttributeNS("sp","action");if(a){this._form.dom.action=a;}e.preventDefault();this.validate();},_toggleLoadingOnSubmits:function(v){this._form.select("div").each(function(el){if(el.getAttributeNS("sp","type")==="submit"){if(v){if(!el.hasClass("loading")){el.addClass("loading");}}else{if(el.hasClass("loading")){el.removeClass("loading");}}}},this);}};Sp.form.EpisodeUpload=Ext.extend(Sp.form.BaseForm,{_init:function(){var btn=this._form.child("span");this._formField=Ext.get(btn.getAttributeNS("sp","field_id"));this._uploader=new Sp.ui.Uploader({id:btn.id,url:this._getFormAction(),autoStart:Sp.util.Types.convertBoolean(btn.getAttributeNS("sp","auto_start")),multiple:Sp.util.Types.convertBoolean(btn.getAttributeNS("sp","multiple")),types:btn.getAttributeNS("sp","types")?btn.getAttributeNS("sp","types").split(","):[]});this._uploaderView=new Sp.ui.UploaderView({container:this._form.parent(),uploader:this._uploader});this._uploader.on({"file.queue.success":{fn:this._onFileQueueSuccess,scope:this},"queue.flushed":{fn:this._onQueueFlushed,scope:this},"selection.close":{fn:this._onSelectionClose,scope:this},"file.success":{fn:this._onFileUploadSuccess,scope:this},"complete":{fn:this._onUploadComplete,scope:this}});},_onFileQueueSuccess:function(f){var files=this._formField.getValue();if(files===""){files=f.name;}else{files=files+","+f.name;}this._formField.set({value:files});},_onQueueFlushed:function(){this._formField.set({value:""});},_onUploadComplete:function(){this._formField.set({value:""});this._enable();},_onFileUploadSuccess:function(){this._form.parent().setVisibilityMode(Ext.Element.DISPLAY).hide();var n=this._form.parent().prev("div.notification");if(n!==null){n.setVisibilityMode(Ext.Element.DISPLAY).show();}},_onSelectionClose:function(n){if(n>0){this.validate();}},_onValidateSuccess:function(r,ro){var v=r.getValidator("validator");if(!v){return;}this.clearErrors();if(v.isValid()){this._uploader.start(this._getPostParameters());this._disable();}else{this.showErrors(v.getErrors());this._uploaderView.removeFiles();}},_getPostParameters:function(){var fields=Ext.urlDecode(Ext.Ajax.serializeForm(this._form));delete fields.file;fields.type="EPISODE";return fields;}});Sp.form.ImageUpload=Ext.extend(Sp.form.BaseForm,{_onSubmitClick:function(e){var t=e.getTarget(undefined,undefined,true);var a=t.getAttributeNS("sp","action");if(a){this._form.dom.action=a;}e.preventDefault();this.submit();}});Sp.form.InviteContactList=Ext.extend(Sp.form.BaseForm,{_onSubmitClick:function(e){var t=e.getTarget(undefined,undefined,true);var a=t.getAttributeNS("sp","action");if(a){this._form.dom.action=a;}e.preventDefault();this.submit();}});Sp.form.Login=Ext.extend(Sp.form.BaseForm,{_onSubmitClick:function(e){var t=e.getTarget(undefined,undefined,true);var a=t.getAttributeNS("sp","action");if(a){this._form.dom.action=a;}e.preventDefault();this.submit();}});Sp.form.RadioSendMessage=Ext.extend(Sp.form.BaseForm,{_toggleLoadingOnSubmits:function(v){}});Sp.form.ShowSendMessage=Ext.extend(Sp.form.BaseForm,{_toggleLoadingOnSubmits:function(v){}});Sp.ui.Anim={toggle:function(e,b,boc,bcc,bol,bcl){e=Ext.fly(e);if(e.isVisible()){this.close(e,b,boc,bcc,bol);}else{this.open(e,b,boc,bcc,bcl);}return false;},open:function(e,b,boc,bcc,bcl){Ext.fly(e).slideIn("t",{useDisplay:true});if(b){b=Ext.fly(b);if(boc){b.removeClass(boc);}if(bcc){b.addClass(bcc);}if(bcl){b.update(bcl);}}return false;},close:function(e,b,boc,bcc,bol){Ext.fly(e).slideOut("t",{useDisplay:true});if(b){b=Ext.fly(b);if(bcc){b.removeClass(bcc);}if(boc){b.addClass(boc);}if(bol){b.update(bol);}}return false;},remove:function(e){Ext.fly(e).fadeOut({useDisplay:true,remove:true});return false;}};Sp.ui.Countdown={startCountdown:function(left,c,s){c.call(s||this,this._toObject(left));setInterval(this._notifyCountdown.createDelegate(this,[left,(new Date()).getTime(),c,s||this]),1000);return true;},startCountdownUpdate:function(left,e){e=Ext.get(e);if(!e){return false;}e.update(this._toString(left));setInterval(this._updateCountdown.createDelegate(this,[left,(new Date()).getTime(),e]),1000);return true;},_updateCountdown:function(left,start,element){var now=(new Date()).getTime();left-=Math.round((now-start)/1000);element.update(this._toString(left));},_notifyCountdown:function(left,start,callback,scope){var now=(new Date()).getTime();left-=Math.round((now-start)/1000);callback.call(scope,this._toObject(left));},_toObject:function(left){var o={};if(left>0){o.days=Math.floor(left/(60*60*24));left-=o.days*60*60*24;o.hours=Math.floor(left/(60*60));left-=o.hours*60*60;o.minutes=Math.floor(left/60);left-=o.minutes*60;o.seconds=left;}else{o.days=0;o.hours=0;o.minutes=0;o.seconds=0;}o.daysLabel=o.days===1?"day":"days";o.hoursLabel=o.hours===1?"hour":"hours";o.minutesLabel=o.minutes===1?"minute":"minutes";o.secondsLabel=o.seconds===1?"second":"seconds";return o;},_toString:function(left){var o=this._toObject(left);var text="";if(o.days>0){text+=o.days+" "+o.daysLabel+" ";}if(o.hours>0){text+=o.hours+" "+o.hoursLabel+" ";}if(o.minutes>0){text+=o.minutes+" "+o.minutesLabel+" ";}if(o.seconds>=0){text+=o.seconds+" "+o.secondsLabel;}return text;}};Sp.ui.Dialog={confirmText:"Confirm",yesText:"Yes",noText:"No",loadingText:"Loading...",_lightbox:null,remote:function(u,fn,scope){var l=this._getLightbox();var c=l.getContainer();c.update("<h1>"+this.loadingText+"</h1>");var o={sp_fn:fn,sp_scope:scope,single:true,stopEvent:true};o.sp_hide=this._onCancelClick.createDelegate(this,[null,null,o]);l.on("hide",o.sp_hide,this,{single:true});l.show();Sp.Ajax.request({url:u,method:"GET",success:function(r,o){c.update(r.get("html"),true);l.resize();},scope:this});return false;},confirm:function(msg,fn,scope){var l=this._getLightbox();var c=l.getContainer();var id=c.id;Ext.DomHelper.overwrite(c,"<h1>"+this.confirmText+"</h1>"+"<p>"+msg+"</p>"+'<div id="lightbox_footer">'+this._createButtonMarkup(id+"_button_no",this.noText)+this._createButtonMarkup(id+"_button_yes",this.yesText)+'<div class="clear"></div>'+"</div>");var o={sp_fn:fn,sp_scope:scope,single:true,stopEvent:true};o.sp_hide=this._onCancelClick.createDelegate(this,[null,null,o]);l.on("hide",o.sp_hide,this,{single:true});Ext.fly(id+"_button_no").on("click",this._onCancelClick,this,o);Ext.fly(id+"_button_yes").on("click",this._onYesClick,this,o);l.show();},_getLightbox:function(){if(this._lightbox===null){this._lightbox=new Sp.ui.Lightbox();}return this._lightbox;},_createButtonMarkup:function(id,l){return'<div class="button">'+'<a id="'+id+'" href="#"><span>'+l+"</span></a>"+"</div>";},_onYesClick:function(e,t,o){if(o.sp_hide){this._getLightbox().un("hide",o.sp_hide,this);}if(o.sp_fn){o.sp_fn.call(o.sp_scope||this,"yes");}this._getLightbox().hide();},_onCancelClick:function(e,t,o){if(o.sp_hide){this._getLightbox().un("hide",o.sp_hide,this);}if(o.sp_fn){o.sp_fn.call(o.sp_scope||this,"cancel");}this._getLightbox().hide();}};Sp.ui.Lightbox=function(c){this.addEvents("show","hide");Sp.ui.Lightbox.superclass.constructor.call(this,c);this._init();};Ext.extend(Sp.ui.Lightbox,Ext.util.Observable,{width:300,opacity:0.85,duration:0.2,_initialized:false,_overlay:null,_lightbox:null,_container:null,getContainer:function(){return this._container;},resize:function(){this._resizeOverlay();this._resizeLightbox();},show:function(){this.resize();this._overlay.fadeIn({duration:this.duration,endOpacity:this.opacity,callback:this._onShow,scope:this});},hide:function(){Ext.fly(document).un("keydown",this._onKeyDown,this);Sp.EventManager.unWindowResize(this.resize,this);Sp.EventManager.unWindowScroll(this._resizeLightbox,this);this._lightbox.hide();this._container.update("");this._overlay.fadeOut({duration:this.duration});this.fireEvent("hide",this);},_init:function(){if(this._initialized){return;}this._initMarkup();this._initEvents();this._initialized=true;},_initMarkup:function(){this._overlay=Ext.get("lightbox_overlay");if(!this._overlay){this._overlay=Ext.DomHelper.append(document.body,{id:"lightbox_overlay"},true);}this._lightbox=Ext.get("lightbox");if(!this._lightbox){this._lightbox=Ext.DomHelper.append(document.body,{id:"lightbox"},true);}this._container=Ext.get("lightbox_container");if(!this._container){this._container=Ext.DomHelper.append(this._lightbox,{id:"lightbox_container"},true);}this._overlay.setVisibilityMode(Ext.Element.DISPLAY);this._lightbox.setVisibilityMode(Ext.Element.DISPLAY);this._overlay.hide();this._lightbox.hide();},_initEvents:function(){this._overlay.on("click",this.hide,this);},_resizeLightbox:function(){var l=this._lightbox;var c=this._container;var h;if(!l.isVisible()){c.setStyle({width:this.width+"px",top:"0px",left:"-1000px"});l.show();h=c.getHeight();l.hide();}else{h=c.getHeight();}var s=Ext.fly(document).getScroll();var t=s.top+((Ext.lib.Dom.getViewportHeight()-h)/2);l.setStyle({top:t+"px"});},_resizeOverlay:function(){var D=Ext.lib.Dom;this._overlay.setStyle({height:D.getDocumentHeight()+"px"});},_onKeyDown:function(e){if(e.getKey()===27){this.hide();}},_onShow:function(){this._lightbox.show();Ext.fly(document).on("keydown",this._onKeyDown,this);Sp.EventManager.onWindowResize(this.resize,this);Sp.EventManager.onWindowScroll(this._resizeLightbox,this);this.fireEvent("show",this);},_stopEvent:function(e){e.stopEvent();}});Sp.ui.Link={go:function(url,id,o){o=o||{};if(!this._onBefore(url,id,o)){return false;}Sp.Ajax.request({url:url,method:"GET",success:function(r,o){var e=Ext.get(id);e.update(r.get("html"),true);}});return false;},_onBefore:function(url,id,o){if(o.confirm){Sp.ui.Dialog.confirm(o.confirm,function(r){if(r==="yes"){delete o.confirm;this.go(url,id,o);}},this);return false;}return true;}};Sp.ui.Pager={go:function(url,id){Sp.Ajax.request({url:url,method:"GET",success:function(r,o){var e=Ext.get(id);e.update(r.get("html"),true);}});}};Sp.ui.Player={_button:null,_player:null,_state:"STOP",_station:null,_detachWindow:null,_detachState:"STOP",_detachPlayer:null,_detachStation:null,_monitorTask:null,_isPopup:false,play:function(u,e){var p=this._getPlayer();var b=this._button;if(p){e=e?Ext.get(e):null;if(b&&(!e||b.id!==e.id)){this._updateButton("PLAY");}this._button=e;p.stationPlay(u);this.focus();}return false;},stop:function(){var p=this._getPlayer();if(p){p.stationStop();}return false;},playToggle:function(u,e){var b=this._button;e=e?Ext.get(e):null;if(!e){if(this._getPlayerState()==="STOP"){this.play(u);}else{this.stop();}}else{if(b&&b.id===e.id){if(this._getPlayerState()==="STOP"){this.play(u,e);}else{this.stop();}}else{this.play(u,e);}}return false;},isPlaying:function(){return this._getPlayerState()!=="STOP";},isDetached:function(){var w=this._detachWindow;return(w&&!w.closed);},focus:function(){if(this.isDetached()){this._detachWindow.focus();}},enable:function(){var p=this._getPlayer();if(p){p.enablePlayer();}},disable:function(){var p=this._getPlayer();if(p){p.disablePlayer();}},detach:function(u){if(this.isDetached()){this.focus();return;}if(!u){u="http://"+document.domain+"/listen/standalone";}if(this._getPlayerStation()){u+="?"+Ext.urlEncode({station_url:this._getPlayerStation()});}var w=window.open(u,"detach","width=300,height=330,left=0,top=0,screenX=0,screenY=0");},notify:function(p,s,o){if(this._isPopup&&window.opener&&!window.opener.closed){if(s==="READY"){o={window:window};}window.opener.Sp.ui.Player.notify(null,s,o);return;}switch(s){case"READY":this._onPlayerReady(s,o);break;case"CONNECTING":case"BUFFERING":this._setPlayerState("CONNECTING");this._updateButton("LOADING");break;case"PLAY":this._setPlayerState("PLAY");this._updateButton("STOP");break;case"STOP":case"ERROR":this._setPlayerState("STOP");this._updateButton("PLAY");break;case"STATION_CHANGE":this._onPlayerStationChange(s,o);break;}},_getPlayer:function(){if(this.isDetached()){if(!this._detachPlayer){this._detachPlayer=this._detachWindow.swfobject.getObjectById("player_swf");}return this._detachPlayer;}else{if(!this._player){this._player=swfobject.getObjectById("player_swf");}return this._player;}},_setPlayerState:function(s){if(this.isDetached()){this._detachState=s;}else{this._state=s;}},_getPlayerState:function(){if(this.isDetached()){return this._detachState;}else{return this._state;}},_setPlayerStation:function(s){if(this.isDetached()){this._detachStation=s;}else{this._station=s;}},_getPlayerStation:function(){if(this.isDetached()){return this._detachStation;}else{return this._station;}},_updateButton:function(s){var b=this._button;if(b){b.removeClass(["play","stop","loading"]);b.addClass(s.toLowerCase());if(b.first("a")&&b.first("a").first("span")){b.first("a").first("span").dom.innerHTML=s.toLowerCase();}}},_onPlayerReady:function(s,o){if(o&&o.window){var playing=this.isPlaying();var station=this._getPlayerStation();this.stop();this.disable();var d=Ext.fly("player_detach");if(d){d.addClass("hidden");}this._detachWindow=o.window;if(playing&&station){this._detachWindow.Sp.ui.Player.play(station);}this._startPopupMonitor();}},_onPlayerStationChange:function(s,o){if(o&&o.url){this._setPlayerStation(o.url);}else{this._setPlayerStation(null);}},_onPlayerUndetach:function(){this._detachWindow=null;this._detachState="STOP";this._detachPlayer=null;this._detachStation=null;if(this._button){this._updateButton("PLAY");this._button=null;}this.enable();var d=Ext.fly("player_detach");if(d){d.removeClass("hidden");}},_onPopupReady:function(){this._isPopup=true;},_onPopupUnload:function(){if(window.opener&&!window.opener.closed){window.opener.Sp.ui.Player._onPlayerUndetach();}},_startPopupMonitor:function(){if(Ext.isOpera){if(!this._monitorTask){this._monitorTask=Ext.TaskMgr.start({run:this._onPopupMonitor,scope:this,interval:1000});}}},_stopPopupMonitor:function(){if(!this._monitorTask){Ext.TaskMgr.stop(this._monitorTask);this._monitorTask=null;}},_onPopupMonitor:function(){var w=this._detachWindow;if(!w||w.closed){this._stopPopupMonitor();this._onPlayerUndetach();}}};Sp.ui.Show={updatePlay:function(card_id,visible){if(visible){Ext.fly(card_id+"_play").removeClass("hidden");}else{Ext.fly(card_id+"_play").addClass("hidden");}},updateStatus:function(card_id,text){var e=Ext.fly(card_id+"_status");if(e){e.dom.innerHTML=text;}},updateEpisodeTitle:function(card_id,title){var e=Ext.fly(card_id+"_status");if(e){e.parent().dom.innerHTML="<h5>"+title+"</h5>";}}};Sp.ui.Spml={parseLink:function(e){if(!e){return;}Ext.fly(e).select("a").each(function(a){var r=a.getAttributeNS("sp","redirect");if(r){a.on("click",function(ev){ev.stopEvent();window.location=r;});}});}};Sp.ui.Uploader=function(o){this._o=o;this._files=[];this._cookies=Sp.util.Cookies.getCookies();this._uploader=new SWFUpload({upload_url:this._o.url,flash_url:Sp.Config.UPLOADER_URL,file_size_limit:Sp.Config.UPLOADER_MAX_FILE_SIZE,file_types:this._getFileTypes().join(";"),file_types_description:"("+this._getFileTypes().join(", ")+")",file_upload_limit:"0",file_queue_limit:"0",button_image_url:"/images/bg_btn_upload.jpg",button_placeholder_id:this._o.id,button_width:100,button_height:19,button_text:'<span class="label">Select file</span>',button_text_style:".label { color: #ffffff; font-size: 12; font-weight: bold; text-align: center; font-family: Arial; }",button_text_top_padding:1,button_text_left_padding:0,button_cursor:SWFUpload.CURSOR.HAND,button_action:this._o.multiple===true?SWFUpload.BUTTON_ACTION.SELECT_FILES:SWFUpload.BUTTON_ACTION.SELECT_FILE,swfupload_loaded_handler:this.onLoadedHandler.createDelegate(this),file_dialog_start_handler:this._onDialogStartHandler.createDelegate(this),file_queued_handler:this._onFileQueuedHandler.createDelegate(this),file_queue_error_handler:this._onQueueErrorHandler.createDelegate(this),file_dialog_complete_handler:this._onDialogCompleteHandler.createDelegate(this),upload_start_handler:this._onUploadStartHandler.createDelegate(this),upload_progress_handler:this._onUploadProgressHandler.createDelegate(this),upload_error_handler:this._onUploadErrorHandler.createDelegate(this),upload_success_handler:this._onUploadSuccessHandler.createDelegate(this),upload_complete_handler:this._onUploadCompleteHandler.createDelegate(this)});this.addEvents({"start":true,"queue.flushed":true,"selection.open":true,"selection.close":true,"file.queue.success":true,"file.queue.failure":true,"file.start":true,"file.abort":true,"file.progress":true,"file.success":true,"file.failure":true,"complete":true});};Ext.extend(Sp.ui.Uploader,Ext.util.Observable,{start:function(params){if(this._files.length==0){return;}this.fireEvent("start",this._files);var p={spreaker:this._cookies.spreaker,sf_format:"json"};if(params){Ext.apply(p,params);}if(this._o.onAddCustomParam){Ext.apply(p,this._o.onAddCustomParam.call(this._o.scope));}this._uploader.setPostParams(p);var file=this._files.shift();this._uploader.setButtonDisabled(true);this._uploader.startUpload(file.id);},abort:function(f){this._log("Aborting "+f.name);this._uploader.cancelUpload(f.id,false);this.fireEvent("file.abort",f);},onLoadedHandler:function(){},_onDialogStartHandler:function(){this._log("Upload queue flushed");this._uploader.cancelQueue();this._files=[];this.fireEvent("queue.flushed");this.fireEvent("selection.open");},_onFileQueuedHandler:function(f){this._log("Added file to upload queue: "+f.name+" ("+f.id+")");this._files.push(f);this.fireEvent("file.queue.success",f);},_onQueueErrorHandler:function(f,c,m){this._log("file_queue_error_handler: code: "+c+" message: "+m);this.fireEvent("file.queue.failure",f,c,this._getErrorMessage(c,m));},_onDialogCompleteHandler:function(ns,nq,tq){this.fireEvent("selection.close",nq);if(this._o.autoStart){this.start();}},_onUploadStartHandler:function(f){this._log("Start uploading file "+f.name);this.fireEvent("file.start",f);},_onUploadProgressHandler:function(f,l,t){this.fireEvent("file.progress",f,l,t);},_onUploadErrorHandler:function(f,c,m){if(c===SWFUpload.UPLOAD_ERROR.FILE_CANCELLED){return;}this._log("upload_error_handler: "+f.name+" code: "+c+" message: "+m);this.fireEvent("file.failure",f,c,this._getErrorMessage(c,m));},_onUploadSuccessHandler:function(f,d,r){this._log("Upload success for file "+f.name);this.fireEvent("file.success",f);},_onUploadCompleteHandler:function(f){if(this._files.length>0){var file=this._files.shift();this._log(f.name+" upload complete, starting "+file.name);this._uploader.startUpload(file.id);}else{this._uploader.setButtonDisabled(false);this._log("Files upload complete");this.fireEvent("complete");}},_getErrorMessage:function(code,message){var Q=SWFUpload.QUEUE_ERROR;var U=SWFUpload.UPLOAD_ERROR;switch(code){case Q.FILE_EXCEEDS_SIZE_LIMIT:return"The file size exceeds allowed limit ("+Sp.Config.UPLOADER_MAX_FILE_SIZE+").";case Q.ZERO_BYTE_FILE:return"The file empty: you cannot upload empty files.";case Q.INVALID_FILETYPE:return"The file type/format is unsupported. We currently support "+this._getFileTypes().join(", ")+".";}switch(code){case U.HTTP_ERROR:switch(message){case"403":return"The request is unauthenticated. Please, contact Spreaker support.";}break;case U.IO_ERROR:return"A network error occured while trasmitting the file.";case U.FILE_CANCELLED:return"The file upload has been aborted.";case U.UPLOAD_STOPPED:return"The file upload has been stopped.";}return"Unable to upload this file.";},_getFileTypes:function(){var types=this._o.types||[];if(types.length===0){types.push("*.*");return types;}for(var i in types){if(types.hasOwnProperty(i)){if(types[i].substr(0,2)!=="*."){types[i]="*."+types[i];}}}return types;},_log:function(msg){if(true){console.log(msg);}}});Sp.ui.UploaderView=function(o){Ext.apply(this._options,o,{waitText:"Waiting ...",successMessage:"The file has been successfully uploaded."});this._container=Ext.get(o.container);this._container.addClass("uploader");this._uploader=o.uploader;this._uploader.on({"file.queue.success":{fn:this._onFileQueueSuccess,scope:this},"file.queue.failure":{fn:this._onFileQueueFailure,scope:this},"file.start":{fn:this._onFileStart,scope:this},"file.progress":{fn:this._onFileProgress,scope:this},"file.success":{fn:this._onFileSuccess,scope:this},"file.failure":{fn:this._onFileFailure,scope:this},"file.abort":{fn:this._onFileAbort,scope:this}});};Sp.ui.UploaderView.prototype={_options:{},_container:null,_uploader:null,_files:{},addFile:function(file){this._files[file.id]=this._createFileView(this._container,file);},removeFile:function(file){var f=this._files[file.id];if(f){f.abortEl.removeAllListeners();f.containerEl.remove();delete this._files[file.id];}},removeFiles:function(){for(var i in this._files){if(this._files.hasOwnProperty(i)){this.removeFile({id:i});}}},_createFileView:function(c,f){c=Ext.DomHelper.append(c,'<div class="file"></div>',true);Ext.DomHelper.append(c,"<h4>"+f.name+"</h4>",true);var m=Ext.DomHelper.append(c,"<p></p>",true).setVisibilityMode(Ext.Element.DISPLAY).hide();var a=Ext.DomHelper.append(c,'<div class="abort"></div>',true).setVisibilityMode(Ext.Element.DISPLAY);var p=Ext.DomHelper.append(c,'<div class="progress"></div>',true).setVisibilityMode(Ext.Element.DISPLAY);var b=Ext.DomHelper.append(p,'<span class="bar"></span>',true);var s=Ext.DomHelper.append(p,'<span class="status">'+this._options.waitText+"</span>",true).setVisibilityMode(Ext.Element.DISPLAY);Ext.DomHelper.append(c,'<div class="clear"></div>');a.on("click",this._uploader.abort.createDelegate(this._uploader,[f]));return{containerEl:c,messageEl:m,abortEl:a,progressEl:p,statusEl:s,barEl:b};},_onFileQueueSuccess:function(file){this.addFile(file);},_onFileQueueFailure:function(file,code,message){this.addFile(file);this._onFileFailure(file,code,message);},_onFileStart:function(file){var f=this._files[file.id];if(!f){return;}f.statusEl.hide();f.progressEl.show();f.abortEl.show();},_onFileProgress:function(file,loaded,total){var f=this._files[file.id];if(!f){return;}var w=Math.min(Math.round((loaded/total*100)),100);f.barEl.setStyle({width:""+w+"%"});},_onFileSuccess:function(file){var f=this._files[file.id];if(!f){return;}f.containerEl.addClass("success");f.progressEl.hide();f.abortEl.hide();f.messageEl.dom.innerHTML=this._options.successMessage;f.messageEl.show();},_onFileFailure:function(file,code,message){var f=this._files[file.id];if(!f){return;}f.containerEl.addClass("failure");f.progressEl.hide();f.abortEl.hide();f.messageEl.dom.innerHTML=message;f.messageEl.show();},_onFileAbort:function(file){var f=this._files[file.id];if(!f){return;}f.containerEl.slideOut("t",{remove:true});this.removeFile(file);}};Sp.ui.Window={open:function(u,w,h){window.open(u,"detach","width="+w+",height="+h+",menubar=no,toolbar=no");try{if(pageTracker){pageTracker._trackPageview(u);}}catch(e){}return false;}};Sp.util.Array={count:function(o){var count=0;for(var k in o){if(o.hasOwnProperty(k)){count++;}}return count;}};Sp.util.Cookies={getCookies:function(){var cookies={};var c=document.cookie+";";var re=/\s?(.*?)=(.*?);/g;var matches;while((matches=re.exec(c))!==null){var name=matches[1];var value=matches[2];cookies[matches[1]]=matches[2];}return cookies;}};Sp.util.Form={HINT_CSS:"hint",LOADING_CSS:"loading",FOCUS_CSS:"focus",showHint:function(e){e=Ext.fly(e);var h=e.getAttributeNS("sp","hint");if(h&&e.dom.value===""){e.dom.value=h;e.addClass(this.HINT_CSS);}},hideHint:function(e){e=Ext.fly(e);if(e.hasClass(this.HINT_CSS)){e.dom.value="";e.removeClass(this.HINT_CSS);}},showFocus:function(e){e=Ext.fly(e).up("fieldset",2);if(e){e.addClass(this.FOCUS_CSS);}},hideFocus:function(e){e=Ext.fly(e).up("fieldset",2);if(e){e.removeClass(this.FOCUS_CSS);}},clearField:function(e){e=Ext.fly(e);if(e.dom.value){e.dom.value="";}},disableField:function(e){Ext.fly(e).dom.disabled=true;},enableField:function(e){Ext.fly(e).dom.disabled=false;},disableHintFields:function(f){f.select(".hint").each(this.disableField);},enableHintFields:function(f){f.select(".hint").each(this.enableField);},clearHintFields:function(f){f.select(".hint").each(this.clearField);},disableFileFields:function(f){f.select('input[type="file"]').each(this.disableField);},enableFileFields:function(f){f.select('input[type="file"]').each(this.enableField);},onMultiLevelSelectChange:function(p,c,v){var val=Ext.fly(p).getValue();c=Ext.fly(c);c.dom.options.length=1;if(v[val]===null||v[val]===[]){c.dom.disabled=true;return;}c.dom.disabled=false;for(var key in v[val]){if(v[val].hasOwnProperty(key)){Ext.DomHelper.append(c,{tag:"option",value:key,html:v[val][key]});}}},toggleAllCheckboxes:function(f,v){f.select('input[type="checkbox"]').each(function(el){el.dom.checked=v;});return false;}};Sp.util.Types={convertBoolean:function(s){return s==="true"?true:false;},convertInt:function(s){return parseInt(s,10);},convertFloat:function(s){return parseFloat(s);}};Sp.vimeo.Embed={showVideo:function(c,url,w,h){c=Ext.get(c);url=Ext.urlEncode({server:"vimeo.com",show_title:0,show_byline:0,show_portrait:0,color:"1aab00",fullscreen:1},url);swfobject.embedSWF(url,c.id,w,h,"8.0.0");return false;}};