Using Javascript to capture Photo 22