Toyota Repair: Smoking from under the hood, trouble code, oil leak


Question
I have a 98 Corolla, 140,000 mi. It has a small oil leak, but I try to keep it in check. Anyway, I was idling for about 15 minutes and turned the heat and defrost on and in a matter of about 20 seconds, I started smellin a sulfur burning type smell and then smoke started coming out of the hood and the battery and check engine light came on. I parked it and turned it off, opened the hood and couldn't tell exactly where it was coming from. Now it won't even turn over to start. What's wrong?

Answer
First of all I will ask you if there were any recent repairs or maintenance done and what were they?
Since the check engine light also came on it would help if you could have a repair shop retreive the trouble code from the computer and let me know what it is, this will give me some idea as to what the diagnosis may be.
Other than that I can not be of any more help unless I have more specific information.