Javascript program for CIS class.