Creates the basic JavaScript loading code.