/**
	Cookieの使用可否をチェックする
	
	戻り値：true(Cookie有効) or false(Cookie無効)
*/
function isCookieEnabled(){
	document.cookie = "dummy=test_if_cookies_are_enabled;";
	var cookieStr = document.cookie;

	if(cookieStr != "") {
		//使用可能
		return true;
	} else {
		//使用不可能
		return false;
	}
}







function closeWindow() {
	window.close();
}

function gotoKiteiEdit() {
	location.href = "kitei_edit.html";
}

function gotoKiteiList() {
	location.href = "kitei_list.html";
}

function gotoKiteiSearch() {
	location.href = "kitei_search.html";
}

function openPreview() {
	window.open("kitei_preview.html", "preview", "width=800,height=600,scrollbars=yes");
}

function openLink() {
	window.open("kitei_sub_link.html", "sub", "width=540,height=230");
}

function openImage() {
	window.open("kitei_sub_image.html", "sub", "width=600,height=290");
}

function gotoMoyoSearch() {
	location.href = "moyo_search.html";
}

function gotoMoyoList() {
	location.href = "moyo_list.html";
}

function gotoCondition() {
	location.href = "/kinenkan/condition/condition_list.html";
}

/**
	引数に指定された時間から3秒以上経過していたらtrue、
	それ以外の場合はfalseを返す
	引数：1970年1月1日午前00:00:00からの秒数
	戻り値：true or false
*/
function isThreeSecPassed(lastTime) {
	var currentTime = (new Date()).getTime();
	if(currentTime == 0 ||
		currentTime >= lastSubmitTime + 3*1000) {
		lastSubmitTime = (new Date()).getTime();
		return true;
	} else {
		return false;
	}
}

/**
	確認ダイアログを出力する。
	引数：確認メッセージ
	戻り値：確認済みかどうか(true:確認)
*/
function confirmProcess(message) {
	var flg = false;
	if(message == "" || message == null) {
		flg = true;
	} else {
		flg = confirm(message + "します。よろしいですか？");
	}
	return flg;
}
/** 情報公開ページへ遷移 */
function gotoKoukai() {
	location.href = "http://www.nippon-foundation.or.jp/org/profile/koukai.html";
}

/** 情報公開ページへ遷移(別ウィンドウ） */
function gotoKoukaiOpenWin() {
	window.open('http://www.nippon-foundation.or.jp/org/profile/koukai.html');
}