function extendEventObject() {
    Event.prototype.__defineSetter__("returnValue", function (b) {
		if (!b) this.preventDefault();
	});
	
	Event.prototype.__defineSetter__("cancelBubble", function (b) {
		if (b) this.stopPropagation();
	});
	
	Event.prototype.__defineGetter__("srcElement", function () {
		var node = this.target;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	});

	Event.prototype.__defineGetter__("fromElement", function () {
		var node;
		if (this.type == "mouseover")
			node = this.relatedTarget;
		else if (this.type == "mouseout")
			node = this.target;
		if (!node) return;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	});

	Event.prototype.__defineGetter__("toElement", function () {
		var node;
		if (this.type == "mouseout")
			node = this.relatedTarget;
		else if (this.type == "mouseover")
			node = this.target;
		if (!node) return;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	});
	
	Event.prototype.__defineGetter__("offsetX", function () {
		return this.layerX;
	});
	Event.prototype.__defineGetter__("offsetY", function () {
		return this.layerY;
	});
}
/*
 * Extends the event object with srcElement, cancelBubble, returnValue,
 * fromElement and toElement
 */
Extends the event object with srcElement, cancelBubble, returnValue,
fromElement and toElement
Extends the event object with srcElement cancelBubble returnValue fromElement and toElement
function extendEventObject() {
    Event.prototype.__defineSetter__("returnValue", function (b) {
		if (!b) this.preventDefault();
	});
	Event.prototype.__defineSetter__("cancelBubble", function (b) {
		if (b) this.stopPropagation();
	});
	Event.prototype.__defineGetter__("srcElement", function () {
		var node = this.target;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	});
	Event.prototype.__defineGetter__("fromElement", function () {
		var node;
		if (this.type == "mouseover")
			node = this.relatedTarget;
		else if (this.type == "mouseout")
			node = this.target;
		if (!node) return;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	});
	Event.prototype.__defineGetter__("toElement", function () {
		var node;
		if (this.type == "mouseout")
			node = this.relatedTarget;
		else if (this.type == "mouseover")
			node = this.target;
		if (!node) return;
		while (node.nodeType != 1) node = node.parentNode;
		return node;
	});
	Event.prototype.__defineGetter__("offsetX", function () {
		return this.layerX;
	});
	Event.prototype.__defineGetter__("offsetY", function () {
		return this.layerY;
	});
}
function extendEventObject ( ) { Event . prototype . __defineSetter__ ( "returnValue" , function ( b ) { if ( ! b ) this . preventDefault ( ) ; } ) ; Event . prototype . __defineSetter__ ( "cancelBubble" , function ( b ) { if ( b ) this . stopPropagation ( ) ; } ) ; Event . prototype . __defineGetter__ ( "srcElement" , function ( ) { var node = this . target ; while ( node . nodeType != 1 ) node = node . parentNode ; return node ; } ) ; Event . prototype . __defineGetter__ ( "fromElement" , function ( ) { var node ; if ( this . type == "mouseover" ) node = this . relatedTarget ; else if ( this . type == "mouseout" ) node = this . target ; if ( ! node ) return ; while ( node . nodeType != 1 ) node = node . parentNode ; return node ; } ) ; Event . prototype . __defineGetter__ ( "toElement" , function ( ) { var node ; if ( this . type == "mouseout" ) node = this . relatedTarget ; else if ( this . type == "mouseover" ) node = this . target ; if ( ! node ) return ; while ( node . nodeType != 1 ) node = node . parentNode ; return node ; } ) ; Event . prototype . __defineGetter__ ( "offsetX" , function ( ) { return this . layerX ; } ) ; Event . prototype . __defineGetter__ ( "offsetY" , function ( ) { return this . layerY ; } ) ; }
Extends the event object with srcElement, cancelBubble, returnValue,
 fromElement and toElement
Extends the event object with srcElement cancelBubble returnValue fromElement and toElement