Create ticketfunctions.js