Switch a function completely off

hey all.
Just looking at a quick way to turn a

object.onRollover = function

off and on?

kinda like

delete object.onRollover = function

and

new function();

??