It looks like JS has no default values for functions arguments. Of course there are some workarounds. Like http://web-graphics.com/mtarchive/001709.php or http://www.vivabit.com/bollocks/2006/01/09/cheeky-tip-default-function-arguments-in-javascript
The second one has nicer look, at least IMO.