some code for javascript