var baseurl;
var url = location.href;
if(url.indexOf("/member/") >= 0){
	baseurl = '../';
}else if(url.indexOf("/dl/") >= 0){
	baseurl = '../';
}else if(url.indexOf("/help/") >= 0){
	baseurl = '../';
}else if(url.indexOf("/dlhelp/") >= 0){
	baseurl = '../';
}else{
	baseurl = '';
}

//<!-- ▽▽共通ヘッダ開始▽▽ -->
//<SCRIPT type="text/javascript">
//<!--
//printHeader("t_cart");
////-->
//</SCRIPT>
//<!-- △△共通ヘッダ終了△△ -->

function printHeader(h2_class){

	document.write('<a name="pagetop"></a>');

	document.write('<table class="public" width="738" border="0" cellspacing="0" cellpadding="0" height="100%" align="center">');
	document.write('  <tr>');
	document.write('    <td valign="top">');

	document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" class="printRestriction" summary=""><tr valign="top"><td width="100%" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td align="left"><img src="'+baseurl+'common/images/clear.gif" width="8" height="12" border="0" alt=""><br><img src="'+baseurl+'common/images/clear.gif" width="8" height="8" border="0" alt=""><a href="http://www.square-enix.com/jp/" target="_top"><img src="'+baseurl+'common/images/pheader-logo-white.gif" width="130" height="14" border="0" alt="SQUARE ENIX"></a><br><img src="'+baseurl+'common/images/clear.gif" width="8" height="11" border="0" alt=""><br></td><td align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+baseurl+'common/images/clear.gif" width="8" height="13" border="0" alt=""></td></tr><tr valign="top"><td align="right"><img src="'+baseurl+'common/images/clear.gif" width="8" height="8" border="0" alt=""><a href="http://www.square-enix.com/jp/product/" target="_top"><img src="'+baseurl+'common/images/pproduct-white.gif" width="102" height="11" border="0"></a><img src="'+baseurl+'common/images/clear.gif" width="16" height="7" border="0" alt=""><a href="http://www.square-enix.com/jp/support/" target="_top"><img src="'+baseurl+'common/images/psupport-white.gif" width="51" height="11" border="0"></a><img src="'+baseurl+'common/images/clear.gif" width="8" height="8" border="0" alt=""><br></td></tr></table></td></tr></table></td></tr><tr valign="top"><td bgcolor="#FFFFFF"><img src="'+baseurl+'common/images/clear.gif" width="8" height="1" border="0" alt=""></td></tr></table>');
	document.write('      <div id="header" class="clear-fix" style="border-top: solid 1px #FFFFFF;">');
	document.write('        <h1>SQUARE&nbsp;ENIX&nbsp;E-STORE</h1>');
	document.write('        <a class="navi_home" href="http://member.square-enix.com/jp/store/">Home</a>');
	if(h2_class == 't_ffxi_tial' || h2_class == 't_ffxi_code'){
		document.write('        <ul class="navi_top_dl clear-fix">');
		document.write('          <li class="navi_top_dl_01"></li>');
		document.write('          <li class="navi_top_dl_02"></li>');
		document.write('          <li class="navi_top_dl_03"><a href="'+baseurl+'dlhelp/help.aspx">ご利用ガイド</a></li>');
		document.write('          <li class="navi_top_dl_04"><a href="'+baseurl+'help/contact.aspx">お問い合わせ</a></li>');
	}else{
		document.write('        <ul class="navi_top_code_dl clear-fix">');
		document.write('          <li class="navi_top_code_dl_01"><a href="https://member.square-enix.com/jp/member/" target="_blank">アカウント情報</a></li>');
		document.write('          <li class="navi_top_code_dl_02"><a href="'+baseurl+'member/OrderList.aspx">ご購入履歴</a></li>');
		document.write('          <li class="navi_top_code_dl_03"><a href="'+baseurl+'dlhelp/help.aspx">ご利用ガイド</a></li>');
		document.write('          <li class="navi_top_code_dl_04"><a href="'+baseurl+'help/contact.aspx">お問い合わせ</a></li>');
	}
	document.write('        </ul>');
	if(h2_class == 't_cart'){
		document.write('        <h2 class="t_ffxi_code">FINAL FANTASY XIダウンロード製品</h2>');
	}else if(h2_class == 't_ffxi_tial'){
		document.write('        <h2 class="t_ffxi_tial">FINAL FANTASY XIダウンロード製品</h2>');
	}else if(h2_class == 't_ffxi_code'){
		document.write('        <h2 class="t_ffxi_code">FINAL FANTASY XIダウンロード製品</h2>');
	}else if(h2_class == 't_dlguide'){
		document.write('        <h2 class="t_dlguide">ご利用ガイド</h2>');
	}else if(h2_class == 't_privacy'){
		document.write('        <h2 class="t_privacy">プライバシーポリシー</h2>');
	}else if(h2_class == 't_rules'){
		document.write('        <h2 class="t_rules">ご利用規約</h2>');
	}else if(h2_class == 't_contact'){
		document.write('        <h2 class="t_contact">お問い合わせ</h2>');
	}else if(h2_class == 't_download'){
		
	}else if(h2_class == 'err'){
		document.write('        <h2>エラー</h2>');
	}else if(h2_class == 't_information'){
                document.write('        <h2 class="t_information">インフォメーション</h2>');
	}else if(h2_class == 'info_head'){
		document.write('      <table border="0" cellpadding="0" cellspacing="0" id="header_info">');
		document.write('        <tr>');
		document.write('          <td class="text_l">ドラゴンクエストモンスターズ&nbsp;ジョーカー予約開始!!</td>');
		document.write('          <td class="text_r"><a href="'+baseurl+'news/" ><img src="'+baseurl+'images/b_list.gif" alt="インフォメーション一覧を見る" width="74" height="18" /></a></td>');
		document.write('        </tr>');
		document.write('      </table>');
	}
	document.write('        <a class="main_logo" href="http://member.square-enix.com/jp/store/"> </a>');
	document.write('      </div>');
	
}

//<!-- ▽▽共通フッタ開始▽▽ -->
//<SCRIPT type="text/javascript">
//<!--
//printFooter();
////-->
//</SCRIPT>

//<!-- △△共通フッタ終了△△ -->
function printFooter(){
	document.write('    </td>');
	document.write('  </tr>');
	document.write('  <tr>');
	document.write('    <td height="120" valign="bottom">');
	document.write('      <div id="footer">');
	document.write('      <table height="5" width="147"><tr><td align="right"><a href="http://member.square-enix.com/jp/store/"><img src="'+baseurl+'images/b_toppage.gif" alt="トップページへ戻る" /></a></td></tr></table>');
	document.write('      <div class="pagetop"><a href="#pagetop"><img src="'+baseurl+'images/pagetop.gif" alt="ページの先頭へ戻る" /></a></div><table><tr><td height="14"></td></tr></table>');
	document.write('        <table align="center" width="693"><tr>');
	document.write('          <td width="120" valign="middle" height="20" class="navi_sqex_02"><a href="http://www.square-enix.com/jp/privacy/" target="_blank"><img src="'+baseurl+'images/pry.gif" alt="プライバシーポリシー" width="101" height="12" border="0"></a></td>');
	document.write('          <td valign="middle" class="navi_sqex_02"><a href="'+baseurl+'help/kiyaku.aspx"><img src="'+baseurl+'images/goriyou.gif" alt="ご利用規約" width="67" height="12" border="0"></a></td>');
	document.write('          <td valign="middle" align="right"><!--<iframe width="1" height="1" src="http://www.square-enix.com/acc/member_square-enix_com/jp_store/acc.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" align="middle"></iframe>--><img src="'+baseurl+'images/copyright.gif" alt="Copyright (C) 2007 SQUARE ENIX CO., LTD. ALL Rights Reserved." width="301" height="18" border="0"></td>');
	document.write('        </tr></table>');
	document.write('      </div>');
	document.write('    </td>');
	document.write('  </tr>');
	document.write('</table>');
}

function printFooter1(){
	document.write('    </td>');
	document.write('  </tr>');
	document.write('  <tr>');
	document.write('    <td height="120" valign="bottom">');
	document.write('      <div id="footer">');
	document.write('      <table height="5" width="147"><tr><td align="right"><a href="http://member.square-enix.com/jp/store/"><img src="'+baseurl+'images/b_toppage.gif" alt="トップページへ戻る" /></a></td></tr></table>');
	document.write('      <div class="pagetop1"><a href="#pagetop"><img src="'+baseurl+'images/pagetop.gif" alt="ページの先頭へ戻る" /></a></div><table><tr><td height="14"></td></tr></table>');
	document.write('        <table align="center" width="693"><tr>');
	document.write('          <td width="120" valign="middle" height="20" class="navi_sqex_02"><a href="http://www.square-enix.com/jp/privacy/" target="_blank"><img src="'+baseurl+'images/pry.gif" alt="プライバシーポリシー" width="101" height="12" border="0"></a></td>');
	document.write('          <td valign="middle" class="navi_sqex_02"><a href="'+baseurl+'help/kiyaku.aspx"><img src="'+baseurl+'images/goriyou.gif" alt="ご利用規約" width="67" height="12" border="0"></a></td>');
	document.write('          <td valign="middle" align="right"><!--<iframe width="1" height="1" src="http://www.square-enix.com/acc/member_square-enix_com/jp_store/acc.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" align="middle"></iframe>--><img src="'+baseurl+'images/copyright.gif" alt="Copyright (C) 2008 SQUARE ENIX CO., LTD. ALL Rights Reserved." width="301" height="18" border="0"></td>');
	document.write('        </tr></table>');
	document.write('      </div>');
	document.write('    </td>');
	document.write('  </tr>');
	document.write('</table>');
}
function CloseWin(){
    window.close();
}
