Determination of optical properties of amorphous and crystalline thin films by spectroellipsometry