java script helper