added some javascript codes