
/* popup */
function popup(url,windowname,width,height) {
var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
if (width) {
if (window.screen.width > width)
	features+=", left="+(window.screen.width-width)/2;
else width=window.screen.width;
	features+=", width="+width;
}
if (height) {
if (window.screen.height > height)
	features+=", top="+(window.screen.height-height)/2;
else height=window.screen.height;
	features+=", height="+height;
}
window.open(url,windowname,features);
}

/* header */
function header(number) {
	number = number || 3; //引数 number が指定されていない場合はデフォルトで3を代入する。
	var prefix = '';
	for (var i= 1; i < number; i++) prefix += '../';
	
	document.write('<div id="header">');
	document.write('<div id="headerlogo01"><a href="'+ prefix +'"><strong>ガーラ</strong></a></div>');
	document.write('<div id="headertext" class="txt10"><img src="'+ prefix +'images/global/arrow.gif" width="9" height="9" alt="" /> <a href="https://www.gala.jp/contact/index.cgi">お問い合わせ</a>　<img src="'+ prefix +'images/global/arrow.gif" width="9" height="9" alt="" /> <a href="'+ prefix +'sitemap.html">サイトマップ</a>　<img src="'+ prefix +'images/global/arrow.gif" width="9" height="9" alt="" /> <a href="'+ prefix +'english/index.html">ENGLISH</a>　<img src="'+ prefix +'images/global/arrow.gif" width="9" height="9" alt="" /> <a href="'+ prefix +'korea/">KOREAN</a></div>');
	document.write('</div>');
} // header()

/* footer */
function footer(number) {
	number = number || 3; //引数 number が指定されていない場合はデフォルトで3を代入する。
	var prefix = '';
	for (var i= 1; i < number; i++) prefix += '../';
	
	document.write('<div id="footerbg"><div id="footer">');
	document.write('<div id="copyright"><span>Copyright(C)Gala Inc. All Right Reserved.</span></div>');
	document.write('<div id="footermenu"><a href="'+ prefix +'about.html"><img src="'+ prefix +'images/global/footer_menu01.gif" width="93" height="30" alt="このサイトについて" /></a><a href="'+ prefix +'p_info.html"><img src="'+ prefix +'images/global/footer_menu02.gif" width="94" height="30" alt="個人情報保護方針" /></a><a href="'+ prefix +'p_handling.html"><img src="'+ prefix +'images/global/footer_menu03.gif" width="128" height="30" alt="個人情報の取扱いについて" /></a></div>');
	document.write('</div></div>');
} // footer()



function MenuOn(x){
	obj=document.getElementById("submenu"+x).style.visibility="visible";
}

function MenuOff(x){
	obj=document.getElementById("submenu"+x).style.visibility="hidden";
}


function headermenutop() {
	document.write('<div class="menu">');
	document.write('<div id="tophome"><a href="index.html"><span>ホーム</span></a></div>');
	document.write('<div id="menu1" onmouseover="MenuOn(1)" onmouseout="MenuOff(1)">');
	document.write('<div id="topbusiness"><a href="business/div_og.html"><span>事業内容</span></a></div>');
	document.write('<div class="submenu" id="submenu1">');
	document.write('<a href="business/div_og.html"><u>オンラインゲーム事業</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="business/div_dm.html"><u>データマイニング事業</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="business/div_cs.html"><u>コミュニティ・ソリューション事業</u></a>');
	document.write('</div>');
	document.write('</div>');
	document.write('<div id="menu2" onmouseover="MenuOn(2)" onmouseout="MenuOff(2)">');
	document.write('<div id="topcompany"><a href="company/index.html"><span>企業情報</span></a></div>');
	document.write('<div class="submenu" id="submenu2">');
	document.write('<a href="company/profile.html"><u>会社概要</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/philosophy.html"><u>経営理念</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/history.html"><u>沿革</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/property.html"><u>知的財産権情報</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/governance.html"><u>コーポレート・ガバナンス</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/internalcontrol.html"><u>内部統制</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/group.html"><u>グループ会社</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/organization.html"><u>組織図</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="company/map.html"><u>本社地図</u></a>');
	document.write('</div>');
	document.write('</div>');
	document.write('<div id="menu3" onmouseover="MenuOn(3)" onmouseout="MenuOff(3)">');
	document.write('<div id="topir"><a href="ir/index.html"><span>投資家の皆様へ</span></a></div>');
	document.write('<div class="submenu" id="submenu3">');
	document.write('<a href="ir/topmessage.html"><u>代表挨拶</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="ir/faq.html"><u>GALA事業に関するFAQ</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="ir/policy.html"><u>ディスクロージャー・ポリシー</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="ir/finance.html"><u>IRライブラリー</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="http://stocks.finance.yahoo.co.jp/stocks/detail/?code=4777.Q" target="_blank"><u>株価情報</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="ir/calendar.html"><u>IRカレンダー</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="ir/shareholder.html"><u>株主様ご優待について</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="https://www.gala.jp/form/irmnews.html" onclick="popup(this.href,\'mail\',460,460); return false;"><u>メール通知サービス</u></a>');
	document.write('</div>');
	document.write('</div>');
	document.write('<div id="menu4" onmouseover="MenuOn(4)" onmouseout="MenuOff(4)">');
	document.write('<div id="topnews"><a href="news/index.html"><span>ニュース</span></a></div>');
	document.write('<div class="submenu" id="submenu4">');
	document.write('<a href="news/index.html"><u>プレスリリース</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="news/index.html#pub"><u>パブリシティ</u></a>');
	document.write('</div>');
	document.write('</div>');
	document.write('<div id="menu5" onmouseover="MenuOn(5)" onmouseout="MenuOff(5)">');
	document.write('<div id="toprecruit"><a href="recruit/index.html"><span>採用情報</span></a></div>');
	document.write('<div class="submenu" id="submenu5">');
	document.write('<a href="recruit/index.html"><u>GALAが目指すもの</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="recruit/system.html"><u>人事制度</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="recruit/information.html"><u>募集要項</u></a>');
	document.write('</div>');
	document.write('</div>');
	document.write('</div>');
} // headermenutop()


/* headermenu */
function headermenu(number) {
	// 今いるページのURL
	var nowUrl = window.location.href;
	// サイトTOPページと推測されるURL
	var rootUrl = document.getElementById('headerlogo01').getElementsByTagName('a')[0].href;
	
	if (rootUrl.slice(-1) != '/') {
		var tmp = rootUrl.split('/');
		tmp.pop();
		rootUrl = tmp.join('/') + '/';
	} //alert(rootUrl);
	
	// サイトTOPから数えて何階層下にいるか。
	var depthsDiff = nowUrl.split('/').length - rootUrl.split('/').length;
	
	// 相対パスを構築
	var prefix = '';
	for (var i = 0; i < depthsDiff; i++) prefix += '../';
	
	// 引数numberの値と対応するメニューのID名に'2'を付ける。
	// 例えば、numberの値が4だったとすると、ニュースのメニューを選択状態にしたい。
	var flags = [
		'', // 0 => (HOME)
		'', // 1 => 事業内容 business
		'', // 2 => 企業情報 company
		'', // 3 => 投資家   ir
		'', // 4 => ニュース news
		''  // 5 => 採用情報 recruit
	];
	if (number && number < flags.length) flags[number] = '2';
	
	
	document.write('<div class="menu">');
	document.write('<div id="home"><a href="'+ prefix +'index.html"><span>ホーム</span></a></div>');

	document.write('<div id="menu1" onmouseover="MenuOn(1)" onmouseout="MenuOff(1)">');
	document.write('<div id="business'+ flags[1] +'"><a href="'+ prefix +'business/div_og.html"><span>事業内容</span></a></div>');
	document.write('<div class="submenu" id="submenu1">');
	document.write('<a href="'+ prefix +'business/div_og.html"><u>オンラインゲーム事業</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'business/div_dm.html"><u>データマイニング事業</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'business/div_cs.html"><u>コミュニティ・ソリューション事業</u></a>');
	document.write('</div>');
	document.write('</div>');

	document.write('<div id="menu2" onmouseover="MenuOn(2)" onmouseout="MenuOff(2)">');
	document.write('<div id="company'+ flags[2] +'"><a href="'+ prefix +'company/index.html"><span>企業情報</span></a></div>');
	document.write('<div class="submenu" id="submenu2">');
	document.write('<a href="'+ prefix +'company/profile.html"><u>会社概要</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/philosophy.html"><u>経営理念</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/history.html"><u>沿革</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/property.html"><u>知的財産権情報</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/governance.html"><u>コーポレート・ガバナンス</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/internalcontrol.html"><u>内部統制</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/group.html"><u>グループ会社</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/organization.html"><u>組織図</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'company/map.html"><u>本社地図</u></a>');
	document.write('</div>');
	document.write('</div>');

	document.write('<div id="menu3" onmouseover="MenuOn(3)" onmouseout="MenuOff(3)">');
	document.write('<div id="ir'+ flags[3] +'"><a href="'+ prefix +'ir/index.html"><span>投資家の皆様へ</span></a></div>');
	document.write('<div class="submenu" id="submenu3">');
	document.write('<a href="'+ prefix +'ir/topmessage.html"><u>代表挨拶</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'ir/faq.html"><u>GALA事業に関するFAQ</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'ir/policy.html"><u>ディスクロージャー・ポリシー</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'ir/finance.html"><u>IRライブラリー</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="http://stocks.finance.yahoo.co.jp/stocks/detail/?code=4777.Q" target="_blank"><u>株価情報</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'ir/calendar.html"><u>IRカレンダー</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'ir/shareholder.html"><u>株主様ご優待について</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="https://www.gala.jp/form/irmnews.html" onclick="popup(this.href,\'mail\',460,460); return false;"><u>メール通知サービス</u></a>');
	document.write('</div>');
	document.write('</div>');

	document.write('<div id="menu4" onmouseover="MenuOn(4)" onmouseout="MenuOff(4)">');
	document.write('<div id="news'+ flags[4] +'"><a href="'+ prefix +'news/index.html"><span>ニュース</span></a></div>');
	document.write('<div class="submenu" id="submenu4">');
	document.write('<a href="'+ prefix +'news/index.html"><u>プレスリリース</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'news/index.html#pub"><u>パブリシティ</u></a>');
	document.write('</div>');
	document.write('</div>');

	document.write('<div id="menu5" onmouseover="MenuOn(5)" onmouseout="MenuOff(5)">');
	document.write('<div id="recruit'+ flags[5] +'"><a href="'+ prefix +'recruit/index.html"><span>採用情報</span></a></div>');
	document.write('<div class="submenu" id="submenu5">');
	document.write('<a href="'+ prefix +'recruit/index.html"><u>GALAが目指すもの</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'recruit/system.html"><u>人事制度</u></a>');
	document.write('<span>｜</span>');
	document.write('<a href="'+ prefix +'recruit/information.html"><u>募集要項</u></a>');
	document.write('</div>');
	document.write('</div>');

	document.write('</div>');
}

