
	function lunaAlert(msg, func) {
		layerAlert.open(msg, ['img_css btn_ok'], func );
		return false;
	}

	function requireLoginMgjp(url) {
		if (isLogin()) return true;
		if ( typeof(url) == 'object' )
			top.location.href = 'http://www.mgame.jp/login.html?dest=' + getLoginDest(url);
		else if ( typeof(url) == 'string' )
			top.location.href = 'http://www.mgame.jp/login.html?dest=' + base64_encode(url);
		else
			top.location.href = 'http://www.mgame.jp/login.html?dest=' + base64_encode('lunatia.mgame.jp/');
		return false;
	}

	function getLoginDest(obj) {
		if (obj.location.href) {
			var url = obj.location.href.toString();
			url = url.replace(/https*:\/\//gi, '');
			return base64_encode(url);
		}
		return '';
	}

	function checkLogin4Regist() {
		if (isLogin()) {
			layerAlert.open('-1さんはすでに会員に登録されています。', ['img_css btn_ok'], null );
			return false;
		}else{
			return true;
		}
	}
	
	function openLunaSlot() {
		var LunaSlotWindow = window.open( '/shop/slot/main.html', 'LunaSlot', 'width=980,height=700,location=0,status=0,menubar=0,scrollbars=0,resizable=0' );
		if (!LunaSlotWindow)
			alert('          ポップアップがブロックされています。\n\n「Luna Slot」実行のためにポップアップを許可してください。 ');
		return false;
	}
