Synthesis of five and six-membered heterocycles bearing an arylpiperazinylalkyl side chain as orally active antinociceptive agents.