// To adjust menu position function fAdjustPos(vObjectName,parentIndex) { oTemp = document.getElementById(vObjectName) var ie=(document.all); if (ie) { // Adjust the submenu position to prevent it from overlaping the right margin var posexceed posexceed = oTemp.offsetLeft + 160 - 800; if (posexceed > 0) { oTemp.style.pixelLeft = oTemp.offsetLeft - posexceed + 5; } oTemp.style.pixelTop = oMenuInit.offsetTop + 15; } else { a1='225px'; a2='270px'; a3='365px'; a5='525px'; a7='600px'; oTemp.style.left=eval("a"+parentIndex); oTemp.style.top =15; } } // To show menus. function fShowSubmenu(vObjectName,parentIndex) { fAdjustPos(vObjectName,parentIndex); oTemp = document.getElementById(vObjectName) // Make the submenu visible oTemp.style.visibility="visible"; } // To hide menus. function fHideSubmenu(vObjectName) { oTemp = document.getElementById(vObjectName) oTemp.style.visibility="hidden"; } function fPrintSubmenu(vSubmenuIndex) { if (vSubmenuIndex==1) { document.writeln('
\"\"
\"\"
 Introduction
 School Motto
 Badge & Song
 School Objectives
 School Publications
 Facilities
 Language Policy
 Classes & Subjects
 IMC Constitution
 Contact Us
\"\"
'); } if (vSubmenuIndex==2) { document.writeln('
\"\"
\"\"
 Organization Chart
 Working Objectives
 Extra-curricular Activities
 Moral and Civic Education
 Careers
 Student Counselling
 Discipline
\"\"
'); } if (vSubmenuIndex==3) { document.writeln('
\"\"
\"\"
 Student Association
 Houses
 Clubs/Societies
 School Teams
 Alumni Association
 Parent-Teacher Association
\"\"
'); } if (vSubmenuIndex==5) { document.writeln('
\"\"
\"\"
 Chung Tai Ed Press
 Britannica School (within campus)
 HKEdcity TV News
 LAC System
 China Digital Library - Ebook
\"\"
'); } if (vSubmenuIndex==7) { document.writeln('
\"\"
\"\"
 Student Intranet
 Photo Albums
 Web Links
 School Calendar
\"\"
'); } } function fAdjustLastSubmenu() { // To adjust the position of the last menu. fAdjustPos("oSubmenu7","7"); }