problem on onBeforeDrag

I am trying to catch the click on the background of the scheduler. I am using this code that I found in the forums and that works well in IE, but as I have made a few test in firefox, I saw that it didn’t work there.

The problem is with e=e||window.event

	scheduler.attachEvent("onBeforeDrag", function (event_id, mode, event){
		switch(mode) {
			case 'create' : 
			    switch(scheduler._mode) {
				   case 'unit' : 
					e = e || window.event; //e || 
					var pos = scheduler._mouse_coords(e);
					var sec_id = scheduler._drag_event.ressource;
					//var cal_id = scheduler._drag_event.id_codcal;
					var date_selection  = new Date(scheduler._min_date.valueOf() + (pos.y * scheduler.config.time_step) * 60000);	

Is there any way to overcome this ?

change the first line as

 scheduler.attachEvent("onBeforeDrag", function (event_id, mode, e){