	/* Cookie Funktionen um Cookies von JavaScript aus zu lesen, schreiben und
	 * loeschen */

	function NcGetCookie(name) {
		if (document.cookie.length > 0) {
			var begin = document.cookie.indexOf(name + "=");
			if (begin != -1) {
				begin += name.length + 1;
				var end = document.cookie.indexOf(";", begin);
				if (end == -1) {
					end = document.cookie.length;
				}
				return unescape(document.cookie.substring(begin, end));
			}
		}
		return null;
	}

	function NcSetCookie(name, value, expiredays) {
		var expireDate = new Date ();
		expireDate.setTime(expireDate.getTime() + (expiredays * 24 * 3600 * 1000));
		document.cookie = name + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + expireDate.toGMTString());
	}

	function NcDelCookie(name) {
		if (NcGetCookie(name)) {
			document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}
