Preparation and Characterization of Nanocomposite Thin Films for Optical Devices