Ext=ex=an={};_1={};window["undefined"]=window["undefined"];an.apply=function(d,e,b){if(b){an.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var idSeed=0,ua=navigator.userAgent.toLowerCase(),isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isSafari4=isSafari&&ua.indexOf("version/4")>-1&&ua.indexOf("safari")>-1,isChrome=ua.indexOf("chrome")>-1,isIE=ua.indexOf("msie")>-1,isIE7=ua.indexOf("msie 7")>-1,isIE8=ua.indexOf("msie 8")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isFF3=isGecko&&ua.indexOf("firefox/3")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0,accumulate=function(isArray){return(isArray)?function(o,el,i){o.push(el)}:function(o,el,i){o[i]=el}};if(isIE&&!(isIE7||isIE8)){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}an.apply(an,{isStrict:isStrict,isSecure:isSecure,isLoaded:false,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http://extjs.com/s.gif",emptyFn:function(){},identity:function(x){return x},echo:function(msg){console.log(msg);return msg},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},id:function(el,prefix){prefix=prefix||"an-gen";el=an.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){an.override(sb,o)};sbp.override=io;an.override(sb,overrides);return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval("if (typeof "+rt+' == "undefined"){'+rt+" = {};} o = "+rt+";");for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}},urlEncode:function(o){if(!o){return""}var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=="undefined"){buf.push(k,"=&")}else{if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&")}else{if(ov instanceof Array){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&")}}else{buf.push(k,"=&")}}}}}buf.pop();return buf.join("")},urlDecode:function(string,overwrite){if(!string||!string.length){return{}}var obj={};var pairs=string.split("&");var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value}else{if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else{obj[name].push(value)}}}else{obj[name]=value}}return obj},getDom:function(el){if(!el){return null}return el.dom?el.dom:(typeof el=="string"?document.getElementById(el):el)},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==="":false)},each:function(els,fn){var p,i=0,l=els.length,each;if(each=els.each){each.call(els,fn)}else{if(typeof l=="undefined"){for(p in els){if(fn(els[p],p)==false){break}}}else{for(;i<l;i++){if(fn(els[i],i,l)==false){break}}}}return els},reverse:function(els,fn){var l=els.length,i=l-1;for(;i>=0;i--){if(fn(els[i],i,l)==false){break}}return els},filterEach:function(els,checkFn,fn){var p,i=0,l=els.length,each;if(typeof l=="undefined"){for(p in els){if(checkFn(els[p],p)&&(fn(els[p],p)==false)){break}}}else{for(;i<l;i++){if(checkFn(els[i],i,l)&&fn(els[i],i,l)==false){break}}}return els},map:function(els,fn){var isArray=(!(typeof els.length=="undefined")),ret=(isArray)?[]:{},add=accumulate(isArray);an.each(els,function(el,i){add(ret,fn.apply(fn,Array.prototype.slice.call(arguments)),i)});return ret},filter:function(els,fn){var isArray=(!(typeof els.length=="undefined")),ret=(isArray)?[]:{},add=accumulate(isArray);an.each(els,function(el,i){(fn.apply(fn,Array.prototype.slice.call(arguments)))&&add(ret,el,i)});return ret},checkResponse:function(s){an.checkLogin(s);s=an.safeDecode(s);return((s.responses&&s.responses[0]&&s.responses[0]["object"]&&s.responses[0]["object"]["error"]&&s.responses[0]["object"]["error"]===true)||s.error===true)?"false":s},checkLogin:function(s){if(s=='{"notloggedin":true}'||s=='{"notactive":true}'||(typeof s=="object"&&s.notloggedin==true)){an.redirectToLoginPage()}},redirectToLoginPage:function(){window.location.assign(an.translateURI("/login")+"?redirect="+encodeURIComponent(window.location.pathname+window.location.search+window.location.hash))},safeDecode:function(s){if(s===null||typeof s=="undefined"||s=="false"||s===false){return"false"}try{s=an.decode(s)}catch(e){s="false"}return s},translateURI:function(uri){return(_1._frontController==""||typeof _1._frontController=="undefined")?uri:("/"+_1._frontController+((uri=="/")?"":uri))},isOpera:isOpera,isSafari:isSafari,isIE:isIE,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isBorderBox:isBorderBox,isWindows:isWindows,isLinux:isLinux,isMac:isMac,isBrowserSupported:isFF3||isChrome||isSafari4,useShims:((isIE&&!isIE7)||(isGecko&&isMac))});an.namespace("an","an.util","an.dd","an.lib","an.functions","an.post");an.apply(Function.prototype,{curry:function(){var fn=this,args=Array.prototype.slice.call(arguments);return function(){return fn.apply(this,args.concat(Array.prototype.slice.call(arguments)))}},createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args)}},createDelegate:function(obj,args,appendArgs){var method=this;return function(){var callArgs=args||arguments;if(appendArgs===true){callArgs=Array.prototype.slice.call(arguments,0);callArgs=callArgs.concat(args)}else{if(typeof appendArgs=="number"){callArgs=Array.prototype.slice.call(arguments,0);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs)}}return method.apply(obj||window,callArgs)}},defer:function(millis,obj,args,appendArgs){var fn=this.createDelegate(obj,args,appendArgs);if(millis){return setTimeout(fn,millis)}fn();return 0},createSequence:function(fcn,scope){if(typeof fcn!="function"){return this}var method=this;return function(){var retval=method.apply(this||window,arguments);fcn.apply(scope||this||window,arguments);return retval}},createInterceptor:function(fcn,scope){if(typeof fcn!="function"){return this}var method=this;return function(){fcn.target=this;fcn.method=method;if(fcn.apply(scope||this||window,arguments)===false){return}return method.apply(this||window,arguments)}}});String.prototype.trim=(typeof String.prototype.trim!="undefined")?String.prototype.trim:function(s){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};String.stripTags=function(str){return str.replace(/<\w+[^>]*>([^<]*)<\/\w+>/gi,function(t,y,u){return y})};String.htmlEntitiesDecode=function(str){var self=arguments.callee;self.el=(self.el)?self.el:document.createElement("div");self.el.firstChild&&self.el.removeChild(self.el.firstChild);self.el.innerHTML=str.replace(/>/g,"&gt;").replace(/</g,"&lt;");return self.el.firstChild?self.el.firstChild.nodeValue:""};String.ellipsis=function(value,len,chars){chars=chars||'<span class="ellipsis">...</span>';return(value&&value.length>len)?value.substr(0,len-3)+chars:value};String.wordWrap=function(str,num){return(typeof str=="string")?str.replace(new RegExp("(\\w{"+num+"})(?=\\w)","g"),"$1<br />"):""};an.$=an.getDom})();(function(){an.lib.Event=function(){var l=false;var m=[];var n=[];var c=0;var g=[];var d=0;var k=null;var h=[];var p=false;var e;var i=function(){if(!p){p=true;an.isReady=true;if(e){clearInterval(e)}if(an.isGecko||an.isOpera){document.removeEventListener("DOMContentLoaded",i,false)}if(an.isIE){var r=document.getElementById("ie-deferred-loader");if(r){r.onreadystatechange=null;r.parentNode.removeChild(r)}}if(h.length){for(var q=0,o=h.length;q<o;q++){h[q]()}}}};var j=function(){if(an.isGecko||an.isOpera){document.addEventListener("DOMContentLoaded",i,false)}else{if(an.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src="//:"><\/script>');var o=document.getElementById("ie-deferred-loader");o.onreadystatechange=function(){if(this.readyState=="complete"){i()}}}else{if(an.isSafari){e=setInterval(function(){var q=document.readyState;if(q=="complete"){i()}},10)}}}f.addListener(window,"load",i)};var f={POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,_interval:null,startInterval:function(){if(!this._interval){var o=this;var q=function(){o._tryPreloadAttach()};this._interval=setInterval(q,this.POLL_INTERVAL)}},onAvailable:function(r,o,s,q){g.push({id:r,fn:o,obj:s,override:q,checkReady:false});c=this.POLL_RETRYS;this.startInterval()},onDocumentReady:function(o,q){if(p){return(q)?o.call(q):o()}(h.length==0)&&j();h.push((q)?o.createDelegate(q):o)},addListener:function(u,q,t){u=an.getDom(u);if(!u||!t){return false}if("unload"==q){n[n.length]=[u,q,t];return true}var s=function(v){return t(an.lib.Event.getEvent(v))};var o=[u,q,t,s];var r=m.length;m[r]=o;this.doAdd(u,q,s,false);return true},removeListener:function(w,s,v){var u,r;w=an.getDom(w);if(!v){return this.purgeElement(w,false,s)}if("unload"==s){for(u=0,r=n.length;u<r;u++){var q=n[u];if(q&&q[0]==w&&q[1]==s&&q[2]==v){n.splice(u,1);return true}}return false}var o=null;var t=arguments[3];if("undefined"==typeof t){t=this._getCacheIndex(w,s,v)}if(t>=0){o=m[t]}if(!w||!o){return false}this.doRemove(w,s,o[this.WFN],false);delete m[t][this.WFN];delete m[t][this.FN];m.splice(t,1);return true},getTarget:function(r,q){r=r.browserEvent||r;var o=r.target||r.srcElement;return this.resolveTextNode(o)},resolveTextNode:function(o){if(an.isSafari&&o&&3==o.nodeType){return o.parentNode}else{return o}},getPageX:function(q){q=q.browserEvent||q;var o=q.pageX;if(!o&&0!==o){o=q.clientX||0;if(an.isIE){o+=this.getScroll()[1]}}return o},getPageY:function(o){o=o.browserEvent||o;var q=o.pageY;if(!q&&0!==q){q=o.clientY||0;if(an.isIE){q+=this.getScroll()[0]}}return q},getXY:function(o){o=o.browserEvent||o;return[this.getPageX(o),this.getPageY(o)]},getRelatedTarget:function(q){q=q.browserEvent||q;var o=q.relatedTarget;if(!o){if(q.type=="mouseout"){o=q.toElement}else{if(q.type=="mouseover"){o=q.fromElement}}}return this.resolveTextNode(o)},getTime:function(r){r=r.browserEvent||r;if(!r.time){var q=new Date().getTime();try{r.time=q}catch(o){this.lastError=o;return q}}return r.time},stopEvent:function(o){this.stopPropagation(o);this.preventDefault(o)},stopPropagation:function(o){o=o.browserEvent||o;if(o.stopPropagation){o.stopPropagation()}else{o.cancelBubble=true}},preventDefault:function(o){o=o.browserEvent||o;if(o.preventDefault){o.preventDefault()}else{o.returnValue=false}},getEvent:function(q){var o=q||window.event;if(!o){var r=this.getEvent.caller;while(r){o=r.arguments[0];if(o&&Event==o.constructor){break}r=r.caller}}return o},getCharCode:function(o){o=o.browserEvent||o;return o.charCode||o.keyCode||0},_getCacheIndex:function(u,r,t){for(var s=0,q=m.length;s<q;++s){var o=m[s];if(o&&o[this.FN]==t&&o[this.EL]==u&&o[this.TYPE]==r){return s}}return -1},elCache:{},getEl:function(o){return document.getElementById(o)},clearCache:function(){},_load:function(q){l=true;var o=an.lib.Event;if(an.isIE){o.doRemove(window,"load",o._load)}},_tryPreloadAttach:function(){if(this.locked){return false}this.locked=true;var v=!l;if(!v){v=(c>0)}var u=[];for(var q=0,o=g.length;q<o;++q){var t=g[q];if(t){var s=this.getEl(t.id);if(s){if(!t.checkReady||l||s.nextSibling||(document&&document.body)){var r=s;if(t.override){if(t.override===true){r=t.obj}else{r=t.override}}t.fn.call(r,t.obj);g[q]=null}}else{u.push(t)}}}c=(u.length===0)?0:c-1;if(v){this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false;return true},purgeElement:function(t,u,r){var v=this.getListeners(t,r);if(v){for(var s=0,o=v.length;s<o;++s){var q=v[s];this.removeListener(t,q.type,q.fn)}}if(u&&t&&t.childNodes){for(s=0,o=t.childNodes.length;s<o;++s){this.purgeElement(t.childNodes[s],u,r)}}},getListeners:function(q,v){var t=[],o;if(!v){o=[m,n]}else{if(v=="unload"){o=[n]}else{o=[m]}}for(var s=0;s<o.length;++s){var x=o[s];if(x&&x.length>0){for(var u=0,w=x.length;u<w;++u){var r=x[u];if(r&&r[this.EL]===q&&(!v||v===r[this.TYPE])){t.push({type:r[this.TYPE],fn:r[this.FN],obj:r[this.OBJ],adjust:r[this.ADJ_SCOPE],index:u})}}}}return(t.length)?t:null},_unload:function(w){var v=an.lib.Event,t,s,q,o,r;for(t=0,o=n.length;t<o;++t){q=n[t];if(q){var u=window;if(q[v.ADJ_SCOPE]){if(q[v.ADJ_SCOPE]===true){u=q[v.OBJ]}else{u=q[v.ADJ_SCOPE]}}q[v.FN].call(u,v.getEvent(w),q[v.OBJ]);n[t]=null;q=null;u=null}}n=null;if(m&&m.length>0){s=m.length;while(s){r=s-1;q=m[r];if(q){v.removeListener(q[v.EL],q[v.TYPE],q[v.FN],r)}s=s-1}q=null;v.clearCache()}v.doRemove(window,"unload",v._unload)},getScroll:function(){var o=document.documentElement,q=document.body;if(o&&(o.scrollTop||o.scrollLeft)){return[o.scrollTop,o.scrollLeft]}else{if(q){return[q.scrollTop,q.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(s,q,r,o){s.addEventListener(q,r,(o))}}else{if(window.attachEvent){return function(s,q,r,o){s.attachEvent("on"+q,r)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(s,q,r,o){s.removeEventListener(q,r,(o))}}else{if(window.detachEvent){return function(r,o,q){r.detachEvent("on"+o,q)}}else{return function(){}}}}()};return f}();var b=an.lib.Event;b.on=b.addListener;b.un=b.removeListener;if(document&&document.body){b._load()}else{b.doAdd(window,"load",b._load)}b.doAdd(window,"unload",b._unload);b._tryPreloadAttach();if(an.isIE){function a(){var c=Function.prototype;delete c.createSequence;delete c.defer;delete c.createDelegate;delete c.createCallback;delete c.createInterceptor;delete c.curry;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}an.onReady=b.onDocumentReady})();(function(){var a;an.lib.Dom={isPartOfDom:function(c){return(c.parentNode!==null)},getViewWidth:function(c){return c?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(c){return c?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){var c=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(c,this.getViewportHeight())},getDocumentWidth:function(){var c=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(c,this.getViewportWidth())},getViewportHeight:function(){var c=self.innerHeight;var d=document.compatMode;if((d||an.isIE)&&!an.isOpera){c=(d=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return c},getViewportWidth:function(){var c=self.innerWidth;var d=document.compatMode;if(d||an.isIE){c=(d=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth}return c},isAncestor:function(e,f){e=an.getDom(e);f=an.getDom(f);if(!e||!f){return false}if(e.contains&&!an.isSafari){return e.contains(f)}else{if(e.compareDocumentPosition){return !!(e.compareDocumentPosition(f)&16)}else{var d=f.parentNode;while(d){if(d==e){return true}else{if(!d.tagName||d.tagName.toUpperCase()=="HTML"){return false}}d=d.parentNode}return false}}},getRegion:function(c){return an.lib.Region.getRegion(c)},getY:function(c){return this.getXY(c)[1]},getX:function(c){return this.getXY(c)[0]},addClass:function(f,e){if(e instanceof Array){for(var d=0,c=e.length;d<c;d++){this.addClass(f,e[d])}}else{if(e&&!this.hasClass(f,e)){f.className=f.className+" "+e}}return this},removeClass:function(g,f){if(!f||!g.className){return this}if(f instanceof Array){for(var d=0,c=f.length;d<c;d++){this.removeClass(g,f[d])}}else{if(this.hasClass(g,f)){var e=this.classReCache[f];if(!e){e=new RegExp("(?:^|\\s+)"+f+"(?:\\s+|$)","g");this.classReCache[f]=e}g.className=g.className.replace(e," ")}}return this},classReCache:{},hasClass:function(d,c){return c&&(" "+d.className+" ").indexOf(" "+c+" ")!=-1},setOpacity:function(e,c){var d=e.style;if(an.isIE&&!an.isIE8){d.zoom=1;d.filter=(d.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(c==1?"":"alpha(opacity="+c*100+")")}else{d.opacity=c}return this},getXY:function(e){var d,i,k,l,h=document.body;e=an.getDom(e);if(e.getBoundingClientRect){k=e.getBoundingClientRect();l=b(document).getScroll();return[k.left+l.left,k.top+l.top]}var m=0,j=0;d=e;var c=b(e).getStyle("position")=="absolute";while(d){m+=d.offsetLeft;j+=d.offsetTop;if(!c&&b(d).getStyle("position")=="absolute"){c=true}if(an.isGecko){i=b(d);var n=parseInt(i.getStyle("borderTopWidth"),10)||0;var f=parseInt(i.getStyle("borderLeftWidth"),10)||0;m+=f;j+=n;if(d!=e&&i.getStyle("overflow")!="visible"){m+=f;j+=n}}d=d.offsetParent}if(an.isSafari&&c){m-=h.offsetLeft;j-=h.offsetTop}if(an.isGecko&&!c){var g=b(h);m+=parseInt(g.getStyle("borderLeftWidth"),10)||0;j+=parseInt(g.getStyle("borderTopWidth"),10)||0}d=e.parentNode;while(d&&d!=h){if(!an.isOpera||(d.tagName!="TR"&&b(d).getStyle("display")!="inline")){m-=d.scrollLeft;j-=d.scrollTop}d=d.parentNode}return[m,j]},setXY:function(c,d){c=an.fly(c,"_setXY");c.position();var e=c.translatePoints(d);if(d[0]!==false){c.dom.style.left=e.left+"px"}if(d[1]!==false){c.dom.style.top=e.top+"px"}},setX:function(d,c){this.setXY(d,[c,false])},setY:function(c,d){this.setXY(c,[false,d])},findAncestor:function(c,e){e=(typeof e=="undefined")?function(){return true}:e;if(!c||e(c.parentNode,c)){return(!c)?c:c.parentNode}var d=c.parentNode;while(d&&d.nodeType==1&&d!=document.body){if(e(d,c)){return d}d=d.parentNode}return null}};function b(c){if(!a){a=new an.Element.Flyweight()}a.dom=c;return a}})();an.lib.Ajax={request:function(g,e,a,f,b){if(b){var c=b.headers;if(c){for(var d in c){if(c.hasOwnProperty(d)){this.initHeader(d,c[d],false)}}}if(b.xmlData){this.initHeader("Content-Type","text/xml",false);g="POST";f=b.xmlData}}return this.asyncRequest(g,e,a,f)},headers:{},hasHeaders:false,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",hasDefaultHeaders:true,defaultHeaders:{},poll:{},timeout:{},pollInterval:50,transactionId:0,setProgId:function(a){this.activeX.unshift(a)},setDefaultPostHeader:function(a){this.useDefaultHeader=a},setDefaultXhrHeader:function(a){this.useDefaultXhrHeader=a},setPollingInterval:function(a){if(typeof a=="number"&&isFinite(a)){this.pollInterval=a}},createXhrObject:function(f){var d,a;try{a=new XMLHttpRequest();d={conn:a,tId:f}}catch(c){for(var b=0;b<this.activeX.length;++b){try{a=new ActiveXObject(this.activeX[b]);d={conn:a,tId:f};break}catch(c){}}}finally{return d}},getConnectionObject:function(){var b;var c=this.transactionId;try{b=this.createXhrObject(c);if(b){this.transactionId++}}catch(a){}finally{return b}},asyncRequest:function(e,b,d,a){var c=this.getConnectionObject();if(!c){return null}else{c.conn.open(e,b,true);if(this.useDefaultXhrHeader){if(!this.defaultHeaders["X-Requested-With"]){this.initHeader("X-Requested-With",this.defaultXhrHeader,true)}}if(a&&this.useDefaultHeader){this.initHeader("Content-Type",this.defaultPostHeader)}if(this.hasDefaultHeaders||this.hasHeaders){this.setHeader(c)}this.handleReadyState(c,d);c.conn.send(a||null);return c}},handleReadyState:function(b,c){var a=this;if(c&&c.timeout){this.timeout[b.tId]=window.setTimeout(function(){a.abort(b,c,true)},c.timeout)}this.poll[b.tId]=window.setInterval(function(){if(b.conn&&b.conn.readyState==4){window.clearInterval(a.poll[b.tId]);delete a.poll[b.tId];if(c&&c.timeout){window.clearTimeout(a.timeout[b.tId]);delete a.timeout[b.tId]}a.handleTransactionResponse(b,c)}},this.pollInterval)},handleTransactionResponse:function(f,g,a){if(!g){this.releaseObject(f);return}var c,b;try{if(f.conn.status!==undefined&&f.conn.status!=0){c=f.conn.status}else{c=13030}}catch(d){c=13030}if(c>=200&&c<300){b=this.createResponseObject(f,g.argument);if(g.success){if(!g.scope){g.success(b)}else{g.success.apply(g.scope,[b])}}}else{switch(c){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=this.createExceptionObject(f.tId,g.argument,(a?a:false));if(g.failure){if(!g.scope){g.failure(b)}else{g.failure.apply(g.scope,[b])}}break;default:b=this.createResponseObject(f,g.argument);if(g.failure){if(!g.scope){g.failure(b)}else{g.failure.apply(g.scope,[b])}}}}this.releaseObject(f);b=null},createResponseObject:function(a,h){var d={};var k={};try{var c=a.conn.getAllResponseHeaders();var g=c.split("\n");for(var f=0;f<g.length;f++){var b=g[f].indexOf(":");if(b!=-1){k[g[f].substring(0,b)]=g[f].substring(b+2)}}}catch(j){}d.tId=a.tId;d.status=a.conn.status;d.statusText=a.conn.statusText;d.getResponseHeader=k;d.getAllResponseHeaders=c;d.responseText=a.conn.responseText;d.responseXML=a.conn.responseXML;if(typeof h!==undefined){d.argument=h}return d},createExceptionObject:function(h,d,a){var f=0;var g="communication failure";var c=-1;var b="transaction aborted";var e={};e.tId=h;if(a){e.status=c;e.statusText=b}else{e.status=f;e.statusText=g}if(d){e.argument=d}return e},initHeader:function(a,d,c){var b=(c)?this.defaultHeaders:this.headers;if(b[a]===undefined){b[a]=d}else{b[a]=d+","+b[a]}if(c){this.hasDefaultHeaders=true}else{this.hasHeaders=true}},setHeader:function(a){if(this.hasDefaultHeaders){for(var b in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(b)){a.conn.setRequestHeader(b,this.defaultHeaders[b])}}}if(this.hasHeaders){for(var b in this.headers){if(this.headers.hasOwnProperty(b)){a.conn.setRequestHeader(b,this.headers[b])}}this.headers={};this.hasHeaders=false}},resetDefaultHeaders:function(){delete this.defaultHeaders;this.defaultHeaders={};this.hasDefaultHeaders=false},abort:function(b,c,a){if(this.isCallInProgress(b)){b.conn.abort();window.clearInterval(this.poll[b.tId]);delete this.poll[b.tId];if(a){delete this.timeout[b.tId]}this.handleTransactionResponse(b,c,true);return true}else{return false}},isCallInProgress:function(a){if(a&&a.conn){return a.conn.readyState!=4&&a.conn.readyState!=0}else{return false}},releaseObject:function(a){a.conn=null;a=null},activeX:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]};an.util.JSON=new (function(){var useHasOwn={}.hasOwnProperty?true:false;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var 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+'"'};var 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":an.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};var 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(o){if(typeof o=="undefined"||o===null){return"null"}else{if(o instanceof Array){return encodeArray(o)}else{if(o instanceof Date){return encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){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(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=function(json){return eval("("+json+")")}})();an.encode=an.util.JSON.encode;an.decode=an.util.JSON.decode;an.LoadingSign=(function(){var a=function(){this.el=null;this.count=0;this.hasInit=false};a.prototype={show:function(){(!this.hasInit)&&this.init();(this.count++==0)&&(this.el.style.display="block");return this},hide:function(b){(this.hasInit)&&((b===true&&(this.count=0)==0)||(this.count=(this.count==0)?0:--this.count)==0)&&(this.el.style.display="none");return this},init:function(){this.el=an.$("loading-sign");this.hasInit=true;return this}};return(new a())})();an.Message=(function(){var a=function(){this.el=null;this.template="";this.importantParent=null;this.standardParent=null;this.messages={length:0};this.hasInit=false};a.prototype={self:a,show:function(e,c){(!this.hasInit)&&this.init();var f=this.messages.length++,b=this.self.getMessageObject(),d=this.template.replace(/{id}/g,f).replace(/{text}/,e);hideFn=an.Message.hide.createDelegate(this,[f]);b.standard=c=(typeof c=="undefined")?false:c;b.el=this[((c)?"standard":"important")+"Parent"].appendChild(this.el.cloneNode(true));b.el.innerHTML=d;b.close=an.$("message-close-"+f);this.messages[(b.id=f)]=b;an.lib.Dom.addClass(b.el,"vp-message-"+((c)?"standard":"important"));an.lib.Dom.removeClass(b.el,"inactive-content");an.lib.Event.on(b.close,"click",hideFn);an.lib.Event.on(b.el,"mouseover",this.onMouseOver.createDelegate(this,[b]));an.lib.Event.on(b.el,"mouseout",this.onMouseOut.createDelegate(this,[b]));b.tid=window.setTimeout(hideFn,(c)?3000:10000);return f},hide:function(c){var b=this.messages[c];b&&an.Sparkle.fade(b.el,{start:0.95,cb:function(){(b.tid!==null)&&window.clearTimeout(b.tid);an.lib.Event.purgeElement(b.close);an.lib.Event.purgeElement(b.el);b.el.parentNode.removeChild(b.el);delete this.messages[b.id]}.createDelegate(this)});return this},onMouseOver:function(b){an.lib.Dom.addClass(b.el,"vp-message-hover");(b.tid!==null)&&window.clearTimeout(b.tid);return this},onMouseOut:function(b){an.lib.Dom.removeClass(b.el,"vp-message-hover");(b.tid!==null)&&window.clearTimeout(b.tid);b.tid=window.setTimeout(this.hide.createDelegate(this,[b.id]),(b.standard)?3000:10000);return this},init:function(){this.el=an.$("message-container");this.el.id="";this.template=this.el.innerHTML;this.el.innerHTML="";this.el=this.el.parentNode.removeChild(this.el);this.standardParent=document.body.appendChild(document.createElement("div"));this.importantParent=document.body.appendChild(document.createElement("div"));an.lib.Dom.addClass(this.standardParent,["vp-message-parent","vp-message-parent-standard"]);an.lib.Dom.addClass(this.importantParent,["vp-message-parent","vp-message-parent-important"]);this.hasInit=true;return this}};a.getMessageObject=function(){return{id:null,el:null,tid:null,standard:null,close:null}};return(new a())})();an.Sparkle=(function(){var q={},n=null,d=function(){var t=true;an.each(q,function(u){t=false;if(an.lib.Dom.isPartOfDom(u.el)){if(u.step<100){u.fn(u,Math.min((u.step+=u.options.ticks),100))}else{o(u)}}else{p(u)}});(t)&&i()},o=function(u,t){(t)&&u.fn(u,100);(typeof u.options.cb=="function")&&u.options.cb();p(u)},p=function(t){delete q[t.el.id]},f=function(t){var u=an.id(t=an.$(t));return(q.hasOwnProperty(u))?false:u},k=function(){return(n===null)?(n=window.setInterval(d,13)):n},i=function(){window.clearInterval(n);n=null},s=function(){var t=true;an.each(q,function(){return(t=false)});return t},b=function(u,t,v){var w=f(u);return(w===false)?false:(q[w]={timer:k(),fn:t,el:u,capFn:(v.hasOwnProperty("start")&&v.hasOwnProperty("end"))?(function(){var x=(v.end>v.start)?"min":"max";return function(z,y){return Math[x]((y)?z:Math.round(z),v.end)}})():an.emptyFn,options:an.apply({ticks:5},v),step:0,args:v})},h=function(t){return t.parentNode!==null},a=function(t){return Math.sin(t*Math.PI/2)},e=function(t){return Math.pow(t,3)},j=function(t){return Math.pow(2,8*(t-1))},l=function(v,t){var u=v.options;an.lib.Dom.setOpacity(v.el,v.capFn(u.start-((u.start-u.end)*e(t/100)),true))},c=function(v,t){var u=v.options;v.el.style[u.which||"height"]=v.capFn(u.start-((u.start-u.end)*a(t/100)))+"px"},m=function(v,t){var u=v.options;window.scroll(u.x,v.capFn(u.start-((u.start-u.end)*a(t/100))))},g=function(v,t){var u=j(t/100);v.el.style.backgroundColor="rgb("+Math.round(255*u+v.options.start[0]*(1-u))+","+Math.round(255*u+v.options.start[1]*(1-u))+","+Math.round(255*u+v.options.start[2]*(1-u))+")"},r=function(u,t){(t==99)&&an.lib.Dom.addClass(u.el,u.args.className)};return{fade:function(t,u){return b(t,l,an.apply({start:1,end:0},u))},fadeColor:function(t,u){return b(t,g,an.apply({start:[213,228,243],ticks:1},u))},slide:function(t,u){return b(t,c,an.apply({end:200},u))},showHeight:function(u,v){var t=an.fly(u).getHeight(true);u.style.height="0px";return b(u,c,an.apply({start:0,end:t},v))},scrollToEl:function(u,w){var v=an.fly(document).getScroll(),x=an.lib.Dom.getViewportHeight(),t=Math.min(an.fly(u).getY()-Math.max(0,(x-an.fly(u).getHeight())/2),an.fly(document.body).getHeight()-x);return b(u,m,an.apply({x:v.left,start:v.top,end:t,ticks:5},w))},clickEffect:function(t,u){an.lib.Dom.removeClass(t,u.className);return b(t,r,an.apply({ticks:33},u))},stop:function(t){var u=an.id(an.$(t));return(q.hasOwnProperty(u))?o(q[u],true):false}}})();
(function(){an=an;ev=an.EventManager;var d=an.lib.Dom;an.browserAlert=function(){if(!an.isGecko){var d=document.createElement('div');d.className='browser-alert';d.appendChild(document.createTextNode('Sorry for the inconvenience but the current version of ViewPoint has only been tested for Firefox 3. It is suggested that you switch your browser and give it a try again.'));document.body.insertBefore(d,document.body.firstChild);}};an.lib.Event.on(window,'load',function(){an.isLoaded=true;});an.onReady(function(){_1.headTag=document.getElementsByTagName('head').item(0);var bd=an.getDom(document.body);if(bd){var cls=[an.isIE?"an-ie":an.isGecko?"an-gecko":an.isOpera?"an-opera":an.isSafari?"an-safari":""];(an.isWindows)&&cls.push("an-windows");(an.isMac)&&cls.push("an-mac");(an.isLinux)&&cls.push("an-linux");(an.isBorderBox)&&cls.push('an-border-box');if(an.isStrict){var p=bd.parentNode;(p)&&(p.className+=' an-strict');}
bd.className+=' '+cls.join(' ');}
an.browserAlert();window.setInterval(function(){var cb={success:function(o){},failure:function(){},scope:this,timeout:3000};an.lib.Ajax.request("GET",'/?ts='+(new Date()).getTime()+'&keepalive',cb);},600000);});})();
(function(){var d=ex.lib.Dom;an.browserAlert=function(){return;};an.namespace('an.dashboard','an.home','an.lists','an.topics','an.trending','an.widgets');an.post.hasOwnProperty('PostArea')&&(an.post.PostArea.friendSearchConnector='/home/home-connector/searchfriends');an.post.hasOwnProperty('Post')&&(an.post.Post.postConnector='/home/home-connector/post');})();
an.dashboard.FormUtil={'fieldSetup':function(flds,keyHandler,sc){var e=an.lib.Event,d=an.lib.Dom;an.each(flds,function(o){e.on(o.el,'focus',function(){d.addClass(o.el,'form-field-focus');});e.on(o.el,'blur',function(){d.removeClass(o.el,'form-field-focus');});e.on(o.el,'keyup',function(e){(e.keyCode==13)&&keyHandler.call(sc);});});},'formPost':function(flds){var es=[],mssg='',data={},getValue=function(el){return s=(el.tagName=='SELECT')?el.options[el.selectedIndex].value.trim():(el.type=='checkbox')?el.checked:el.value.trim();},d=an.lib.Dom;an.each(flds,function(o){var s=getValue(o.el);d.removeClass(o.el,'form-field-invalid');if(!o.allowBlank&&s==''){es.push(o);d.addClass(o.el,'form-field-invalid');mssg+='<p class="message-error-fields">- '+o.mssg+'</p>';}
else if(es.length==0){data[o.el.id.split('-')[1]]=s;}});if(es.length!=0){data=null;es[0].el.focus();}
return{'data':data,'mssg':mssg};}};
(function(){an.mocked=[];an.mock=function(o,p,v){this.unmock(o,p);this.mocked.push([o,p,o[p]]);o[p]=v;};an.unmock=function(o,p){for(var i=0,l=this.mocked.length;i<l;i++){if(o===this.mocked[i][0]&&p==this.mocked[i][1]){o[p]=this.mocked[i][2];this.mocked.splice(i,1);break;}}};})();