function splashCreateCookie(name, value, miliseconds) { if (miliseconds) { var date = new Date(); date.setTime(date.getTime() + miliseconds); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; document.cookie = name + "=" + value + expires + "; path=/"; } function splashReadCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function splashCheckVisited() { //var visited = splashReadCookie("splash"); if (location.href == "http://maple.playpark.net/") { //splashCreateCookie("splash", location.href, 86400000); location.href = "http://maple.playpark.net/splash/"; } } function splashSkip(){ var cameFrom = splashReadCookie("splash"); if (cameFrom == null) { splashCreateCookie("splash", "http://maple.playpark.net/", 86400000); location.href = "http://maple.playpark.net/"; }else{ location.href = cameFrom; } }