//Contents for 學校資訊
var info=new Array()
info[0]='<a href="http://www.ychtcy.edu.hk/info_about.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 學校概覽</a>'
info[1]='<a href="http://www.ychtcy.edu.hk/info_service.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 服務承諾</a>'
info[2]='<a href="http://www.ychtcy.edu.hk/info_song.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 學校校歌</a>'
info[3]='<a href="http://www.ychtcy.edu.hk/info_principal.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 校長的話</a>'
info[4]='<a href="http://www.ychtcy.edu.hk/info_course.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 課程編制</a>'
info[5]='<a href="http://www.ychtcy.edu.hk/files/notice/0910_01.php"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 學校通告</a>'
info[6]='<a href="javascript://" onClick="window.open(\'http://www.ychtcy.edu.hk/info_canlendar.htm\',\'\',\'menubar=no,status=no,scrollbars=yes,toolbar=no,width=800,height=600\')"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 校曆表</a>'
info[7]='<a href="http://www.ychtcy.edu.hk/info_teacherList.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 班主任名單</a>'
info[8]='<a href="http://www.ychtcy.edu.hk/info_annual.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 周年校務/財務及其他報告/計劃</a>'
info[9]='<a href="javascript://" onClick="window.open(\'http://www.ychtcy.edu.hk/files/annual/programplan.htm\',\'\',\'menubar=no,status=no,scrollbars=yes,toolbar=no,width=800,height=600\')"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 校本課後學習及支援計劃</a>'
//info[7]='<a href="javascript://" onClick="window.open(\'http://www.ychtcy.edu.hk/files/employ\',\'\',\'menubar=no,status=no,scrollbars=yes,toolbar=no,width=800,height=600\')"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 職位空缺</a>'
//info[9]='<a href="javascript://" onClick="window.open(\'http://www.ychtcy.edu.hk/files/employ/index.php\',\'\',\'menubar=no,status=no,scrollbars=yes,toolbar=no,width=800,height=600\')"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 職位空缺</a>'

//Contents for 校內組織, and so on
var org=new Array()
org[0]='<a href="http://www.ychtcy.edu.hk/org_management.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 行政及培訓</a>'
org[1]='<a href="http://www.ychtcy.edu.hk/org_career.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 升學及就業輔導</a>'
org[2]='<a href="http://www.ychtcy.edu.hk/org_guidance.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 輔導委員會</a>'
org[3]='<a href="http://www.ychtcy.edu.hk/org_it.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 資訊科技委員會</a>'
org[4]='<a href="http://www.ychtcy.edu.hk/org_civic.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 品德及公民教育委員會</a>'
org[5]='<a href="http://www.ychtcy.edu.hk/org_pta.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 家長教師會</a>'
org[6]='<a href="http://www.ychtcy.edu.hk/files/library/index/index_library.htm" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 圖書館</a>'
org[7]='<a href="http://www.ychtcy.edu.hk/org_eca.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 課外活動</a>'
org[8]='<a href="http://www.ychtcy.edu.hk/org_group.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 校友會</a>'

//Contents for 活動回顧, and so on
var act=new Array()
act[0]='<a href="http://www.ychtcy.edu.hk/act_award09.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 比賽獎項</a>'
act[1]='<a href="http://www.ychtcy.edu.hk/act_evt10_cam.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2009-2010 活動回顧</a>'
act[2]='<a href="http://www.ychtcy.edu.hk/act_evt09_classDesign.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2008-2009 活動回顧</a>'
act[3]='<a href="http://www.ychtcy.edu.hk/act_evt08_stuVote.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2007-2008 活動回顧</a>'
act[4]='<a href="http://www.ychtcy.edu.hk/act_evt07_art.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2006-2007 活動回顧</a>'
act[5]='<a href="http://www.ychtcy.edu.hk/act_evt05_sport04.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2004-2005 活動回顧</a>'
act[6]='<a href="http://www.ychtcy.edu.hk/act_evt04_qai.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2003-2004 活動回顧</a>'
act[7]='<a href="http://www.ychtcy.edu.hk/act_evt03_grad02.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2002-2003 活動回顧</a>'
act[8]='<a href="http://www.ychtcy.edu.hk/act_evt02_form1_ocamp.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2001-2002 活動回顧</a>'
act[9]='<a href="http://www.ychtcy.edu.hk/act_evt01_graduate.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2000-2001 活動回顧</a>'

//Contents for 傳媒報導, and so on
var rep=new Array()
rep[0]='<a href="http://www.ychtcy.edu.hk/media0910.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2009-2010 傳媒報導</a>'
rep[1]='<a href="http://www.ychtcy.edu.hk/media0809.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2008-2009 傳媒報導</a>'
rep[2]='<a href="http://www.ychtcy.edu.hk/media0708.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2007-2008 傳媒報導</a>'
rep[3]='<a href="http://www.ychtcy.edu.hk/media0607.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2006-2007 傳媒報導</a>'
rep[4]='<a href="http://www.ychtcy.edu.hk/media0506.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2005-2006 傳媒報導</a>'
rep[5]='<a href="http://www.ychtcy.edu.hk/media0405.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2004-2005 傳媒報導</a>'
rep[6]='<a href="http://www.ychtcy.edu.hk/media0304.htm"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 2003-2004 傳媒報導</a>'

//Contents for 學科網頁, and so on
var teach=new Array()
teach[0]='<a href="http://www.ychtcy.edu.hk/files/chinese/index.htm" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 中文科與普通話科</a>'
teach[1]='<a href="http://www.ychtcy.edu.hk/files/english/index.htm" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 英文科</a>'
teach[2]='<a href="http://www.ychtcy.edu.hk/files/maths" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 數學科</a>'
teach[3]='<a href="http://www.ychtcy.edu.hk/files/computer" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 電腦科</a>'
teach[4]='<a href="http://www.ychtcy.edu.hk/files/pe/course/intro.php"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 體育科</a>'
teach[5]='<a href="http://tcy.hkcampus.net/~tcy-ccw" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 電子科</a>'
teach[6]='<a href="http://www.ychtcy.edu.hk/files/technology/index.htm" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 科技概論科</a>'
teach[7]='<a href="http://www.ychtcy.edu.hk/files/tourism/" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 旅遊與旅遊業科網頁</a>'


//Contents for 網上系統, and so on
var sys=new Array()
sys[0]='<a href="http://210.0.216.234/" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> eClass內聯網</a>'
sys[1]='<a href="http://www.ychtcy.edu.hk/files/notice/0910_02.php"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 通告</a>'
sys[2]='<a href="http://210.0.216.237/sbs/staff/seminar/webpages/login.asp" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 會議紀錄</a>'
sys[3]='<a href="javascript://" onclick="window.open(\'./hw.htm\',\'\',\'menubar=no,status=no,scrollbars=yes,toolbar=no,width=600,height=600\')"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 家課查閱紀錄</a>'
//sys[3]='<a href="http://www.ychtcy.edu.hk/inv/index.asp" target="_blank"><img src="http://www.ychtcy.edu.hk/images/main/bullet_menu.gif" border="0"> 存貨管理系統</a>'

		 
var menuwidth='175px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu