I bought a Toyota Corolla (2003) with 2 keys. In one of them the battery died, after replacing the battery the key stopped working. It probably needs to be programmed, unfortunately I only have the user manual in Dutch... On the forum I found a solution to this problem in Avensis (unfortunately it didn`t work in my car) 
http://preview.tinyurl.com/ywpafv
I think the answer is in the user manual... but you need to have it in Polish.

http://preview.tinyurl.com/ywpafv
I think the answer is in the user manual... but you need to have it in Polish.