Preparation of amorphous and crystalline Ag/TiO2 nanocomposite thin films