window.forum_oldButtonEvents = new Array();
var forum_updatebuttons = new Array();
for(var i in document.getElementsByTagName('a'))
	forum_updatebuttons.push(document.getElementsByTagName('a')[i]);
for(var i in document.getElementsByTagName('span'))
	forum_updatebuttons.push(document.getElementsByTagName('span')[i]);
for(var i in document.getElementsByTagName('input'))
	forum_updatebuttons.push(document.getElementsByTagName('input')[i]);
var counter = 0;
for(var buttoncurr in forum_updatebuttons) {
	var but = forum_updatebuttons[buttoncurr];
	if( (but && but.className && but.className.indexOf('button') > -1) || (but && but.type && (but.type=="submit" || but.type=="reset" || but.type=="button")) ) {
		counter++;
		if(!but.className)
			but.className="";
		
		window.forum_oldButtonEvents[but] = new Array();
		window.forum_oldButtonEvents[but]['over'] = but.onmouseover ? but.onmouseover : function(e) {};
		window.forum_oldButtonEvents[but]['out'] = but.onmouseout ? but.onmouseout : function(e) {};
		window.forum_oldButtonEvents[but]['down'] = but.onmousedown ? but.onmousedown : function(e) {};
		window.forum_oldButtonEvents[but]['up'] = but.onmouseup ? but.onmouseup : function(e) {};

		but.onmouseover = function(e) { this.className+=' iehover'; window.forum_oldButtonEvents[this]['over'](e); };
		but.onmouseout = function(e) { if(this.className.indexOf(' f_mousedown') > -1) { this.className = ( this.className.substring(0, this.className.indexOf(' f_mousedown')) + this.className.substring(this.className.indexOf(' f_mousedown') + ' f_mousedown'.length) ); }      if(this.className.indexOf(' iehover') > -1) { this.className = ( this.className.substring(0, this.className.indexOf(' iehover')) + this.className.substring(this.className.indexOf(' iehover') + ' iehover'.length) ); }  window.forum_oldButtonEvents[this]['out'](e); };
		but.onmousedown = function(e) { this.className+=' f_mousedown'; return false; window.forum_oldButtonEvents[this]['down'](e); };
		but.onmouseup = function(e) { if(this.className.indexOf(' f_mousedown') > -1) {this.className = ( this.className.substring(0, this.className.indexOf(' f_mousedown')) + this.className.substring(this.className.indexOf(' f_mousedown') + ' f_mousedown'.length) ); } window.forum_oldButtonEvents[this]['up'](e); };
		but.ondragstart = function(e) { if(!e) e=window.event; if(e.returnValue) { e.returnValue=false; } return false; };
		but.onmousemove = function(e) { if(!e) e=window.event; if(e.returnValue) { e.returnValue=false; } return false; };
	}
}
