<!--
// *******************************************************


function writeCookie(cookieName, cookieValue, cookieDays) {
	var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (cookieDays * 24 * 3600 * 1000));
	document.cookie = escape(cookieName) + "=" + escape(cookieValue) + ((cookieDays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}


// *******************************************************


function getCookie(cookieName) {
	// RETURNS:  string of information if successful, false if unsucessful
	if (document.cookie.length > 0) { 
		begin = document.cookie.indexOf(cookieName + "="); 
		if (begin != -1) {
			begin = document.cookie.indexOf(cookieName + "=") + cookieName.length + 1;
			end = document.cookie.indexOf(";", begin);

			if (end == -1) { end = document.cookie.length; }
			return unescape(document.cookie.substring(begin, end));
		} 
	}
	return null;
}


// *******************************************************


function testCookie() {
	// RETURNS:  true if successful, false is unsuccessful
	writeCookie("test", "test", 1);

	var is_cookies = getCookie("test");

	if (is_cookies == "test") {
		return true;
	} else {
		return false;
	}

}


// *******************************************************
//-->

