ctory mode.');
			} else {
                if (treeMode === 'list') {
                    treeMode = 'path';
                } else {
                    treeMode = 'list';
                }
                Cookies.set('tree-mode', treeMode, {expires: 30});
                connect();
			}
		}

		function changeModeBySuffix(path) {
			var a = path.split(separator);
			var tokens = a.slice(a.length-1,a.lenght)[0].split('.');
			if (tokens.length < 2) {
				return
			}
			var mode = tokens[tokens.length-1];
		