Dual-type electrochromic device based on polypyrrole and polythiophene derivatives