Hide and show Index function implemented.