|
|
Line 26: |
Line 26: |
| | | |
| <script type="text/javascript" > | | <script type="text/javascript" > |
- | var naviMenu = document.getElementById('PKU_navi_menu');
| |
- | var naviIndex = document.getElementById('PKU_navi_index');
| |
- |
| |
- | var naviIndex_Cur = 0;
| |
- | var naviIndex_Des = 1;
| |
- | var naviHandle = null;
| |
- | var naviHandleState = 0; //0:Noop 1:Growth 2:Wait 3:Wither
| |
- |
| |
- | var menutitle = document.getElementsByTagName("h3");
| |
- | var menuhtml = "";
| |
- | var indexheight = 1.5 * (menutitle.length+2) * 16; /* 1em = 16px */
| |
- |
| |
- | function ButtonMouseOver(objPointer)
| |
- | {
| |
- | var Img = objPointer.getElementsByTagName("img");
| |
- | Img[1].style.display = "block";
| |
- | Img[0].style.display = "none";
| |
- | }
| |
- |
| |
- | function ButtonMouseOut(objPointer)
| |
- | {
| |
- | var Img = objPointer.getElementsByTagName("img");
| |
- | Img[0].style.display = "block";
| |
- | Img[1].style.display = "none";
| |
- | }
| |
- |
| |
- | function NaviIndexGrowth()
| |
- | {
| |
- | naviIndex_Cur = naviIndex_Cur * 0.7 + naviIndex_Des * 1.2 * 0.3;
| |
- | if (naviIndex_Cur>=naviIndex_Des)
| |
- | {
| |
- | naviIndex_Cur=naviIndex_Des;
| |
- | naviHandle = null;
| |
- | naviHandleState = 0;
| |
- | }
| |
- | else
| |
- | {
| |
- | naviHandle = setTimeout(NaviIndexGrowth,50);
| |
- | }
| |
- | naviMenu.style.width=naviIndex_Cur*250+'px';
| |
- | naviMenu.style.height=naviIndex_Cur*indexheight+'px';
| |
- | }
| |
- | function NaviIndexWither()
| |
- | {
| |
- | naviIndex_Cur = naviIndex_Cur * 0.7 - 0.1;
| |
- | if (naviIndex_Cur<=0)
| |
- | {
| |
- | naviIndex_Cur=0;
| |
- | naviHandle = null;
| |
- | naviHandleState = 0;
| |
- | ButtonMouseOut(naviIndex);
| |
- | naviMenu.style.display="none";
| |
- | }
| |
- | else
| |
- | {
| |
- | naviHandle = setTimeout(NaviIndexWither,50);
| |
- | }
| |
- | naviMenu.style.width=naviIndex_Cur*250+'px';
| |
- | naviMenu.style.height=naviIndex_Cur*indexheight+'px';
| |
- | }
| |
- | function NaviIndexReturn()
| |
- | {
| |
- | naviHandle = null;
| |
- | naviHandleState = 3;
| |
- | NaviIndexWither();
| |
- | }
| |
- | function NaviIndexWaiting()
| |
- | {
| |
- | if (naviHandle) {clearTimeout(naviHandle);}
| |
- | naviHandle=setTimeout(NaviIndexReturn,1000);
| |
- | naviHandleState=2;
| |
- | }
| |
- | function NaviIndexTrigger()
| |
- | {
| |
- | naviMenu.style.display="block";
| |
- | if (naviHandleState>1) {clearTimeout(naviHandle);naviHandle=null;}
| |
- | if (naviHandleState!=1) {NaviIndexGrowth();naviHandleState=1;}
| |
- | }
| |
| | | |
| var PageScrollElem,PageScrollBody; | | var PageScrollElem,PageScrollBody; |