some javascript codes