function fSetCookie( strKey, strVal, intSec, strPath ){ var dDate = new Date(); var strExp = ""; var strItem = strKey + "=" + escape( strVal ) + ";"; var strDomain = "domain=.8833.jp;"; var strCookie = ""; if( strPath != undefined ){ strPath = "path=" + strPath + ";"; } else { strPath = ""; } strVal += ""; if( strVal.length ){ if( intSec != undefined ) { dDate.setTime( dDate.getTime() + ( intSec * 1000 ) ); strExp = "expires=" + dDate.toGMTString() + ";"; } strCookie = strItem + strExp + strPath + strDomain; } else { dDate.setTime( dDate.getTime() - ( 3600 * 1000 ) ); strExp = "expires=" + dDate.toGMTString() + ";"; strCookie = strItem + strExp + strDomain;}document.cookie = strCookie;return true;}