var mas = document.cookie.split(';'), names = [], i = 0, l = mas.length; for(;i<l;i++)names.push(mas[i].split('=')[0]); alert(names);