// sample codee = e ? e : window.event; // this works fine in IE// but in fire fox we need to explicitly give the event so the below code does it.if(!e){e = window.Event;}