JavaScript for Graphics Tool