/**
 * トップのFlashファイルを表示する
 */
function top_flash() {
	document.open();
	document.writeln('<embed src="../flash/index.swf" wmode="opaque" menu="false" bgcolor="#ffffff" width="790" height="210" type="application/x-shockwave-flash" />');
	document.close();
}

/**
 * マウスが枠イメージに移動した時の処理
 * @param obj
 * @return
 */
function mouseover(obj) {
	obj.src="../images/main/image_waku_click.gif";
}

/**
 * マウスが枠イメージから外された時の処理
 * @param obj
 * @return
 */
function mouseout(obj) {
	obj.src="../images/main/image_waku.gif";
}

/**
 * マウスがログインボタンに移動した時の処理
 * @param obj
 * @return
 */
function loginmouseover(obj) {
	obj.src="../images/common/btn_login_c.gif";
}

/**
 * マウスがログインボタンイメージから外された時の処理
 * @param obj
 * @return
 */
function loginmouseout(obj) {
	obj.src="../images/common/botton_login.gif";
}

/**
 * マウスが新規会員登録ボタンに移動した時の処理
 * @param obj
 * @return
 */
function newmouseover(obj) {
	obj.src="../images/common/botton_douroku_click.gif";
}

/**
 * マウスが新規会員登録ボタンから外された時の処理
 * @param obj
 * @return
 */
function newmouseout(obj) {
	obj.src="../images/common/botton_douroku.gif";
}

/**
 * コラム画面に遷移する
 * @param obj
 * @return
 */
function toColumn(obj, colId) {
	
	if(colId == "0") {
		obj.actMode.value = "0";
		obj.colId.value = "0";
	} else {
		obj.actMode.value = "1";
		obj.colId.value = colId;
	}
	obj.action = "../html/column.html";
	obj.submit();
}

/**
 * アニメーション画面に遷移する
 * @param obj
 * @param aniId
 * @return
 */
function toAnimation(obj, aniId) {

	if(aniId == "0") {
		obj.actMode.value = "0";
		obj.aniId.value = "0";
	} else {
		obj.actMode.value = "1";
		obj.aniId.value = aniId;
	}
	obj.action = "../html/animation.html";
	obj.submit();
}

//【ログイン】ボタン制御
// ポップアップ画面開く
function toLogin() {

	w = 400; // 横幅
	h = 480; // 縦幅	  
	x = (screen.width  - w) / 2;
	y = (screen.height - h) / 2;

	var myVer = getVersion();

	if(myVer == "6.0") {
		window.open("https://www.mammahug.com/html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=235, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");
	} else if(myVer == "7.0") {
		window.open("https://www.mammahug.com/html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=185, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");
	} else if(myVer == "8.0") {
		window.open("https://www.mammahug.com/html/login.html?dispmode=index", "", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=185, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");	
	} else {
		var safari = myAgent.indexOf("Safari",0);
		var firefox = myAgent.indexOf("Firefox",0);
		if(safari > 0) {
			window.open("https://www.mammahug.com/html/login.html?dispmode=index", "mamma", "screenX=460,screenY=180,left=460,top=180,width=210, height=420, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");
		}
		if(firefox > 0) {
			window.open("https://www.mammahug.com/html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=185, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");	
		}
	}

/*
	if(myVer == "6.0") {
		window.open("../html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=235, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");
	} else if(myVer == "7.0") {
		window.open("../html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=185, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");
	} else if(myVer == "8.0") {
		window.open("../html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=185, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");	
	} else {
		var safari = myAgent.indexOf("Safari",0);
		var firefox = myAgent.indexOf("Firefox",0);
		if(safari > 0) {
			window.open("../html/login.html?dispmode=index", "mamma", "screenX=460,screenY=180,left=460,top=180,width=210, height=420, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");
		}
		if(firefox > 0) {
			window.open("../html/login.html?dispmode=index", "mamma", "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width=185, height=387, menubar=0, location=0, status=0, scrollbars=0, resizable=0, titlebar=0");	
		}
	}
*/
	
	
}


function showToolTip1(e){
	if(document.all)e = event;
	
	var text = "<img src='../images/common/praisethelord.gif' border=0 >";
	var obj = document.getElementById('bubble_tooltip');
	var obj2 = document.getElementById('bubble_tooltip_content');
	obj2.innerHTML = text;
	obj.style.display = 'block';
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
	var leftPos = e.clientX - 100;
	if(leftPos<0)leftPos = 0;
//	obj.style.left = leftPos + 'px';
//	obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';

	obj.style.left = '850px';
	obj.style.top = '2100px';
}	

function hideToolTip1()
{
	document.getElementById('bubble_tooltip').style.display = 'none';
	
}

function showToolTip2(e){
	if(document.all)e = event;
	
	var text = "<img src='../images/common/praisethelord.gif' border=0 >";
	var obj = document.getElementById('bubble_tooltip');
	var obj2 = document.getElementById('bubble_tooltip_content');
	obj2.innerHTML = text;
	obj.style.display = 'block';
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
	var leftPos = e.clientX - 100;
	if(leftPos<0)leftPos = 0;
//	obj.style.left = leftPos + 'px';
//	obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';

	obj.style.left = '840px';
	obj.style.top = '2110px';
}	

function hideToolTip2()
{
	document.getElementById('bubble_tooltip').style.display = 'none';
	
}
