think the first thing is to make sure that you are buying original batteries.....
then there is also the issue that battery capacities decay with time whether they are used or not.... so maybe when buying also consider the manufacturing date......
..also heat is the number one enemy to a battery, so need to make sure that the laptop doesn't get hot....have also heard some saying that removing the battery when it is fully charged helps, but i doubt that....