My 318ti came with the factory keyless entry/security system but no fobs. I was able to get a fob from an eBay seller but I was not able to get the system into "programming mode" to activate the fob. After talking to the local BMW dealer we determined that probably the under the glovebox black box was bad. Unfortunately BMW no longer supplies that part so it's not even possible to buy a new one.
I was trying to find a used one on the web when I ran into a company that makes BMW specific after market alarm systems. In case anyone else wants to install or replace their keyless entry/security system check out
http://www.bmwalarm.com.
I'm ordering either the BMWRSX7 or the BMWRSX2 to replace my existing system. I'll report on the experience once I receive and install it.