tied javascript test function to dynamically generated checkbox