var $$util={appendArray:function(a,b){if(a!==undefined&&b!==undefined&&a.length!==undefined&&b.length!==undefined)for(var c=0;c<b.length;c++)a[a.length]=b[c];return a},first:function(a){if(a){if(a.length!==undefined)return a[0];return a}return null},last:function(a){if(a){if(a.length!==undefined){if(a.length>0)return a[a.length-1];return null}return a}return null},getChildElements:function(a){if(a!==undefined&&a!==null){if(a==window)a=document}else a=document;var d=[],b=a.childNodes;if(b!==undefined&&b!==null)for(var c=0;c<b.length;c++){if(b[c].nodeType!=1)continue;d[d.length]=b[c];$$util.appendArray(d,this.getChildElements(b[c]))}return d},findElements:function(e,b){if(!b||b===null||b==window)b=document;var a=[];if(b==document){var f=document.getElementById(e);if(f)a[0]=f;return a}a=this.getChildElements(b);var d=[];for(var c=0;c<a.length;c++)if(a[c]&&a[c].id==e)d[d.length]=a[c];return d},getEventTarget:function(a){if(window.event)a=window.event;return a?a.srcElement?a.srcElement:a.target:null},properties:function(b){var c="";for(var a in b)c+=a+" = "+b[a]+", ";return c},purgeDomReferences:function(b){var d=b.attributes,a,c,f,e;if(d){c=d.length;for(a=0;a<c;a+=1){f=d[a].name;if(typeof b[f]==="function")b[f]=null}}e=b.childNodes;if(e){c=e.length;for(a=0;a<c;a+=1)$$util.purgeDomReferences(b.childNodes[a])}}};function core(a){if(a==window||a==document)return new $$obj(a);var b=$$util.findElements(a,document);if(b.length<1)b=a;return new $$obj($$util.first(b))}function $$obj(a){this.$el=document;this.$isValid=false;if(a)if(a==window||a==document||a.nodeType){this.$el=a;if(this.$el.nodeType)this.$isValid=true}else{this.$el=$$util.findElements(a,document);if(this.$el.length==1){this.$el=this.$el[0];if(this.$el.tagName)this.$isValid=true}else if(this.$el.length<1){this.$el=a;if(this.$el.tagName)this.$isValid=true}else if(this.$el[0]&&this.$el[0].nodeType)this.$isValid=true}return this}$$obj.prototype.util=$$util;$$obj.prototype.isValid=function(){return this.$isValid===true};$$obj.prototype.invalidate=function(){this.$isValid=false;this.$el=document;return this};$$obj.prototype.element=function(){return this.elements()[0]};$$obj.prototype.elements=function(){if(this.$el.length)return this.$el;var a=[];a[a.length]=this.$el;return a};$$obj.prototype.find=function(c){var b=[];if(c!==undefined)if(this.$el.length!==undefined)for(var a=0;a<this.$el.length;a++)$$util.appendArray(b,$$util.findElements(c,this.$el[a]));else b=$$util.findElements(c,this.$el);else if(this.$el.length!==undefined)for(var a=0;a<this.$el.length;a++)$$util.appendArray(b,$$util.getChildElements(this.$el[a]));else b=$$util.getChildElements(this.$el);return new $$obj(b)};$$obj.prototype.findSingle=function(a){return this.find(a).first()};$$obj.prototype.findByClass=function(f){var e=this.elements(),c=[];for(var d=0;d<e.length;d++){var b=$$util.getChildElements(e[d]);for(var a=0;a<b.length;a++)if(b[a].className&&b[a].className==f)c[c.length]=b[a]}return new $$obj(c)};$$obj.prototype.findByValue=function(d,g){var f=this.elements(),c=[];for(var e=0;e<f.length;e++){var b=$$util.getChildElements(f[e]);for(var a=0;a<b.length;a++)if(g!==undefined){if(b[a][d]!==undefined)c[c.length]=b[a]}else if(b[a][d]!==undefined&&b[a][d]==g)c[c.length]=b[a]}return new $$obj(c)};$$obj.prototype.findByType=function(f){var e=this.elements(),c=[];for(var d=0;d<e.length;d++){var b=$$util.getChildElements(e[d]);for(var a=0;a<b.length;a++)if(b[a].nodeName!==undefined&&b[a].nodeName==f.toUpperCase())c[c.length]=b[a]}return new $$obj(c)};$$obj.prototype.parent=function(){var a=this.element();if(a&&a.parentNode)return new $$obj(a.parentNode);return new $$obj};$$obj.prototype.parents=function(){var c=[],a=this,b=a.parent();while(b.isValid()===true){c[c.length]=a;a=b;b=a.parent()}return new $$obj(c)};$$obj.prototype.parentByClass=function(d){var b=this.parents().elements();for(var a=0;a<b.length;a++){var c=new $$obj(b[a]);if(c.hasClass(d))return c}return new $$obj};$$obj.prototype.siblings=function(){var b=[],a=this;while(a.previous().isValid()===true){b[b.length]=a.previous();a=a.previous()}while(a.next().isValid()===true){b[b.length]=a.next();a=a.next()}return new $$obj(b)};$$obj.prototype.first=function(){return new $$obj($$util.first(this.$el))};$$obj.prototype.last=function(){return new $$obj($$util.last(this.$el))};$$obj.prototype.getAt=function(a){var b=this.elements();return new $$obj(b[a])};$$obj.prototype.count=function(){var a=this.elements();return a.length};$$obj.prototype.next=function(){var b=$$util.first(this.$el);if(!b)return new $$obj;var a=b;if(a&&a.nextSibling)do a=a.nextSibling;while(a&&a.nodeType!=1);return new $$obj(a)};$$obj.prototype.nextByClass=function(b){var a=this.next();while(a&&a.hasClass(b)===false)a=a.next();if(a&&a.hasClass(b)===true)return a;return new $$obj};$$obj.prototype.previous=function(){var b=$$util.first(this.$el);if(!b)return new $$obj;var a=b;if(a&&a.previousSibling)do a=a.previousSibling;while(a&&a.nodeType!=1);return new $$obj(a)};$$obj.prototype.previousByClass=function(b){var a=this.previous();while(a&&a.hasClass(b)===false)a=a.previous();if(a&&a.hasClass(b)===true)return new $$obj(a);return new $$obj};$$obj.prototype.isVisible=function(){var a=this.element();if(a&&a.style)return a.style.display!="none";return false};$$obj.prototype.toggle=function(a){if(this.isVisible())this.hide(a);else this.show(a);return this};$$obj.prototype.show=function(c){if(this.$el&&this.$el.length){for(var a=0;a<this.$el.length;a++)if(this.$el[a]&&this.$el[a].style)if(this.$el[a].style.display=="none")this.$el[a].style.display=""}else{var b=$$util.first(this.$el);if(b&&b.style)if(b.style.display=="none")b.style.display=""}if(c)c();return this};$$obj.prototype.hide=function(c){if(this.$el&&this.$el.length){for(var a=0;a<this.$el.length;a++)if(this.$el[a])if(this.$el[a].style.display!="none")this.$el[a].style.display="none"}else{var b=$$util.first(this.$el);if(b)if(b.style.display!="none")b.style.display="none"}if(c)c();return this};$$obj.prototype.width=function(a){var b=$$util.first(this.$el);if(a!==undefined){if(b&&b.style){if(a===0||isNaN(a)){this.property("hideBySize",true);this.hide()}else{var c=this.property("hideBySize");if(c){this.show();this.property("hideBySize",null)}}if(!isNaN(a))b.style.width=a+"px"}return this}else{if(b)return b.offsetWidth;return 0}};$$obj.prototype.height=function(b){var a=$$util.first(this.$el);if(b!==undefined){if(a&&a.style){if(b===0||isNaN(b)){this.property("hideBySize",true);this.hide()}else{var c=this.property("hideBySize");if(c){this.show();this.property("hideBySize",null)}}if(!isNaN(b))a.style.height=b+"px"}return this}else{if(a&&a!==null)return a.offsetHeight;return 0}};$$obj.prototype.cssClass=function(a){var b=$$util.first(this.$el);if(a!==undefined)b.className=a;else return b.className;return this};$$obj.prototype.hasClass=function(d){var a=this.element();if(a&&a.className){var c=a.className.split(" ");for(var b=0;b<c.length;b++)if(c[b]==d)return true}return false};$$obj.prototype.attr=function(d,c){var b=this.elements(),e="";for(var a=0;a<b.length;a++)if(c!==undefined)b[a][d]=c;else e+=b[a][d];if(c!==undefined)return this;return e};$$obj.prototype.html=function(a){return this.attr("innerHTML",a)};$$obj.prototype.text=function(a){return this.attr("text",a)};$$obj.prototype.value=function(a){return this.attr("value",a)};$$obj.prototype.property=function(b,c){var a=this.element();if(!a.$properties)a.$properties={};if(b)if(c)a.$properties[b]=c;else return a.$properties[b];return this};$$obj.prototype.each=function(b){var c=this.elements();for(var a=0;a<c.length;a++)if(b)b(new $$obj(c[a]),a)};$$obj.prototype._events={add:function(b,d,c){if(b)if(b.addEventListener){b.addEventListener(d,c,false);var f=new $$obj(b),e=d+"_handlers",a=f.property(e);if(a===undefined||a===null)a=[];a[a.length]=c;f.property(e,a);return true}else if(b.attachEvent)return b.attachEvent("on"+d,c)},remove:function(a,b){if(a){if(a.removeEventListener){var f=new $$obj(a),e=b+"_handlers",c=f.property(e);if(c!==undefined&&c!==null)for(var d=0;d<c.length;d++)a.removeEventListener(b,c[d],false);f.property(e,null)}else if(a.detachEvent)a.detachEvent("on"+b);if(a[b])a[b]=null}},getDomHandlerContext:function(){if(!window.$domHandlerContext)window.$domHandlerContext=new $$obj(window);if(!window.$domHandlerContext.$domLoadedHandlers)window.$domHandlerContext.$domLoadedHandlers=[];return window.$domHandlerContext},addDomLoadedHandler:function(b){var a=this.getDomHandlerContext();a.$domLoadedHandlers[a.$domLoadedHandlers.length]=b},runDomLoadedHandlers:function(){var a=this.getDomHandlerContext();for(var b=0;b<a.$domLoadedHandlers.length;b++)a.$domLoadedHandlers[b]();a.$domLoadedHandlers=[]}};$$obj.prototype.addEvent=function(b,a){this.each(function(c){if(c.isValid()===true){var d=c.element();c._events.add(d,b,a);c._events.add(d,"unload",function(a){$$util.purgeDomReferences($$util.getEventTarget(a))})}});return this};$$obj.prototype.removeEvent=function(a){this.each(function(b){if(b.isValid()===true)b._events.remove(b.element(),a)});return this};$$obj.prototype.addUpdatePanelEvents=function(b,a){try{Sys.Application.add_load(function(){if(b)Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(b);if(a)Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(a)})}catch(c){}return this};$$obj.prototype.ready=function(a){if(this.$el==window)this.addEvent("load",a);else{this.$readyScriptUpdated=false;if(navigator.appName=="Microsoft Internet Explorer"&&this._events!==undefined&&this._events.addDomLoadedHandler!==undefined){this.$readyScriptUpdated=true;this._events.addDomLoadedHandler(a);document.write("<script id='__ie_onload' defer></script>");var b=document.getElementById("__ie_onload"),e=this;b.onreadystatechange=function(){if(this.readyState=="complete")(new $$obj)._events.runDomLoadedHandlers()}}if(!this.$readyScriptUpdated&&/WebKit/i.test(navigator.userAgent)){this.$readyScriptUpdated=true;var c=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(c);a()}},10)}if(!this.$readyScriptUpdated&&document.addEventListener){this.$readyScriptUpdated=true;document.addEventListener("DOMContentLoaded",a,false)}if(!this.$readyScriptUpdated){this.$readyScriptUpdated=true;var d=new $$obj(window);d.addEvent("load",a)}}return this};$$obj.prototype._rollEffect={doEffect:function(c){var b=new $$obj(c),a=b.property("rollEffectValues");if(!a||a===null||a.rollVector===0)return;if(a.heights&&a.index>=0&&a.index<a.heights.length){b.height(a.heights[a.index]);a.index+=a.rollVector;setTimeout(function(){b._rollEffect.doEffect(b.element());b=null},a.ms)}else{if(a.rollVector<0){a.rollVector=0;b.property("rollEffectValues",a)}else{b.height(a.original.height);b.element().style.overflow=a.original.overflow;b.property("rollEffectValues",null)}if(a.func!==null)a.func()}}};$$obj.prototype.rollToggle=function(f,g,e){var c=this.elements();for(var a=0;a<c.length;a++){var d=new $$obj(c[a]),h=c[a],b=d.property("rollEffectValues");if(!b||b===null||b.rollVector>0)d.rollClosed(f,g,e);else d.rollOpen(f,g,e)}};$$obj.prototype.rollClosed=function(i,j,k){var e=this.elements();for(var b=0;b<e.length;b++){var f=new $$obj(e[b]),g=e[b],a=f.property("rollEffectValues"),d=f.height();if(d>0){if(!a||a===null||a.rollVector===0){var c=[],h=Math.round(i/(1e3/j));for(var b=0;b<=h;b++)c[c.length]=Math.round(b*(d/h));a={};a.original={};a.original.overflow=g.style.overflow;a.original.height=d;a.heights=c;a.index=c.length-1}else if(a.index>=a.heights.length)a.index=a.heights.length-1;a.rollVector=-1;a.fps=i;a.ms=j/a.heights.length;a.func=k;f.property("rollEffectValues",a);g.style.overflow="hidden";this._rollEffect.doEffect(g)}}return this};$$obj.prototype.rollOpen=function(f,g,e){var c=this.elements();for(var b=0;b<c.length;b++){var d=new $$obj(c[b]),a=d.property("rollEffectValues");if(a){if(a.index<0)a.index=0;a.rollVector=1;a.fps=f;a.ms=g/a.heights.length;a.func=e;d.property("rollEffectValues",a);c[b].style.overflow="hidden";this._rollEffect.doEffect(c[b])}}}