"use strict"; function readCookie(name) { if (document.cookie === undefined) { return ""; } var cookieList = document.cookie.split(";"); var index = 0; for (index = 0; index < cookieList.length; index += 1) { var cookie = cookieList[index].replace(/^\s\s*/, "").replace(/\s\s*$/, ""); var cookieParts = cookie.split("="); if (cookieParts.length !== 2) { continue; } if (cookieParts[0] === name) { return cookieParts[1]; } } return ""; } function restoreId() { var cookieValue = readCookie("aihandle"); if (cookieValue === "") { return; } var handle = document.getElementById("handle"); if (handle === undefined) { return; } handle.value = cookieValue; }