/*----------------------------------------------------------------------- * s{R[h𑀍p * * DEPENDENCIES * - cookie.js * - nv_base.js * * @version $Revision: 892 $ *----------------------------------------------------------------------- */ var TodofukenCd = { cookie : new NVCookie(KENCOOKIE_NAME), getValue : function(){ var tokyo = "13"; if(!this.cookie){ return tokyo;//ftHgs; } var ret = km_cookie_get_unzip(this.cookie.value, "TODOFUKEN_CD"); return (ret ? ret : tokyo); }, create : function(tc){ var c = this.cookie; c.expires = km_session_expr(); c.domain = COOKIE_DOMAIN; c.path = "/"; c.value = km_cookie_zip_touroku(c.value, "TODOFUKEN_CD", tc); c.value = km_cookie_zip_touroku(c.value, "ENTDATE", (new Date).getTime()*1000); c.value = km_cookie_zip_touroku(c.value, "MAXAGE", Date.parse(c.expires)*1000); c.value = km_cookie_zip_touroku(c.value, "DOMAIN", c.domain); c.value = km_cookie_zip_touroku(c.value, "PATH", c.path); c.write(); }, update : function(tc){ this.create(tc); }, remove : function(){ var val = this.cookie.value; if(!val) return; var c = this.cookie; c.domain = COOKIE_DOMAIN; c.path = "/"; c.remove(); this.cookie = null; }, toString : function(){ return this.getValue(); } }