I have done one on here before (Focus) it may well be different to your car though, if you look in your handbook you should find the procedure there. It goes something like you turn the ignition on and off around 7 times IIRC, this then initializes "Learning Mode" where you then put your new key in and turn ignition on. If you get stuck let us know.
Martin