/*	This file is used any time you will use cookies.	We used it for the color cookies as well.	It gives you four functions to use. For setting, retreiving	and deleting a cookie. As well as one for splitting a string	into an array based on a delimiter.		http://www.m-w.com/cgi-bin/dictionary?va=delimiter*/function setCookie(cName, cValue, eDate, cPath, cDomain, cSecurity) {	var theCookie = cName + "=" + escape(cValue);	if (eDate)				theCookie += "; expires=" + eDate;	if (cPath)				theCookie += "; path=" + cPath;	if (cDomain)			theCookie += "; domain=" + cDomain;	if (cSecurity)			theCookie += "; secure";	document.cookie = theCookie;}//end setCookie()//Return an array of strings from a character-delimited stringfunction split(delimiter, s) {	theArray = new Array();	while (s != ""){		endOfChunk = s.indexOf(delimiter);		if (endOfChunk == -1) endOfChunk = s.length;		var thisChunk = s.substring(0, endOfChunk);		s = s.substring(endOfChunk+1, s.length);		theArray[theArray.length] = thisChunk;	}//end while	return theArray;}//end split()//getCookie retrieves data from a named cookie, or returns false if it does not existfunction getCookie(cName){	if (cName) {		cookieArray = split(";", document.cookie);		for (i=0; i<cookieArray.length; i++) {			aCookie = cookieArray[i];			if (aCookie.indexOf(cName+"=") > -1) {				var valueLoc = aCookie.indexOf("=")+1;				cookieValue = aCookie.substring(valueLoc, aCookie.length);				return unescape(cookieValue);			}//end if		}	}//end if cName		return false;}//end getCookie//KillCookie deletes a cookiefunction KillCookie(cookieName, cookiePath, cookieDomain) {	var theCookie = cookieName  + "=";	if (cookiePath) theCookie += "; path=" + cookiePath;	if (cookieDomain) theCookie += "; domain=" + cookieDomain;	theCookie += "; expires=Thu, 01-Jan-70 00:00:01 GMT";	document.cookie = theCookie;}