issue #3690: Rewrite CCNS.js

Rewrite CCNS.js