toggle visibility of div using javascript function