General advice on my home charging robot with Li-ion batt

So thanks to some help here and there, i finally manage to produce an electronic sheme of my robot. The robot itself is a robot that spent most of it's life plugged to the wall waiting for someone to take control over wifi. Once in a while i will take control of it and drive it around the house. So charging is unattended.

This is my first draft and i am not an electronic guru so all advice is welcome. |500x444

The diagram has 3 main section. The top part after the transistor is the robot itself ( with motor & the yun) and is already built. The bottom right part is the battery with 5 relay to switch it from Parallel to Serie. The cells are made of 2 parallel Li-ion cells salvaged from a computer (rated 2400mah each) The bottom Left is the charger inspired by this charger (http://danyk.cz/li-ion_en.html)

The "protection circuit" i am about tu buy, they should check for over & under voltage and shut-off the battery (http://www.batteryspace.com/protectioncircuitmodulepcbfor36vli-ionbattery875malimit.aspx) The "controler" is something that monitor the voltage of the battery and send it to the arduino so the robot knows it's battery lvl. The coils on top of the diagram is for the coils at the bottom

On the charger part (bottom left), i have some question : What is the P0 for? How to know how much current will be turn to heat by the lm317? What is the 100nf capacitor for?

Other questions : what would be the equivalent transistor of those spdt relay? if that exists...

i have most of the pieces except the relays & circuit protection for now.