Here is the cross browser code in adding multiple events in an element inside a document.


Code:
var addEvent = function ( el , ev , func ) {
	var evnt = el['on'+ev];
	el['on'+ev]= function () {
		if ( typeof evnt == "function" ) { evnt ();}
		func ();
	}
};


//example:
function ex () {
 alert(2);
}
addEvent (window , "load" , (function(){alert(1);}));
addEvent ( window, "load" , ex );