You are very brave for considering putting down your pet, it is always a hard decision to make. Personally, I do not like to put elderly pets through expensive and stressful surgeries in order to buy them a few extra months of life. What I would do in this situation is try to make my dog comfortable for as long as possible. When the dog no longer seems to be enjoying life (due to pain or inability to do anything independently) then I would probably put it down. If your dog is still able to do some things he enjoys, then try to let him live as long as possible and enjoy your time with him (help him up stairs; whatever it takes), but when he is no longer happy let him go. You will probably be able to tell when it is time, you know him best.