﻿function headerLayer(){

	document.writeln("<span id=menu style='position:absolute; top:0; left:0; z-index:4'></span>");
	document.writeln("<span id=himenu style='position:absolute; top:0; left:0; z-index:1;' onmouseover='hidemenu()'></span>");
	
}


function showmenu(mysection){
		
	document.getElementById("menu").innerHTML = "";	
		
	content = "<img src='../images/spacer.gif' align=top border=0 width=60 height=40>"
	if(mysection == "aboutus"){
		
		content += "<table cellpadding=0 cellspacing=1 order=0 bgcolor=\"#FFFFFF\">";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='aboutus_company.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>公司簡介</td></tr>";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='aboutus_board.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>董事會</td></tr>";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='aboutus_news.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>最新消息</td></tr>";
		content += "</table>"
	
		
		document.getElementById("menu").innerHTML = content;
		document.getElementById("menu").style.top = getAbsoluteTop('aboutus')-17; 
		document.getElementById("menu").style.left = getAbsoluteLeft('aboutus');
		
		document.getElementById("himenu").style.left = getAbsoluteLeft('aboutus') - 100;
		document.getElementById("himenu").style.width = 100 + 97 + 20; 
		document.getElementById("himenu").style.height = 400;		
	}
	
	if(mysection == "news"){
		
		content += "<table cellpadding=0 cellspacing=1 order=0 bgcolor=\"#FFFFFF\">";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='news_press.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>新聞稿</td></tr>";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='news_statutory.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>公告</td></tr>";
		content += "</table>"
	
		
		document.getElementById("menu").innerHTML = content;
		document.getElementById("menu").style.top = getAbsoluteTop('aboutus')-17; 
		document.getElementById("menu").style.left = getAbsoluteLeft('news');
		
		document.getElementById("himenu").style.left = getAbsoluteLeft('news') - 100;
		document.getElementById("himenu").style.width = 100 + 97 + 20; 
		document.getElementById("himenu").style.height = 400;		
	}
	
	if(mysection == "result"){
		
		content += "<table cellpadding=0 cellspacing=1 order=0 bgcolor=\"#FFFFFF\">";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='result_report.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>年報/中期報告</td></tr>";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='result_presentation.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>簡報</td></tr>";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='investors_calendar.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>投資者日誌</td></tr>";
		content += "</table>"
	
		
		document.getElementById("menu").innerHTML = content;
		document.getElementById("menu").style.top = getAbsoluteTop('aboutus')-17; 
		document.getElementById("menu").style.left = getAbsoluteLeft('result');
		
		document.getElementById("himenu").style.left = getAbsoluteLeft('result') - 100;
		document.getElementById("himenu").style.width = 100 + 97 + 20; 
		document.getElementById("himenu").style.height = 400;		
	}
	
	if(mysection == "online"){
		
		content += "<table cellpadding=0 cellspacing=1 order=0 bgcolor=\"#FFFFFF\">";
		content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='aboutus_board.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>董事會</td></tr>";
		//content += "<tr bgcolor=\"#6AA2B1\"><td height=22 style='cursor:hand' onClick=\"location.href='online_audit.asp';\" height=16 class=\"nav\" style=\"padding:0 7;\" nowrap>委員會</td></tr>";
		content += "</table>"
	
		
		document.getElementById("menu").innerHTML = content;
		document.getElementById("menu").style.top = getAbsoluteTop('aboutus')-17; 
		document.getElementById("menu").style.left = getAbsoluteLeft('online');
		
		document.getElementById("himenu").style.left = getAbsoluteLeft('online') - 100;
		document.getElementById("himenu").style.width = 100 + 97 + 20; 
		document.getElementById("himenu").style.height = 400;		
	}
	
	
	
}




function hidemenu(){
	document.getElementById("menu").innerHTML = "";
	document.getElementById("himenu").style.width = 0; 
	document.getElementById("himenu").style.height = 0;
}


