﻿function L2header() {
	var sGpotatoUrl = "http://gpotato.jp";
	var sImageUrl = "http://image.gpotato.jp";
	var sRappelzUrl = "http://rappelz.gpotato.jp";
	var sSecureUrl = "https://secure.gpotato.jp";
	var sBillUrl = "http://bill.gpotato.jp";
		
	var domain = location.hostname;

	if (domain.indexOf("test")!= -1){
		sGpotatoUrl = "http://test.gpotato.jp";
	    sImageUrl = "http://test.image.gpotato.jp";
	    sRappelzUrl = "http://test.rappelz.gpotato.jp";
		sSecureUrl = "https://test.secure.gpotato.jp:444";
	    sBillUrl = "http://test.bill.gpotato.jp";
	}
    
	document.write('<table width="900" height="57" border="0" cellpadding="0" cellspacing="0" class="L2header">\n');
	document.write('<tr>\n');
	document.write('<td width="155" valign="bottom"><a href="' + sGpotatoUrl + '/" target = "_blank"><img src="' + sImageUrl + '/gpotato/images/global/header_logo.gif" width="155" height="57" alt="Gポテト" border="0"></a></td>\n');
	document.write('<td valign="bottom"><img src="' + sImageUrl + '/gpotato/images/global/header_copy.gif" width="197" height="57" alt="取れ立てゲームはGポテト！"></td>\n');
	document.write('<td><img src="' + sImageUrl + '/gpotato/images/global/spacer.gif" width="5" height="57" alt=""></td>\n');
	document.write('<td valign="middle">\n');
	document.write('<table height="22" border="0" cellpadding="0" cellspacing="0">\n');
	document.write('<tr>\n');
	document.write('<td><img src="' + sImageUrl + '/gpotato/images/global/spacer.gif" width="418" height="22" alt=""></td>\n');
	document.write('<td><a href="' + sRappelzUrl + '/Index.aspx"><img src="' + sImageUrl + '/gpotato/images/global/headerin_menu01.gif" width="46" height="22" alt="HOME" border="0"></a></td>\n');
	document.write('<td><a href="' + sRappelzUrl + '/Rules/Sitemap.aspx"><img src="' + sImageUrl + '/gpotato/images/global/headerin_menu02.gif" width="78" height="22" alt="サイトマップ" border="0"></a></td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('</td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');

} // L2header()