Functional basis of illusions: implications for the study of hallucinations