﻿// Launch E-Alert window.
function openEAlert() {
	eAlertWindow = window.open('http://poweredby.asia.morningstar.com/pwd/tw/Fidelity/MemberLogin.aspx', 'eAlertWindow', 'width=600,height=500,scrollbars,resizable,status');
	if(!eAlertWindow) {
		alert('我們無法開啟新視窗載入停損停利點設定內容。若您安裝跳出視窗阻擋軟體，請變更其設定允許富達投資服務網開啟新新視窗。');
	}
}

// Detect the current depth of directory levels.
if(window.location.href.indexOf('htdocs') > -1) {
	// Viewed from local file system.
	var path = window.location.href.substr(window.location.href.indexOf('htdocs'));
}
else {
	// Viewed from server.
	var path = window.location.pathname;
}
var isIntermediary = window.location.href.indexOf('intermediary') > -1 ? true : false;
var forceIntermediary = window.mmIsIntermediary == null ? false : true;
var pathPrefix = '';
var levels = path.split('/');
for(var i = 1; i <= levels.length - (isIntermediary ? 3 : 2); i++) {
	pathPrefix += '../';
}

	// Menu content for public section.
	document.write('<table id="mainNavTabContainer" width="770" height="70" border="0" cellpadding="0" cellspacing="0">');
	document.write('  <tr bgcolor="#E9F4FF">');
	document.write('    <td width="162"><img src="' + pathPrefix + 'images/logo.gif" width="142" height="50"></td>');
	document.write('    <td width="864" valign="bottom">');
	document.write('    <table border="0" cellpadding="0" cellspacing="0">');	
	document.write('        <tr>');	
	document.write('          <td colspan="21" width="100%" align="right">');	
	//document.write('          <span align="right" class="footer">');	
	document.write('          <a href="' + pathPrefix + 'common/contact_us.htm" class="footer">連絡我們</a>');
	document.write('          <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT="">');
	document.write('          <a href="' + pathPrefix + 'common/faq.htm" class="footer">常用問答集</a>');
	document.write('          <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT="">');
	document.write('          <a href="' + pathPrefix + 'common/sitemap.htm" class="footer">網站導覽</a>');		
	document.write('          <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT="">');
    document.write('          <a href="http://www.google.com.tw/ig/adde?moduleurl=www.fidelity.com.tw/filtw_gadget.xml" target="_blank" class="footer">iGoogle小工具</a>');
	document.write('          <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT="">');  
  //document.write('          </span>');
  document.write('          </td>');		  
	document.write('        </tr>');	
	document.write('        <tr>');
	document.write('          <td id="mainMenuTab_home" width="76" align="center" valign="middle" style="background-color:#E9F4FF; padding:0px;"><a href="' + pathPrefix + 'index.htm" onMouseOver="document.images[\'mainMenuTabImg_home\'].src=\'' + pathPrefix + 'images/menu_home_highlight.gif\';" onMouseOut="document.images[\'mainMenuTabImg_home\'].src=\'' + pathPrefix + 'images/menu_home.gif\';"><img name="mainMenuTabImg_home" src="' + pathPrefix + 'images/menu_home.gif" width="76" height="19" border="0"></a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_openaccount" width="76" align="center" class="tabNormal"><a href="' + pathPrefix + 'newopen/index.htm">開立帳戶</a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_investment" width="76" align="center" class="tabNormal"><a href="' + pathPrefix + 'investment/index.htm">投資規劃</a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_perspectives" width="76" align="center" class="tabNormal"><a href="' + pathPrefix + 'news/news_2.htm">投資觀點</a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_overview" width="76" align="center" class="tabNormal"><a href="' + pathPrefix + 'overview/index.htm">基金總覽</a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_news" width="76" align="center" class="tabNormal"><a href="' + pathPrefix + 'news/index.htm">新聞中心</a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_info" width="76" align="center" class="tabNormal"><a href="/form/info_1.htm">資料索取</a></td>');
	document.write('          <td align="center" bgcolor="#97B7C8"> <IMG SRC="' + pathPrefix + 'images/space.gif" WIDTH=1 HEIGHT=18 ALT=""></td>');
	document.write('          <td id="mainMenuTab_about" width="76" align="center" class="tabNormal"><a href="' + pathPrefix + 'about/index.htm">關於富達</a></td>');
	document.write('        </tr>');
	document.write('    </table></td>');
	document.write('  </tr>');
	document.write('  <tr bgcolor="#92BAE9">');
	document.write('    <td height="20" valign="middle">&nbsp;</td>');
	document.write('    <td height="20" valign="middle">');
	document.write('		<div class="subMenu" id="subMenu_openaccount" style="position:absolute; visibility:hidden; left: 194px;">');
	document.write('			<a id="subMenu_openaccount_1" href="' + pathPrefix + 'newopen/index.htm" class="normal">投信基金交易流程</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_openaccount_2" href="' + pathPrefix + 'newopen/fist.htm" class="normal">境外基金交易流程</a>');
	document.write('		</div>');
	document.write('		<div class="subMenu" id="subMenu_investment" style="position:absolute; visibility:hidden; left: 204px;">');
	document.write('			<a id="subMenu_investment_1" href="' + pathPrefix + 'investment/investment_1.htm" class="normal">投資屬性測驗</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_investment_2" href="' + pathPrefix + 'investment/investment_2.htm" class="normal">投資目標試算</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_investment_3" href="' + pathPrefix + 'investment/investment_3_1.htm" class="normal">基金入門</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_investment_4" href="' + pathPrefix + 'investment/investment_4.htm" class="normal">退休投資講義</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_investment_5" href="' + pathPrefix + 'vor" target="_blank" class="normal">波動網站</a>');
	document.write('		</div>');
	document.write('		<div class="subMenu" id="subMenu_perspectives" style="position:absolute; visibility:hidden; left: 354px;">');
	document.write('			<a id="subMenu_perspectives_1" href="' + pathPrefix + 'news/news_2.htm" class="normal">富達觀點</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_perspectives_2" href="' + pathPrefix + 'video/video.htm" class="normal">專家網路視訊</a>');
	document.write('		</div>');
	document.write('		<div class="subMenu" id="subMenu_overview" style="position:absolute; visibility:hidden; left: 300px; width:500px;">');
	document.write('			<a id="subMenu_overview_1" href="' + pathPrefix + 'overview/index.htm" class="normal">基金淨值</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_overview_2" href="' + pathPrefix + 'overview/overview_2.htm" class="normal">基金搜尋</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_overview_6" href="http://www.fidelity.com.tw/funds/index.htm" class="normal">富達首選</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_overview_5" href="' + pathPrefix + 'overview/overview_5.htm" class="normal">基金績效</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_overview_3" href="' + pathPrefix + 'overview/overview_3.htm" class="normal">重大通知</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_overview_4" href="#" onclick="openEAlert(); return false;" class="normal">停損停利點設定</a>');
	document.write('		</div>');
	document.write('		<div class="subMenu" id="subMenu_news" style="position:absolute; visibility:hidden; width:450px; left: 504px;">');
	document.write('			<a id="subMenu_news_1" href="' + pathPrefix + 'news/index.htm" class="normal">新聞日訊</a>&nbsp; |&nbsp;');
	//document.write('			<a id="subMenu_news_2" href="' + pathPrefix + 'news/news_2.htm" class="normal">焦點新聞</a>&nbsp; |&nbsp;');
	//document.write('			<a id="subMenu_news_3" href="' + pathPrefix + 'news/news_3.htm" class="normal">經理人報告</a>&nbsp; |&nbsp;');
	//document.write('			<a id="subMenu_news_4" href="' + pathPrefix + 'news/news_4.htm" class="normal">經理人視訊會議</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_news_5" href="' + pathPrefix + 'news/news_5.htm" class="normal">路透社即時新聞 </a>');
	document.write('		</div>');
	document.write('		<div class="subMenu" id="subMenu_info" style="position:absolute; visibility:hidden; width:610px; text-align:right;">');
	document.write('			<a id="subMenu_info_1" href="' + pathPrefix + 'form/info_1.htm" class="normal">線上資料索取服務</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_info_2" href="' + pathPrefix + 'info/info_2_1.htm" class="normal">下載基金表格</a>&nbsp; |&nbsp;');
	document.write('			<a id="subMenu_info_3" href="' + pathPrefix + 'info/info_3.htm" class="normal">下載基金公開說明書</a>');
	document.write('		</div>');
	document.write('		<div class="subMenu" id="subMenu_about" style="position:absolute; visibility:hidden; width:610px; text-align:right;">');
	document.write('			<a id="subMenu_about_1" href="' + pathPrefix + 'about/index.htm" class="normal">榮耀富達</a>&nbsp; | &nbsp;');
	document.write('			<a id="subMenu_about_3" href="' + pathPrefix + 'service/index.htm" class="normal">服務內容</a>&nbsp; &nbsp;|');
	document.write('			<a id="subMenu_about_2" href="' + pathPrefix + 'about/about_2_2.htm" class="normal">關於基金平台</a> &nbsp;');
	document.write('		</div>');
	document.write('	</td>');
	document.write('  </tr>');
	document.write('</table>');