dynamic slide using java scripts