// WRITE COOKIES
	function writeCookie(cookie_name,cookie_value,cookie_expires){
		cookie_expires += ' 00:00:00';
		var cookie_expires_date = new Date(cookie_expires);
		cookie_expires_UTC = cookie_expires_date.toUTCString();
		var the_cookie = cookie_name + '=' + escape(cookie_value) + ';expires=' + cookie_expires_UTC + ';path=/';
		document.cookie = the_cookie;
	}

// READ COOKIES
	function readCookie(name) {
		// if a cookie exists
		if (document.cookie != '') {
			var firstChar, lastChar;
			var theBigCookie = document.cookie;
			// find the start of 'name'
			firstChar = theBigCookie.indexOf(name);
			// if you found the cookie
			if(firstChar != -1)  {
				// skip 'name' and '='
				firstChar += name.length + 1;
				// Find the end of the value string (i.e. the ';')
				lastChar = theBigCookie.indexOf(';', firstChar);
				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;
			}
		}
	}

// SHOW OR HIDE SPLASH ON LOAD
	function splashHide(splashDiv) {
		if (readCookie('splash') == 'off') { 
			splashOff();
		} else {
			splashOn();
		}
	}

// FUNCTION CALLED BY ACTIONSCRIPT TO GET SPLASH COOKIE
	function splashCookie() {
		return readCookie('splash');
	}

// SHOW SPLASH
	function splashOn() {
		document.getElementById('splashwrapper').style.height = '250px';
		document.getElementById('contentwrapper').style.top = '350px';
		writeCookie('splash','on','January 01, 2020');
	}

// HIDE SPLASH
	function splashOff() {
		document.getElementById('splashwrapper').style.height = '27px';
		document.getElementById('contentwrapper').style.top = '127px';
		writeCookie('splash','off','January 01, 2020');
	}