var header_A =
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=../../images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><a href=\"/cnt/00/help/docs/d/00/01.html\"><IMG' +
	'				src=../../images/tab_magicgarden_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/a/00/01.html\"><IMG' +
	'				src=../../images/tab_shopping_on.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/b/00/01.html\"><IMG' +
	'				src=../../images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/c/00/01.html\"><IMG' +
	'				src=../../images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"></a></td>' +
	'		</tr>' +
	'	</table>';

var header_A_index =
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><IMG' +
	'				src=images/tab_shopping_on.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></td>' +
	'		</tr>' +
	'	</table>';


// 出店ガイドヘッダーヘッダー
var header_B = 
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=../../images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><a href=\"/cnt/00/help/docs/d/00/01.html\"><IMG' +
	'				src=../../images/tab_magicgarden_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/a/00/01.html\"><IMG' +
	'				src=../../images/tab_shopping_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/b/00/01.html\"><IMG' +
	'				src=../../images/tab_openGuide_on.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/c/00/01.html\"><IMG' +
	'				src=../../images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"></a></td>' +
	'		</tr>' +
	'	</table>';

var header_B_index = 
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><IMG' +
	'				src=images/tab_shopping_on.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></td>' +
	'		</tr>' +
	'	</table>';


// ショップオーナーヘルプヘッダー
var header_C = 
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=../../images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><a href=\"/cnt/00/help/docs/d/00/01.html\"><IMG' +
	'				src=../../images/tab_magicgarden_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/a/00/01.html\"><IMG' +
	'				src=../../images/tab_shopping_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/b/00/01.html\"><IMG' +
	'				src=../../images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/c/00/01.html\"><IMG' +
	'				src=../../images/tab_shopOwner_on.png style=\"margin-left : 5px ;\"></a></td>' +
	'		</tr>' +
	'	</table>';

var header_C_index = 
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><IMG' +
	'				src=images/tab_shopping_on.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></td>' +
	'		</tr>' +
	'	</table>';


// マジックガーデンとは？ヘッダー
var header_D = 
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=../../images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><a href=\"/cnt/00/help/docs/d/00/01.html\"><IMG' +
	'				src=../../images/tab_magicgarden_on.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/a/00/01.html\"><IMG' +
	'				src=../../images/tab_shopping_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/b/00/01.html\"><IMG' +
	'				src=../../images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></a><a href=\"/cnt/00/help/docs/c/00/01.html\"><IMG' +
	'				src=../../images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"></a></td>' +
	'		</tr>' +
	'	</table>';

var header_D_index = 
	'	<table border=0>' +
	'		<tr>' +
	'			<td><a href=\"/help/index.jsp\"><IMG src=images/header_logo.png alt=Magic Garden ヘルプ></a></td>' +
	'			<td valign=bottom class=tabs nowrap><IMG' +
	'				src=images/tab_shopping_on.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_shopOwner_off.png style=\"margin-left : 5px ;\"><IMG' +
	'				src=images/tab_openGuide_off.png style=\"margin-left : 5px ;\"></td>' +
	'		</tr>' +
	'	</table>';

var footer =
	'	<table width=100%>' +
	'		<tr>' +
	'			<td width=10% align=left><a href=\"http://www.linkclub.jp/\" target=_blank><img src=\"http://magicgarden.jp/img/top/header_linkclubLogo.gif\"></a></td>' +
	'			<td width=90% align=right><img src=\"../../images/footer_logo.png\" alt=""> <a HREF=\"javascript:window.opener=window;var win = window.open(location.href,\'_self\');win.close();\"><img src=\"../../images/footer_close.png\" alt=\"閉じる\"></a></td>' +
	'		</tr>' +
	'	</table>';
	
var footer_index =
	'	<table width=100%>' +
	'		<tr>' +
	'			<td width=10% align=left><a href=\"http://www.linkclub.jp/\" target=_blank><img src=\"http://magicgarden.jp/img/top/header_linkclubLogo.gif\"></a></td>' +
	'			<td width=90% align=right><img src=\"images/footer_logo.png\" alt=""> <img src=\"images/footer_close.png\" alt=\"閉じる\"></td>' +
	'		</tr>' +
	'	</table>';


function outputHelpFooter(isIndex) {
	
	var footer_layer = document.getElementById('footer_layer');
	if (footer_layer != null) {
		if (isIndex == null) {
			footer_layer.innerHTML = footer;
		} else {
			footer_layer.innerHTML = footer_index;
		}
		footer_layer.style.display = 'block';
	}
}

function outputHelpHeader(header) {

	var header_layer = document.getElementById('header_layer');
	var isIndex = null;
	
	if (header_layer != null) {
		
		if ('A' == header) {
			header_layer.innerHTML = header_A;
		}
		
		if ('B' == header) {
			header_layer.innerHTML = header_B;
		}
		
		if ('C' == header) {
			header_layer.innerHTML = header_C;
		}
		
		if ('D' == header) {
			header_layer.innerHTML = header_D;
		}

		if ('A_INDEX' == header) {
			header_layer.innerHTML = header_A_index;
			isIndex = 'true';
		}

		if ('B_INDEX' == header) {
			header_layer.innerHTML = header_B_index;
			isIndex = 'true';
		}

		if ('C_INDEX' == header) {
			header_layer.innerHTML = header_C_index;
			isIndex = 'true';
		}

		if ('D_INDEX' == header) {
			header_layer.innerHTML = header_D_index;
			isIndex = 'true';
		}
		
		header_layer.style.display = 'block';
	}
	
	outputHelpFooter(isIndex);
}

function send(type) {
	
	if (document.forms[0].q.value.length > 0) {
		if ('A' == type) {
			document.forms[0].prefix.value = '/data/cnt/00/help/docs/a/';
		}
		
		if ('B' == type) {
			document.forms[0].prefix.value = '/data/cnt/00/help/docs/b/';
		}
		
		if ('C' == type) {
			document.forms[0].prefix.value = '/data/cnt/00/help/docs/c/';
		}
		
		if ('D' == type) {
			document.forms[0].prefix.value = '/data/cnt/00/help/docs/d/';
		}
		document.forms[0].action = '/help/search';
		document.forms[0].submit();
		return true;
	} else {
		return false;
	}
}

function displayAnswer(answerId) {
	
	var questions = document.getElementsByTagName('h6');
	if (questions == null) {
		return;
	}
	
	var answer_layer = document.getElementById(answerId);
	if (answer_layer != null) {
		answer_layer.style.display = 'block';
	}
	
	for (var i = 1; i < questions.length+1; i++) {
		var id = 'a'+i;
		if (id != answerId) {
			if (document.getElementById(id) != null) {
				document.getElementById(id).style.display = 'none';
			}
		}
	}
}

function clearTxt(obj) {   
    var compareStr="検索キーワード";  
    if (obj.value==compareStr) {
        obj.value='';
    }
}


function hideMenuDiv(){
		var strUrl=document.location.href;
		if(strUrl.indexOf("html#pdiv")<=-1){
			return;
		}
		var headDiv = document.getElementById("headDiv");
		headDiv.style.display="none";
		var seachDiv = document.getElementById("seachId");
		seachDiv.style.display="none";
		var leftMenuDiv = document.getElementById("menu_cell");
		leftMenuDiv.style.display="none";
		var footDiv = document.getElementById("footerSubDiv");
		footDiv.style.display="none";
		
		//resizeTo(500,550);
		window.location=strUrl;
		moveTo(1150,200);
		
}
