custom javascript for showing text fields depending on whether a box is ticked or not