Mg2+ as a trigger of condenstion-decondensation transition of chromatin during mitosis