js function of cookie process in ws_main.js