if (navigator.product == "Gecko")
{
	var BwCapturedEvents = ["click","mousedown","mouseup","mousemove","mouseover","mouseout" ];
	
	HTMLElement.prototype.setCapture = function()
	{
		if (this._capture != null) this.releaseCapture();
		
		var _this = this;
		this._capture = function (e)
		{
			e.preventDefault();
			e.stopPropagation();
			var f = _this['on'+e.type];
			if (f) f.call (_this, e);
		};
		
		var c = BwCapturedEvents;
		var l = c.length;
		for (var i = 0; i < l; i++)
		{
			window.addEventListener (c[i], this._capture, true);
			window.captureEvents (Event[c[i]]);
		}
	};

	HTMLElement.prototype.releaseCapture = function()
	{
		var c = BwCapturedEvents;
		var l = c.length;
		for (var i = 0; i < l; i++)
		{
			window.releaseEvents (Event[c[i]]);
			window.removeEventListener (c[i], this._capture, true);
		}
		this._capture = null;
	};
}

