function CheckAddFriendUser(nFriendUserId, nUserId) { if(window.confirm('よろしいですか?')){ AddFriendUser(nFriendUserId, nUserId); } } function setCookieOneTime(key, val, tmp) { tmp = key + "=" + encodeURIComponent(val) + "; "; tmp += "path=/; "; document.cookie = tmp; } function clearCookie(key) { document.cookie = key + "=" + "xx; path=/; expires=Tue, 1-Jan-1980 00:00:00;"; } function getCookie(val) { var cookies = document.cookie; if(!cookies) return ""; var cookieItem = cookies.split(";"); for (i = 0; i < cookieItem.length; i++) { var elem = cookieItem[i].split("="); if(elem.length<2) continue; if (elem[0].trim() == val) return decodeURIComponent(elem[1]); } return ""; }