function readCookieValue(cname) {
	var allcookies	= document.cookie;
	var value	= "";
	var pos	 = allcookies.indexOf(cname+"=");
	if (pos != -1) {
		var start	= pos + cname.length + 1;
		var end	 = allcookies.indexOf(";", start);
		if (end == -1) {
			end = allcookies.length;
		}
		value	= unescape(allcookies.substring(start, end));
	}
	return value;
}

function getPage() {
	var ans	= readCookieValue("page");
	if (ans != "") {
		return parseFloat(ans);
	} else {
		return 1;
	}
}

function setPage(newPage) {
	document.cookie = "page=" + escape(newPage);
}

function getStorePath() {
	return readCookieValue("storepath");
}

function setStorePath(newPath) {
	document.cookie = "storepath=" + escape(newPath);
}


