Tickets Program in JS script