Split javascript