Everything is free if you know were to look.
Secondly, Changing a motherboard would not mean losing your programs. Unless you mean your Harddrive. Which are two different components. Replacing the motherboard is easy, determine the Form factor, CPU socket and Video card interface. (Unless its a prebuilt, its easy,) After you do this you just look for a compatible board either online or in a store..
After installation of the new board you boot off the XP Disc and run a repair or reinstall windows.