Adding javascript checks for radiobutton and checkbox