/* FILE ARCHIVED ON 18:55:23 May 13, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 16:07:31 Sep 10, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* Milonic DHTML Menu - Treemenu module version 0.3 This module is only compatible with the Milonic DHTML Menu version 5.37 or higher Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved. This is a commercial software product, please visit https://webarchive.library.unt.edu/web/20090513185523/http://www.milonic.com/ for more information. SYNTAX: */ function treeMenuDisplay(_mnu,_show){ // This function hides or shows the menu _m[_mnu][7]=_show // Set the menus visibility property to Show or Hide menuDisplay(_mnu,_show); } // Display the menu to open function _cAA(_N,_O,_i) { _I=_mi[_i] if(_I[_N]) { _tmp=_I[_N] _I[_N]=_I[_O] _I[_O]=_tmp } if(_N==80&&_I[8])gmobj("lnk"+_i).oC=_I[8] if(_N==83&&_I[24]&&_I[3])gmobj("simg"+_i).src=_I[24] if(_N==82&&_I[29])gmobj("img"+_i).src=_I[29] } _lastItem=-1 function _oTree() { _Oi=_itemRef _otA(_Oi) if(!_m[_mi[_Oi][0]].parentItemN&&_W.singleMasterMenu) { _I=_mi[_Oi] for (var _ai=0;_ai<_m[_I[0]][0].length;_ai++) { if(_mi[_ai].childN&&_ai!=_Oi) { if($tU(_mi[_ai].child.style.visibility)=="VISIBLE") { _otA(_ai) itemOff(_ai) itemOn(_ai) itemOff(_ai) } } } } } function _otA(_i) { _cAA(80,8,_i) _cAA(81,7,_i) _cAA(82,29,_i) _cAA(83,24,_i) _I=_mi[_i] // set menu item shorthand to _I if(!_I[3])return // If no showmenu has been specified go back if(!_I.child) // Set the menu that this item will open. { _I.childN=getMenuByName(_I[3]) _I.child=gmobj("menu"+_I.childN) } hmL(_I.childN) if(mac){if(!_I.obj)_I.obj=gmobj("pTR"+_i) // IE on the The Apple Mac needs to use for positioning }else{if(!_I.obj)_I.obj=gmobj("OtI"+_i)} // All other browsers can use _mnuO=_m[_I.childN] // This is the object reference to the menu we are about to open _io=_I.obj // Set _io as shorthand object reference to this menu item if(_mnuO[7]) // If the DISPLAY attribute is on the menu is shown and must now be hidden { if(ie&&!mac) { _io.style.display="none" //alert(mac) } _tAct=0 treeMenuDisplay(_I.childN,0) // Hide this menu _CH=_m[_I.childN].HGT-_m[_I.childN].OHGT // Set _CH as the variable to store this menus height, used for adjusting child and siblings closeTMenu(_i) } else // Display this child menu { if(ie&&!mac)_io.style.display="block" _tAct=1 treeMenuDisplay(_I.childN,1) _PiGP=gpos(_io) // get the Dimensions of parent menu item _cD=gpos(_I.child) // Get the Dimensions of menu we are about to open //_I.ttop=_PiGP[0]+_PiGP[2]+(_m[_I.childN][6][65]+_I[68]+_I[27]) // set temporary top property for the _I.ttop=_PiGP[0]+_PiGP[2]-_I[27] // set temporary top property for the _m[_I.childN].ttop=_I.ttop _I.tleft=_PiGP[1]+treeOffset if(sfri||mac)_I.tleft-=_I[27] _m[_I.childN].tleft=_I.tleft spos(_I.child,_I.ttop,_I.tleft) // set the position of the menu to open if(!_m[_I.childN].parentItem) { _m[_I.childN].parentItem=_io _m[_I.childN].OHGT=_PiGP[2] _m[_I.childN].parentItemN=_i } _m[_I.childN].HGT=_cD[2]+_PiGP[2]-2 _OH=_m[_mi[_i].childN].HGT-_m[_mi[_i].childN].OHGT if(_I.children) { for(_tm=0;_tm<_I.children.length;_tm++) { _mnu=_I.children[_tm] _GP=gpos(_m[_mnu].parentItem) treeMenuDisplay(_mnu,1) //_m[_mnu].ttop=_GP[0]+_m[_mnu].OHGT+(_m[_I.childN][6][65]+_I[68]+_I[27]) _m[_mnu].ttop=_GP[0]+_m[_mnu].OHGT-_I[27] spos(gmobj("menu"+_mnu),_m[_mnu].ttop,_m[_mnu].tleft) } } } resetParents(_i) } function resetChildren(_i) { _ar=getChildrenByItem(_i) for (var _ai=1; _ai<_ar.length; _ai++) { _AI=_ar[_ai] if(_tAct)_m[_AI].ttop+=_OH; else _m[_AI].ttop-=_CH; spos(gmobj("menu"+_AI),_m[_AI].ttop) } } function resetSiblings(_i) { var _I=_mi[_i] var _ar=_m[_I[0]][0] for (var _ai=0; _ai<_ar.length; _ai++) { _AI=_ar[_ai] if(_i<_AI) { if(_mi[_AI].childN) { _mnu=_mi[_AI].childN if(_tAct)_m[_mnu].ttop+=_OH; else _m[_mnu].ttop-=_CH; spos(gmobj("menu"+_mnu),_m[_mnu].ttop) resetChildren(_AI) } } } } function resetParents(_i) { _I=_mi[_i] // menu item _mnu=_I.childN _th=0 while(_m[_mnu].parentItem) { if(_tAct) { _m[_mnu].HGT=_m[_mnu].HGT+_th if(_th==0)_th=_m[_mnu].HGT-_m[_I.childN].OHGT; } else { _m[_mnu].HGT=_m[_mnu].HGT-_CH } spos(_m[_mnu].parentItem,_n,_n,_m[_mnu].HGT) _fixMenu(_mnu) resetSiblings(_m[_mnu].parentItemN) _mnu=_mi[_m[_mnu].parentItemN][0] } if(mac) { _macP=gpos(gmobj("pTR10")) spos(gmobj("menu"+_mi[_i][0]),_n,_n,_macP[0]) } } function closeTMenu(_i) { _ar=getChildrenByItem(_i) _I=_mi[_i] _I.children=_ar for(_tm=0;_tm<_ar.length;_tm++) { treeMenuDisplay(_ar[_tm],0) } spos(_m[_I.childN].parentItem,_n,_n,_m[_I.childN].OHGT) } gChildren=new Array(); function crawlChildren(_i) // returns menus that are children of declared menu item { _cHm=_mi[_i].childN if(!_cHm)return var _ar=_m[_cHm][0] if(_mi[_i].childN && _m[_mi[_i].childN][7])gChildren[gChildren.length]=_mi[_i].childN; for (var _ai=_ar[0]; _ai<_ar[_ar.length-1]+1; _ai++) { if(_mi[_ai].childN && _m[_mi[_ai].childN][7])crawlChildren(_ai) } } function getChildrenByItem(_i) { gChildren=new Array(); crawlChildren(_i) return gChildren; }