function ReadCookie (Name)
{
	var search = Name + "="
	if (document.cookie.length > 0)
	{
		offset = document.cookie.indexOf(search)
		if (offset != -1)
		{
			offset += search.length 
			end = document.cookie.indexOf(";", offset) 
			if (end == -1)
				end = document.cookie.length
			return (document.cookie.substring(offset, end))
		}
		else
			return ("");
	}
	else
		return ("");
}

function WriteCookie (cookieName, cookieValue, expiry) 
{
	var expDate = new Date();

	expDate.setTime (expDate.getTime() + expiry);
	document.cookie = cookieName + "=" + escape (cookieValue) + "; expires=" + expDate.toGMTString() + "; path=/";
}

function getCookies()
{
	document.add.msgby.value = unescape(ReadCookie("msgby"));
}