There's info and useful links here: http://www.acog.org/departments/dept_notice.cfm?recno=20&bulletin=1538
But basically - you should avoid drugs as much as possible and consult a doctor before you take anything WHILE pregnant.
Always read the little note they put in whatever medication you are given, even when the doctor prescribes it.