<!--

OptionText[-1]='往上一層　&nbsp;';OptionValue[-1]='index.html';

// 定義樣式
document.writeln(
	"<style>"+
	"	.selectDiv { border: 0px solid #999999;}"+
	"	.titleDiv { background-color:#000000;color:#FFFF00;font-size:13px;padding-top:4px;padding-left:6px;padding-right:4px;;border:1px solid #999999;}"+
	"	.optionDiv { position:absolute;border:1px solid #999999;border-top:0px;visibility:hidden;}"+
	"	.optionDiv div { background-color:#000000;color:#FFFFFF;font-size:13px;padding-top:3px;padding-left:9px;padding-right:8px;}"+
	"	.arrowDiv { font-family:webdings;font-size:13px;color:#000000;border:2px outset buttonhighlight;background-color:buttonface;width:15px;}"+
	"</style>"
);

document.writeln(
	"<div style='position:absolute; left:200px; top:100px; width:385px'>"+
	"<table border=0 cellspacing=0 cellpadding=0 align=center><tr>"+
	"<td id='pageBackward'>&nbsp;</td><td id='menuBlock'></td><td id='pageForward'>&nbsp;</td>"+
	"</tr></table></div>"
);
// 預設選單主體
var blockDiv=document.createElement("div");
var selectDiv=document.createElement("table");
var selectDivTR=selectDiv.insertRow();
var titleDiv=selectDivTR.insertCell();
var arrowDiv=selectDivTR.insertCell();
with(blockDiv){ style.cursor="default";}
with(selectDiv){ cellSpacing=0,cellPadding=0,className="selectDiv";}
with(titleDiv){ innerText=SelectTitle,align="center",className="titleDiv";}
with(arrowDiv){ innerText=6,align="center",className="arrowDiv";}
blockDiv.appendChild(selectDiv);
// 下拉選單圖層
var optionDiv=document.createElement("div");
with(optionDiv){ align="left",className="optionDiv";}
blockDiv.appendChild(optionDiv);
// 下拉選單內容
var Options=new Array();
for (i=-1;i<OptionText.length;i++){
	Options[i]=optionDiv.appendChild(document.createElement("div"));
	Options[i].innerHTML=OptionText[i];
	Options[i].innerValue=OptionValue[i];
	Options[i].index=i;

	Options[i].onmouseover=function(){moveWithOptions("highlight","white")};
	Options[i].onmouseout=function(){moveWithOptions("","")};
	Options[i].onmouseup=function(){OnChange()};
}
menuBlock.style.width='100%';
menuBlock.appendChild(blockDiv);
wdt=optionDiv.clientWidth+2;
wdt2=selectDiv.clientWidth+2;
if(wdt<wdt2) wdt=wdt2;
menuBlock.style.width=wdt;
// 設置下拉選單的坐標與寬度
optionDiv.style.width=wdt;
selectDiv.style.width=wdt;
Options[-1].style.width='100%';
Options[-1].style.paddingTop='5';
Options[-1].align='center';

// 事件
// 禁止選擇文本
selectDiv.onselectstart=function(){return false;}
optionDiv.onselectstart=function(){return false;}
// 箭頭事件
arrowDiv.onmousedown=function(){
	this.setCapture();
	this.style.borderStyle="inset";
}
arrowDiv.onmouseup=function(){
	this.style.borderStyle="outset";
	this.releaseCapture();
}
arrowDiv.onclick=function(){
	event.cancelBubble=true;
	optionDiv.style.visibility=optionDiv.style.visibility=="visible"?"hidden":"visible";
}
document.onclick=function(){
	optionDiv.style.visibility="hidden";
}
titleDiv.onclick=function(){
	event.cancelBubble=true;
	optionDiv.style.visibility=optionDiv.style.visibility=="visible"?"hidden":"visible";
}
// 選單事件
function moveWithOptions(bg,color){
	with(event.srcElement){ 
		if(innerValue){style.backgroundColor=bg; style.color=color;}
	}
}
function OnChange(){
	with(event.srcElement){
		//titleDiv.innerText=innerText;
		//selectedIndex=event.srcElement.index;
		// 使用者自訂處理
		if(innerValue){
			window.name=""+document.location;
			location.href=innerValue;
		}
	}
}

//=====================
// 使用者自訂處理
var thisURL=''+document.location;
var nPage=parseInt(np.innerHTML);
var nList=Options.length;
var tmp=".gif' width=16 height=16 align=absmiddle";
	var preDir='';
	if(thisURL.indexOf('http://localhost') != -1) preDir='../';
	if(thisURL.indexOf('showList') != -1) preDir=preDir+'talk/';
var tmp2="<img src='"+preDir+"pic/arrow";
var aNone=tmp2+"None"+tmp+">";
var pageTopic='';

//顯示頁次的上一頁與下一頁
if(nPage<=1) pageBackward.innerHTML=aNone+"&nbsp;";
else pageBackward.innerHTML="<a href='"+Options[nPage-2].innerValue+"'>"+tmp2+"Backward"+tmp+" border=0 alt='"+Options[nPage-2].innerText+"' onClick='window.focus()'></a>&nbsp;";
if(nPage>=nList) pageForward.innerHTML="&nbsp;"+aNone;
else pageForward.innerHTML="&nbsp;<a href='"+Options[nPage].innerValue+"'>"+tmp2+"Forward"+tmp+" border=0 alt='"+Options[nPage].innerText+"' onClick='window.focus()'></a>";

//取得頁次主題
with(Options[nPage-1]){
	style.backgroundColor='#660000',innerValue='';
	filter=/(.*)：(.*)/;
	if(filter.test(innerText)) pageTopic=RegExp.$2;
}

//-->
