function getCookies() {
	var hash = new Array;
	if (document.cookie != null) {
		var a = document.cookie.split('; ');
		for (var i=0; i < a.length; i++) {
			var nv = a[i].split('=');
			if (nv[1] != null) {
				hash[nv[0]] = nv[1];
			}
		}
	}
	return hash;
}

function hasElements(a) {
	var e;
	for (e in a) {
		return 1;
	}
	return 0;
}

function checkCookies(name, redirect) {
	cs = getCookies();
	with (document) {
		if (!(cs[name])) {
			location.replace('index_login.html');
		} else {
			document.getElementById("poll").style.display = 'block';
		}
	}
}
