element.onclick = function(event) { if(typeof event == "undefined") { event = window.event; } … }
element.onclick = function(event) { event = event || window.event; … }