Javascript helpers and utilities.