added hide/show option for javascript