Theoretical study of the excited and continuum states in the NEXAFS region of Cl2