Determination of optimum Er-doping level to get high transparent and low resistive Cd1 − xErxS thin films