does that work for false or null ? (see the accepted answer at http://stackoverflow.com/questions/894860/set-a-default-parameter-value-for-a-javascript-function )