DO EVERYTHING IN ONE JAVASCRIPT FUNCTION
Generate New Caption