The charger is build around a LM317 (click to download datasheet) adjustable regulator.
The charge starts when a battery is connected between pins JP1-JP4 or JP2-JP4 or JP3-JP4. For example, if a battery is connected to JP1-JP4 pins then the current that flows cause a voltage drop to R1, then D1 causes a voltage drop of 0,7 volts and ?1 conducts. Then through transistor's emitter flows a current that comes from Adjustment pin of LM317. Diode D4 prevents current to flow from battery back to the charging circuit. Resistors R1,R2 and R3 adjusts the charging current and it's value is given from : Rx=(1,25 + 0,1) / I , where x = 1,2,3.
I is 1/10 of the battery's charging capacity. For example if battery has a rated capacity of 1700mA then ?=170.
The input voltage must be at least 3 times the battery's voltage. For example an input voltage of 25V can charge a 8,4V (9V) battery.
R3 is 1/2 Watt and R1 and R2 it's 1/4 Watt.