JavaScript: Timeline example