
/* set up browser checks */

// check browsers
var ua		= navigator.userAgent;
var opera	= /opera [56789]|opera\/[56789]/i.test(ua);
var ie		= !opera && /msie [56789]/i.test(ua);		// preventing opera to be identified as ie
var moz		= !opera && /mozilla\/[56789]/i.test(ua);	// preventing opera to be identified as mz
/* end browser checks */
/* Do includes */


if (window.PathRoot == null)
	PathRoot = "/";

if (ie)
	document.write('<script type="text/javascript" src="' + PathRoot + 'menu/cssexpr.js"><\/script>');
document.write('<link type="text/css" rel="StyleSheet" href="' + PathRoot + 'menu/xmenu.css"><\/script>');
document.write('<script type="text/javascript" src="' + PathRoot + 'menu/xmenu.js"><\/script>');
document.write('<script type="text/javascript" src="' + PathRoot + 'menu/content.js"><\/script>');


/* end includes */



webfxLayout = {
	writeTitle		:	function (s, s2) {
		document.write("<div id='webfx-title-background'></div>");
		if (opera) {
			document.write("<h1 id='webfx-title' style='top:9px;'>" + s + "</h1>");
		}
		else {
			document.write("<h1 id='webfx-title'>" + s + "</h1>");
		}

		if (s2 == null)
			s2 = "WebFX - What you never thought possible!";
		
		if (opera) {
			document.write("<span id='webfx-sub-title' style='top:46px;'>" + s2 + "</span>");
		}
		else {
			document.write("<span id='webfx-sub-title'>" + s2 + "</span>");
		}
	},
	writeMainTitle	:	function () {
		//this.writeTitle("WebFX", "What you never thought possible!");	
	},
	writeTopMenuBar		:	function () {
		document.write("<div id='webfx-menu-bar-1'></div>");
		if (opera) {
			document.write("<style>.webfx-menu-bar a {padding-top:3px;}</style>");
			document.write("<div id='webfx-menu-bar-2' style='height:2px;'></div>");
		}
		else
			document.write("<div id='webfx-menu-bar-2'></div>");
		document.write("<div id='webfx-menu-bar'>");// div is closed in writeBottomMenuBar
	},
	writeBottomMenuBar	:	function () {
		document.write("</div>");
		if (opera)
			document.write("<div id='webfx-menu-bar-3' style='height:0px;'></div>");
		else
			document.write("<div id='webfx-menu-bar-3'></div>");
		document.write("<div id='webfx-menu-bar-4'></div>");
		document.write("<div id='webfx-menu-bar-5'></div>");
	},
	writeMenu : function () {
		if (ie || moz || opera) {
			
		if (ie)	simplifyCSSExpression();
			
		  webfxMenuImagePath = PathRoot + "images/";
			this.writeTopMenuBar();
			document.write(MenuBar);
			this.writeBottomMenuBar();
			document.write("<table width=100%  border=0 cellpadding=0 cellspacing=0 height=2><tr><td bgcolor='#CCCCCC'></td></tr></table>")
			}	
			else {
	
				document.write("<div id='webfx-menu-bar'>&nbsp;" +
				"</div>" +
				"<p class='warning' style='width: 500px'>" +
				"</p>"
			);
		
			}
	}
};
function copyright(){
	document.write("<div align=center><br><hr><span class='copyright'>台 中 商 業 銀 行 股 份 有 限 公 司 版 權 所 有 Copyright &copy;" + (new Date()).getFullYear() + " TAICHUNG COMMERCIAL BANK Co., Ltd. All Right Reserved.</span></div>");
};


//證券下單消息公布
function openMsg(){
	  //alert('台中銀行證券商電子下單系統暫停服務公告\n\n暫停服務原因：線路中斷\n\n暫停服務日期/時間:98.03.13  16：00\n\n預定恢復日期/時間:98.03.13  18：00');
};
