adding javascript insertion of header and footer