/********************************************************************* === Cookie Utility === * Cookie [ Cookie.js ] * updated 2001/05/28 mail : peace@skipup.com home : http://www.skipup.com/~peace/ *********************************************************************/ // name , limit , path , domain , secure , document function Cookie(){ var a = arguments ; this.$name = a[0] ; this.$expiration = ( a[1] ? new Date( new Date().getTime()+a[1]*24*60*60*1000 ) : null ); this.$path = ( a[2] ? a[2] : null ); this.$domain = ( a[3] ? a[3] : null ); this.$secure = ( a[4] ? a[4] : false ); this.$document = ( a[5] ? a[5] : document ); this.$load = false ; } function setBasicMember__Cookie__(){ var CP = Cookie.prototype ; /****************************** SET_MEMBER - BEGIN ******************************/ CP.store = function(){ var cookieval = "" ; for( var i in this ){ if( ( i.charAt(0) == '$' ) || ( typeof this[i] == "function" ) ) continue ; if( cookieval != "" ) cookieval += '&' ; cookieval += i + ':' + escape( this[i] ); } var cookie = this.$name + '=' + cookieval ; if( this.$expiration ) cookie += "; expires=" + this.$expiration.toGMTString() ; if( this.$path ) cookie += "; path=" + this.$path ; if( this.$domain ) cookie += "; domain=" + this.$domain ; if( this.$secure ) cookie += "; secure" ; this.$document.cookie = cookie ; }; CP.load = function( f ){ if( !this.$load ){ var allcookies = this.$document.cookie ; if( allcookies == "" ) return false ; var srt = allcookies.indexOf( this.$name + '=' ); if( srt == -1 ) return false ; srt += this.$name.length + 1 ; var end = allcookies.indexOf( ';' , srt ); if( end == -1 ) end = allcookies.length ; var cookieval = allcookies.substring( srt , end ); var a = cookieval.split( '&' ); for(var i=0;i