(function() { function _clear() { if ( arguments.length == 1 ) _set(arguments[0], '', -1440); } function _get() { if ( (arguments.length == 1) && (document.cookie.length > 0) ) { var _start = document.cookie.indexOf(arguments[0] + "="); if ( _start != -1 ) { _start = _start + arguments[0].length + 1; var _end = document.cookie.indexOf(';', _start); if ( _end == -1) _end = document.cookie.length; return unescape(document.cookie.substring(_start, _end)); } } return false; } function _set() { var _argc = arguments.length; if ( _argc > 1 && _argc < 4 ) { var _value = arguments[0] + '=' + escape(arguments[1]); if ( _argc == 3 ) { var dt = new Date; dt.setTime((dt.getTime() - 10800000) + (arguments[2] * 60000)); _value += ';expires=' + dt.toGMTString(); } document.cookie = _value; } } function Cookies() { } Cookies.prototype.clear = _clear; Cookies.prototype.get = _get; Cookies.prototype.set = _set; window.IMCookies = Cookies; } )();