(java)script utilities