This had been valuable.
Your issue comes from the 2 partial refresh events, where the second one is tarted while the first one is not fully processed on the client. The XPages runtime protects multiple events to happen at the same time, and thus the second is not executed. Just do it after a delay, like in:
<xp:eventHandler event="onClientLoad" submit="false">
<xp:this.script><![CDATA[setTimeout('XSP.showContent("#{id:dc2}","k2")',200)]]></xp:this.script>
</xp:eventHandler>