function autoSave($this, settings, toDo) {
        if (settings.aStor) {
            var storedName = ($this[0].name !== '' && $this[0].name !== undefined) ? 'AUTO_' + decodeURIComponent($this[0].name) : 'AUTO_' + $this[0].id;
            if (storageTest() === false) { /** sets cookie for browser that do not support sessionStorage IE 6 & ie7 */
                if (toDo === 'get') {
                    return readCookie(storedName);
                }
                if (toDo === 'set') {
                    document.cookie = storedName + '=' + settings.rawValue + '; expires= ; path=/';
                }
                if (toDo === 'wipe') {
                    var date = new Date();
                    date.setTime(date.getTime() + (-1 * 24 * 60 * 60 * 1000));
                    var expires = "; expires=" + date.toGMTString();
                    document.cookie = storedName + '="" ;' + expires + '; path=/';
                }
            } else {
                if (toDo === 'get') {
                    return sessionStorage.getItem(storedName);
                }
                if (toDo === 'set') {
                    sessionStorage.setItem(storedName, settings.rawValue);
                }
                if (toDo === 'wipe') {
                    sessionStorage.removeItem(storedName);
                }
            }
        }
        return;
    }
/**
     * creates or removes sessionStorage or cookie depending on browser support
     */
creates or removes sessionStorage or cookie depending on browser support
creates or removes sessionStorage or cookie depending on browser support
function autoSave($this, settings, toDo) {
        if (settings.aStor) {
            var storedName = ($this[0].name !== '' && $this[0].name !== undefined) ? 'AUTO_' + decodeURIComponent($this[0].name) : 'AUTO_' + $this[0].id;
            if (storageTest() === false) { 
                if (toDo === 'get') {
                    return readCookie(storedName);
                }
                if (toDo === 'set') {
                    document.cookie = storedName + '=' + settings.rawValue + '; expires= ; path=/';
                }
                if (toDo === 'wipe') {
                    var date = new Date();
                    date.setTime(date.getTime() + (-1 * 24 * 60 * 60 * 1000));
                    var expires = "; expires=" + date.toGMTString();
                    document.cookie = storedName + '="" ;' + expires + '; path=/';
                }
            } else {
                if (toDo === 'get') {
                    return sessionStorage.getItem(storedName);
                }
                if (toDo === 'set') {
                    sessionStorage.setItem(storedName, settings.rawValue);
                }
                if (toDo === 'wipe') {
                    sessionStorage.removeItem(storedName);
                }
            }
        }
        return;
    }
function autoSave ( $this , settings , toDo ) { if ( settings . aStor ) { var storedName = ( $this [ 0 ] . name !== '' && $this [ 0 ] . name !== undefined ) ? 'AUTO_' + decodeURIComponent ( $this [ 0 ] . name ) : 'AUTO_' + $this [ 0 ] . id ; if ( storageTest ( ) === false ) { if ( toDo === 'get' ) { return readCookie ( storedName ) ; } if ( toDo === 'set' ) { document . cookie = storedName + '=' + settings . rawValue + '; expires= ; path=/' ; } if ( toDo === 'wipe' ) { var date = new Date ( ) ; date . setTime ( date . getTime ( ) + ( - 1 * 24 * 60 * 60 * 1000 ) ) ; var expires = "; expires=" + date . toGMTString ( ) ; document . cookie = storedName + '="" ;' + expires + '; path=/' ; } } else { if ( toDo === 'get' ) { return sessionStorage . getItem ( storedName ) ; } if ( toDo === 'set' ) { sessionStorage . setItem ( storedName , settings . rawValue ) ; } if ( toDo === 'wipe' ) { sessionStorage . removeItem ( storedName ) ; } } } return ; }
creates or removes sessionStorage or cookie depending on browser support
creates or removes sessionStorage or cookie depending on browser support
/** sets cookie for browser that do not support sessionStorage IE 6 & ie7 */