JavaScript code I wrote for my clients