javascript added just before end of body tag