Thing is, everyone does stupid things from time to time - it's called being human. What really matters is that you face up to what has happened, and deal with it responsibly. It sounds like that is exactly what you intend to do.
Unless you work in a position of absolute trust, it is very unlikely you will lose your job. If you cooperate with the TOC they aren't going to throw the book at you. It is highly probable that you will be able to negotiate a settlement with the TOC which your employer wouldn't need to know about.
Even if you do get a conviction, employers generally understand that sh*t happens - be honest with them and they'll do right by you.