function setCookie (cookieName, cookieValue, cookiePath, cookieExpires) {
	cookieValue=escape (cookieValue);
	if (cookieExpires == "") {
		var nowDate = new Date ();
		nowDate.setMonth (nowDate.getMonth() + 6);
		cookieExpires = "; expires=" + nowDate.toGMTString();
		}
	if (cookiePath != "") {
	cookiePath = "; path=" + cookiePath;
		}
	document.cookie = cookieName + "=" + cookieValue + cookieExpires + cookiePath;
}

