A simple and versatile sol-gel method for the synthesis of functional nanocrystalline oxides