How Do U Program the Garage Opener?


I have a 2004 325. I just replaced the rear view mirror and forgot how to program the garage door opener.

There's three buttons. I am pretty sure that holding in the #1 and #3 erases the codes (like on my Acura). How do I program the buttons? Do I use the remote or the "learn" button on the opener motor?

I cannot find it in the owner's manual.

Any explanation/links are appreciated.