function setCookie(open_menus) {
	var the_cookie = "freight_menus_open=" + escape(open_menus.join("|")) + "; ";
	var the_cookie = the_cookie + "path=/; ";
	document.cookie = the_cookie;
}

function readCookie(cookieName) {
	if (document.cookie == '') {
		// there's no cookie, so go no further
		return false;
	} else {
		// there is a cookie
		var firstChar, lastChar;
		var theBigCookie = document.cookie;
		firstChar = theBigCookie.indexOf(cookieName);
		// find the start of cookieName
		if (firstChar != -1) {
			// if you found the cookie
			firstChar += cookieName.length + 1;
			// skip 'name' and '='
			lastChar = theBigCookie.indexOf(';', firstChar);
			// Find the end of the value string (i.e. the next ';').
			if (lastChar == -1) {
				lastChar = theBigCookie.length;
			}
			return unescape(theBigCookie.substring(firstChar, lastChar));
		} else {
			// If there was no cookie of that name, return false.
			return false;
		}
	}
}


	/*
	var the_cookie = document.cookie;
    var the_cookie = unescape(the_cookie);
    var broken_cookie = the_cookie.split("=");
    var freight_menus_open = broken_cookie[1];
	if (freight_menus_open != undefined) {
		return(freight_menus_open.split("|"));
	} else {
		return(new Array());
	}
	*/