java script checking