function ActiveBar(b){this._text=b;this._bodyNode=document.getElementsByTagName("body")[0];var a=document.createElement("div");this._activebarNode=a;a.style.display="none";a.className="activebar";a.style.height=this._barHeight+"px";a.style.top="0px";a.style.left="0px";a.style.width="100%";this._bodyNode.appendChild(a);this._textAreaNode=a=document.createElement("div");a.className="messageText";this._activebarNode.appendChild(a);this._textAreaNode.innerHTML=b;this._closeNode=b=document.createElement("div");
b.className="closeButton";this._activebarNode.appendChild(b);var c=this;this._registerEvent(window,"scroll",function(a){c._onScroll(a,c)});this._registerEvent(this._closeNode,"click",function(){c.hide()})}
ActiveBar.prototype={_text:false,_bodyNode:false,_activebarNode:false,_textAreaNode:false,_textNode:false,_closeNode:false,_slideIn:false,_slideDelay:30,_currentTop:0,_barHeight:24,_topBorder:0,_animation_in_progress:false,_animationTimer:false,_getScrollOffsetY:function(){if(typeof window.pageYOffset=="number")return window.pageYOffset;else if(document.body!=void 0&&(document.body.scrollLeft!=void 0||document.body.scrollTop!=void 0))return document.body.scrollTop;else if(document.documentElement!=
void 0&&(document.documentElement.scrollLeft!=undefinded||document.documentElement.scrollTop!=void 0))return document.documentElement.scrollTop},_registerEvent:function(b,a,c){typeof b.addEventListener!="undefined"?b.addEventListener(a,c,false):typeof b.attachEvent!="undefined"?b.attachEvent("on"+a,c):b["on"+a]=b["on"+a]!=null?function(a){oldHander(a);c(a)}:c},_slideAnimate:function(){if(this._slideIn==true){if(this._activebarNode.style.top=this._currentTop--+"px",this._currentTop==this._topBorder-
this._barHeight-1){this._activebarNode.style.display="none";this._animation_in_progress=false;return}}else if(this._activebarNode.style.top=this._currentTop++ +"px",this._currentTop==this._topBorder+1){this._animation_in_progress=false;return}var b=this;this._animationTimer=window.setTimeout(function(){b._slideAnimate()},this._slideDelay)},_slide:function(b){this._animation_in_progress=true;this._onScroll(null,this);b==true?(this._slideIn=true,this._currentTop=this._topBorder):(this._slideIn=false,
this._currentTop=this._topBorder-this._barHeight,this._activebarNode.style.top=this._currentTop+"px",this._activebarNode.style.display="block");this._slideAnimate()},_onScroll:function(b,a){a._topBorder=a._getScrollOffsetY();if(a._animation_in_progress)window.clearTimeout(a._animationTimer),a._activebarNode.style.display=a._slideIn?"none":"block";a._activebarNode.style.top=a._topBorder+"px"},show:function(){this._slide(false)},hide:function(){this._slide(true)}};
