close javascript block