Dialog: Formatting; make sure to compare numbers, not strings
Dialog: Switch to Math.max.apply