window.oncontextmenu = function() { return false; };
Will this work on all major browsers such that the right click will not be initiated?
QuirksMode has a comprehensive chart of support for the event. You can use it to decide if it meets your needs depending on browsers you support.
See this quirksmode page for a detailed compatibility table.