   /**
    * GOLLUM the wikipedia browser
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GPL.
    *
    * Copyright(c) 2005 by Harald Hanek. All rights reserved.
    *
    * To contact the author write to: harald.hanek@easycp.de
    * The latest version of Wikipedia Browser can be obtained from: http://www.gollum-browser.com
    */
	
var Button_current=null;function Button(el,num)
{this._num=num;this._button=(Global.isObject(el))?el:Global.find(el);var s=this._button.className;var w=s.split(" ");this._style=w[0];this._substyle=(!Global.isUndefined(w[1]))?" "+w[1]:"";this._button.className=this._style+this._substyle;this._enabled=true;this._onaction;this._toogle=false;var oThis=this;this.__down=function(){oThis._down();};this.__over=function(){oThis._over();};this.__out=function(){oThis._out();};this.__click=function(){oThis._click();};this._init();};Button.prototype._init=function()
{Global.addEvent(this._button,'mouseover',this.__over);Global.addEvent(this._button,'mouseout',this.__out);Global.addEvent(this._button,'mousedown',this.__down);Global.addEvent(this._button,'click',this.__click);};Button.prototype.setToogle=function(e)
{this._toogle=e;if(e)this._button.className=this._style+"_active"+this._substyle;else this._button.className=this._style+this._substyle;};Button.prototype.setEnabled=function()
{if(this._enabled)return;this._enabled=true;this._button.className=this._style+this._substyle;Global.setAttribute(this._button,'disabled',null);};Button.prototype.setVisible=function(e)
{if(e)this._button.style.display='';else this._button.style.display='none';};Button.prototype.setDisabled=function()
{this._enabled=false;this._button.className=this._style+"_Disabled"+this._substyle;Global.setAttribute(this._button,'disabled',true);};Button.prototype.setStyle=function(string)
{this._style=string;this._button.className=this._style;};Button.prototype.setTitle=function(string)
{this._button.title=string;};Button.prototype._over=function()
{if(Button_current==this._button||!this._enabled)return;if(this._toogle)this._button.className=this._style+"_activeover"+this._substyle;else this._button.className=this._style+"_over"+this._substyle;};Button.prototype._out=function()
{if(!this._enabled)return;if(this._toogle)this._button.className=this._style+"_active"+this._substyle;else this._button.className=this._style+this._substyle;};Button.prototype._down=function()
{if(Button_current==this._button||!this._enabled)return;this._button.className=this._style+"_down"+this._substyle;};Button.prototype._click=function()
{this.onaction=this._button.getAttribute("onaction");if(!this._enabled||this.onaction==""||this.onaction==null)return;if(typeof this.onaction=="string")
this.onaction=new Function("event",this.onaction);this.onaction(window.event);};