to save yourself some hassle of actually tracking down parts and assembling, just buy this

http://www.welovemacs.com/vstch50forpo.html

remove the casing and rewire the connectors so that it is compatible with your G4 battery. That way you get the overcharge protection and battery error monitor.