
/*  ID for Anchor:n0  for icon: img_n0
essencial variables:
vMenuHeight=100
prevID="n0"
DispAreaName="oMain"
*/
//-----------------------------
the='event.srcElement' 
//-----------------------------
tabFontColor='gray'		     // tab font color
tabFontColorHi='black'		 // tab font color high-lited

tabBgColor='eeeeee'		   // tab backgroundColor
tabBgColorHi='yellow'		 // tab backgroundColor high-lited  

tabBorderColor='silver'		// border
tabBorderColorUp='white gray gray white'
tabBorderColorDn='gray white white gray'

//-----------------------------
function init(){
eval(prevID).className="Active"
eval(prevID).style.cursor="default"
makeMenu()
adjDisplayHome()
eval(DispAreaName).contentWindow.location=eval(prevID).href
}
//-----------------------------
function adjDisplayHome() {
xScrnHeight=document.body.clientHeight	/***lower portion ***/
xLowerWidth=xScrnHeight-document.all.oMenu.offsetHeight
eval(DispAreaName).style.pixelHeight= xLowerWidth
}
//-----------------------------
function makeMenu() {
for (i=0;i<document.anchors.length;i++){
obj=document.anchors[i]
obj.setAttribute("target",TargetName)
obj.style.borderColor=tabBorderColorUp
}
document.all.oMenu.style.height=vMenuHeight /***menu portion ***/
eval(prevID).style.cursor="default"
}
//-----------------------------
function get_ID(){
if (window.top.location.hash)       // 開啟時即由 homepage 選入本頁
    { x=eval('window.top.location.hash').substring(1,3)
     prevID=x						// 寫入 標註
	 }
else  
   { x=prevID }
   	
     eval(x).style.background=tabBgColorHi	 
     eval(x).style.color=tabFontColorHi	  
	  eval(x).style.borderColor=tabBorderColorDn
	}
	
//===================================
function boxOvr(){
if (eval(the).id==prevID) {
eval(the).style.cursor="default"				// return cursor to default shape
return}

eval(the).style.color='chocolate'
eval(the).style.backgroundColor='lightyellow'
}
//-----------------------------
function boxOut(){
if (eval(the).id==prevID) return
eval(the).style.color=tabFontColor
eval(the).style.backgroundColor=tabBgColor
eval(the).style.borderColor=tabBorderColorUp
}
//-----------------------------
function boxDwn(){
if (eval(the).id==prevID /*|| eval(the).id=='I6' || eval(the).id=='I7'*/) return
eval(prevID).style.background=tabBgColor // previous tab restore bg color
eval(prevID).style.color=tabFontColor       // previous tab restore font color
eval(prevID).style.borderColor=tabBorderColorUp			 // 線框 up
eval(prevID).style.cursor=""				// return cursor to default shape

eval(the).style.backgroundColor=tabBgColorHi			 // 現按者 強化顯示
eval(the).style.color="red"												// 字色  
eval(the).style.borderColor=tabBorderColorDn			 // 線框 凹下
eval(the).style.cursor="default"		

}
//-----------------------------
function boxClk(){
   if (eval(the).id==prevID) {
	return
	}

	eval(the).style.background=tabBgColorHi	 
   eval(the).style.color=tabFontColorHi	  
   eval(the).style.borderColor=tabBorderColorDn
   eval(the).blur()			
prevID=eval(the).id															 // 寫入 標註
}
//-----------------------------

function openNewWin(){  
	URL=event.srcElement.href
	winSetting='width=650,height=500,left=100,top=30,status,scrollbars'
    /* 2004-03-11 pop98=window.open(URL,'year1998',winSetting)
	pop98.focus()
	*/
	
/*	if (event.srcElement.target=='year1998'){
	URL=event.srcElement.href
	winSetting='width=650,height=500,left=100,top=30,status,scrollbars'
    pop98=window.open(URL,'year1998',winSetting)
	pop98.focus()
	}

else if (event.srcElement.target=='gb'){	
	URL=event.srcElement.href
	winSetting='width=600,height=500,left=100,top=30,status,scrollbars'
    popGB=window.open(URL,'gb',winSetting)
	popGB.focus()
	} 
*/		
}  