JavaScript helpers and examples