home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 October / Chip Ekim 2003.iso / prog / web / xtreeme / setup.exe / {app} / Scripts / menu_opera.js < prev    next >
Encoding:
Text File  |  2003-06-06  |  15.9 KB  |  612 lines

  1. // script generated by Xtreeme SiteXpert
  2. // sitemap and search engine creator
  3. // http://www.xtreeme.com/sitexpert
  4. // Copyright(C) 2001-2002 Xtreeme GmbH
  5.  
  6. #define makeTransparent f01
  7. #define showDelayed f02
  8. #define createMenuItem f03
  9. #define setRealWidth f04
  10. #define createPopupFromCode f05
  11. #define closePopup f06
  12. #define absToRel f07
  13. #define openPopup f08
  14. #define setPopupHeight f09
  15. #define scrollPopup f10
  16. #define isChildOfActivePopup f13
  17. #define onPopupOver f14
  18. #define onPopupOut f15
  19. #define getBrowserRect f17
  20. #define calcClientRect f18
  21. #define getClientRect f19
  22. #define onItemClick f20
  23. #define onNextScroll f21
  24. #define onItemOver f22
  25. #define onItemOut f23
  26. #define expandMenu exM
  27. #define collapseMenu coM
  28. #define onDocClick f28
  29. #define initializeMenu f29
  30. #define addNewEvent f30
  31. #define initializeAll f31
  32. #define errorTrap f32
  33. #define getAbsolutePath f33
  34. #define zz
  35. #define removeHighlight f34
  36.  
  37. #define popupRightPad v01
  38. #define curPopupWidth v02
  39. #define expandArrowSrc v03
  40. #define ownerMenu v04
  41. #define highlightColor v05
  42. #define normalColor v06
  43. #define highlightBgColor v07
  44. #define normalBgColor v08
  45. #define levelAttribs v09
  46. #define popupOpenHeight v10
  47. #define bBitmapPopups v11
  48. #define arrayName v12
  49. #define arrayItem v13
  50. #define expandedWnd v14
  51. #define popupRect v15
  52. #define browserRect v16
  53. #define activePopup v17
  54. #define popupFrame v18
  55. #define sepFrame v19
  56. #define openSameFrame v20
  57. #define imgFolder v21
  58. #define popAlign v22
  59. #define popupWidth v23
  60. #define contentFrame v24
  61. #define bBitmapScheme v25
  62. #define itemText v26
  63. #define itemLink v27
  64. #define bottomImgHeight v28
  65. #define scrollTimeout v29
  66. #define popupArray v30
  67. #define popupHeight v31
  68. #define nmenu q
  69.  
  70. function findElement(e,i)
  71. {
  72.     return e?e.document.getElementById (i):document.getElementById (i);
  73. }
  74.  
  75. function getAbsolutePath(p)
  76. {
  77.     if(p&&p.indexOf(':/')==-1&&p.indexOf(':\\')==-1&&p.indexOf('/')!=0) return unescape(absPath)+p;
  78.     else return p;
  79.  
  80. }
  81.  
  82. function addLoadHandler(lh)
  83. {
  84.     if (!document.loadHandlers)
  85.     {
  86.         document.loadHandlers=new Array();
  87.         document.loadHandlers[0]=lh;
  88.         document.lastLoadHandler=0;
  89.     }
  90.     else
  91.     {
  92.         document.lastLoadHandler++;
  93.         document.loadHandlers[document.lastLoadHandler]=lh;
  94.     }
  95. }
  96. addLoadHandler ('initializeMenu');
  97. window.onload=initializeAll;
  98. function errorTrap(){return true;}
  99. window.onerror=errorTrap;
  100.  
  101. function resetPopup(popup)
  102. {
  103.     if(popup&&popup.children)
  104.     {
  105.         var i;
  106.         for(i=0;i<popup.children.length;i++)
  107.         {
  108.             if(popup.children[i].id.indexOf('sep')==-1)
  109.             {
  110.                 popup.children[i].style.color=popup.normalColor;
  111.                 popup.children[i].style.backgroundColor=popup.normalBgColor;
  112.             }
  113.         }
  114.     }
  115. }
  116.  
  117. function buildPopup(nmenu,arrayName,level)
  118. {
  119.     var levelAttribs;
  120.     if (level > nmenu.maxlev) {levelAttribs = eval ("nmenu.lev" + nmenu.maxlev) ;} else {levelAttribs = eval ("nmenu.lev" + level) ;}
  121.     var popupName=arrayName+"popup";
  122.     nmenu.popupFrame.document.write("<div id='"+popupName+"' style='position:absolute;top:1000;padding-left:"+nmenu.bord+";padding-top:"+nmenu.bord+";padding-right:"+nmenu.bord+";padding-bottom:"+nmenu.bord+";visibility:hidden'>");
  123.  
  124.     var array=eval(arrayName);
  125.     var arrayItem;
  126.     var ali=" align='"+(nmenu.popAlign==1?'center':(nmenu.popAlign==2?'right':'left'))+"' ";
  127.     for(arrayItem=0;arrayItem<array.length/3;arrayItem++)
  128.     {
  129.         if (arrayItem>0&&nmenu.sep)nmenu.popupFrame.document.write("<div id='"+popupName+arrayItem+'sep'+"' style='background-color:"+nmenu.borderCol+";height:"+nmenu.sep+";width:"+(nmenu.popupWidth-nmenu.bord*2)+"'></div>");
  130.         var popupArray=(array[arrayItem*3+2])?(arrayName+"_"+parseInt(arrayItem+1)):null;
  131.         var iconTag=(array[arrayItem*3+2]?"<IMG SRC=\'"+getAbsolutePath(nmenu.imgFolder)+"/"+nmenu.fnm+"ia.gif\' BORDER=0 WIDTH="+nmenu.iconSize+" HEIGHT="+nmenu.iconSize+" HSPACE=0 ALIGN=RIGHT>":"");
  132.         var itemText=array[arrayItem*3];
  133.         var style="width:"+(nmenu.popupWidth-nmenu.bord*2-nmenu.vertSpace*2)+";padding-left:"+nmenu.vertSpace+";padding-top:"+nmenu.vertSpace+";padding-bottom:"+nmenu.vertSpace;
  134.         style+=";font-size:"+levelAttribs[0]+";width:"+(nmenu.popupWidth-nmenu.vertSpace*2-nmenu.bord*2)+";color:"+levelAttribs[3]+";font-family:"+levelAttribs[6];
  135.         if(levelAttribs[1])style+=";font-weight:bold";
  136.         if(levelAttribs[2])style+=";font-style:italic";
  137.         nmenu.popupFrame.document.write("<div"+ali+"id='"+(popupName+arrayItem)+"' style=\""+style+"\">"+iconTag+itemText+"</div>");
  138.     }
  139.     nmenu.popupFrame.document.write("<div style='height:0'> </div>");
  140.     nmenu.popupFrame.document.write("</div>");
  141.     for(arrayItem=0;arrayItem<array.length/3;arrayItem++)
  142.     {
  143.         if(array[arrayItem*3+2]) buildPopup(nmenu,arrayName+'_'+(arrayItem+1),level+1);
  144.     }
  145. }
  146.  
  147. function buildPopups()
  148. {
  149.     var nmn;
  150.     var pf;
  151.  
  152.     for(nmn=1;nmn<=lastm;nmn++)
  153.     {
  154.         var nmenu=eval("window.m"+nmn);
  155.         if(nmenu&&(!nmenu.sepFrame||nmenu.openSameFrame))
  156.         {
  157.             nmenu.popupFrame=(nmenu.sepFrame&&!nmenu.openSameFrame)?findFr(window.top,nmenu.contentFrame):window;
  158.             targetFrame=(nmenu.sepFrame)?findFr(window.top,nmenu.cntFrame):window;
  159.             var i=1;
  160.             while(true)
  161.             {
  162.                 var menu=eval(nmenu.name+'mn'+i);
  163.                 if (!menu)break;
  164.                 buildPopup(nmenu,nmenu.name+'mn'+i,0);
  165.                 i++;
  166.             }
  167.             pf=nmenu.popupFrame;
  168.         }
  169.     }
  170.     if(pf)pf.document.close();
  171. }
  172.  
  173. buildPopups ();
  174.  
  175. function createMenuItem(nmenu,popup,id,itemLink,itemText,popupArray,levelAttribs,bLast,popupHeight)
  176. {
  177.     var itemWnd=findElement(nmenu.popupFrame,id);
  178.  
  179.     addNewEvent(itemWnd,"mouseover",onItemOver,false);
  180.     addNewEvent(itemWnd,"mouseout",onItemOut,false);
  181.     addNewEvent(itemWnd,"mousedown",onItemClick,false);
  182.     addNewEvent(itemWnd,"dblclick",onItemClick,false);
  183.     itemWnd.owner=popup;
  184.     with (itemWnd.style)
  185.     {
  186.         if(itemLink){cursor="hand";}
  187.         else{cursor="default";}
  188.         backgroundColor=levelAttribs[4];
  189.         setRealWidth(itemWnd,nmenu.popupWidth,2*nmenu.bord);
  190.     }
  191.     if (popupArray)itemWnd.popupArray=popupArray;
  192.     itemWnd.url=getAbsolutePath(itemLink);
  193.     itemWnd.dispText=itemText;
  194.  
  195.     return itemWnd.offsetHeight;
  196. }
  197.  
  198. function setRealWidth(wnd,width,borderWidth)
  199. {
  200.     wnd.style.pixelWidth=width-borderWidth;
  201.     if (wnd.style.pixelWidth>width-borderWidth) wnd.style.pixelWidth=width-parseInt(wnd.style.paddingLeft)-parseInt(wnd.style.paddingRight);
  202. }
  203.  
  204. function createPopupFromCode(nmenu,arrayName,level)
  205. {
  206.     var popupName=arrayName+"popup";
  207.     var popup=findElement(nmenu.popupFrame,popupName);
  208.     if (popup&&popup.bCreated)return popup;
  209.     var levelAttribs;
  210.     if (level > nmenu.maxlev) {levelAttribs = eval ("nmenu.lev" + nmenu.maxlev) ;} else {levelAttribs = eval ("nmenu.lev" + level) ;}
  211.  
  212.     popup.level=level;
  213.     popup.highlightColor=levelAttribs[5];
  214.     popup.normalColor=levelAttribs[3];
  215.     popup.highlightBgColor=levelAttribs[7];
  216.     popup.normalBgColor=levelAttribs[4];
  217.     popup.scrVis=false;
  218.     popup.bCreated=true;
  219.     popup.nmenu=nmenu;
  220.  
  221.     with (popup.style)
  222.     {
  223.         zIndex=maxZ;
  224.         position="absolute";
  225.         width=nmenu.popupWidth;
  226.         borderColor=nmenu.borderCol;
  227.         backgroundColor=nmenu.bord?nmenu.borderCol:levelAttribs[4];
  228.         borderWidth=nmenu.bord;
  229.         borderStyle="solid";
  230.     }
  231.  
  232.     addNewEvent(popup,"mouseout",onPopupOut,false);
  233.     addNewEvent(popup,"mouseover",onPopupOver,false);
  234.     var popupHeight=0;
  235.  
  236.     var array=eval(arrayName);
  237.     var arrayItem;
  238.     for(arrayItem=0;arrayItem<array.length/3;arrayItem++)
  239.     {
  240.         var popupArray=(array[arrayItem*3+2])?(arrayName+"_"+parseInt(arrayItem+1)):null;
  241.         popupHeight+=createMenuItem(nmenu,popup,(popupName+arrayItem),array[arrayItem*3+1],array[arrayItem*3],popupArray,levelAttribs,(arrayItem == array.length/3-1),popupHeight);
  242.     }
  243.     return popup;
  244. }
  245.  
  246. function closePopup(nmenu,popupId,dl)
  247. {
  248.     if(popupId.indexOf('_')==-1)
  249.     {
  250.         var hideWnd=findElement(nmenu.popupFrame,'HideItem');
  251.         if(hideWnd)hideWnd.style.visibility='visible';
  252.         if (nmenu.actm&&dl) chgBg (nmenu, nmenu.actm, 0, 1);
  253.     }
  254.     var popup=findElement(nmenu.popupFrame,popupId);
  255.     if (popup)
  256.     {
  257.         resetPopup(popup);
  258.         if (popup.expandedWnd) closePopup (nmenu,popup.expandedWnd.id);
  259.         popup.style.visibility="hidden";
  260.     }
  261.     if (nmenu.activePopup && nmenu.activePopup.id==popupId) nmenu.activePopup=null;
  262. }
  263.  
  264. function absToRel(rect,refx,refy)
  265. {
  266.     var retval=new rct(rect.left-refx,rect.top-refy,rect.right-refx,rect.bottom-refy);
  267.     return retval;
  268. }
  269.  
  270. function removeHighlight (popup,actEl)
  271. {
  272.     var items=popup.getElementsByTagName("DIV");
  273.     var i=0;
  274.     for (;i<items.length;i++)if(actEl!=items[i]&&(!items[i].id||items[i].id.indexOf("scroll")==-1))
  275.     {
  276.         items[i].style.backgroundColor=popup.normalBgColor;
  277.         items[i].style.color=popup.normalColor;
  278.     }
  279. }
  280.  
  281. function openPopup(nmenu,popup,x,y,bDontMove,refWnd)
  282. {
  283.     if(popup.id.indexOf('_')==-1){var hideWnd=findElement(nmenu.popupFrame,'HideItem');if(hideWnd)hideWnd.style.visibility='hidden';}
  284.     popup.style.pixelLeft=x;
  285.     popup.style.pixelTop=y;
  286.     popup.style.visibility="visible";
  287.     var popupRect=getClientRect(nmenu,popup);
  288.     var browserRect=getBrowserRect(nmenu.popupFrame);
  289.     if (popupRect.right>browserRect.right)
  290.     {
  291.         if(refWnd&&refWnd.id&&refWnd.id.indexOf('top')==-1)popup.style.pixelLeft=Math.max(0,refWnd.offsetLeft-popup.offsetWidth+nmenu.levelOffset);
  292.         else popup.style.pixelLeft=browserRect.right-popup.offsetWidth-5;
  293.     }
  294.     removeHighlight (popup,null);
  295. }
  296.  
  297. function isChildOfActivePopup(nmenu,popup)
  298. {
  299.     var wnd=nmenu.activePopup;
  300.     while(wnd)
  301.     {
  302.         if (wnd.id==popup.id)
  303.             return true;
  304.         wnd=wnd.expandedWnd;
  305.     }
  306.     return false;
  307. }
  308.  
  309. function onPopupOver()
  310. {
  311.     var nmenu=this.nmenu;
  312.     if (nmenu.activePopup && isChildOfActivePopup (nmenu,this)) clearTimeout(nmenu.activePopupTimeout);
  313. }
  314.  
  315. function onPopupOut()
  316. {
  317.     var nmenu=this.nmenu;
  318.     onPopupOutImpl(nmenu,this);
  319. }
  320.  
  321. function onPopupOutImpl(nmenu,popup)
  322. {
  323.     if (nmenu.mout && nmenu.activePopup && isChildOfActivePopup (nmenu,popup))
  324.     {
  325.         if (nmenu.activePopupTimeout) clearTimeout (nmenu.activePopupTimeout);
  326.         nmenu.activePopupTimeout=setTimeout("closePopup("+nmenu.name+",'"+nmenu.activePopup.id+"',1);", nmenu.closeDelay);
  327.     }
  328. }
  329.  
  330. function rct(left,top,right,bottom)
  331. {
  332.     this.left=left;
  333.     this.top=top;
  334.     this.right=right;
  335.     this.bottom=bottom;
  336. }
  337.  
  338. function getBody(frame)
  339. {
  340.     var bodyArr=frame.document.getElementsByTagName('body');
  341.     return bodyArr[0];
  342. }
  343.  
  344. function getBrowserRect(doc)
  345. {
  346.     var body=getBody(doc);
  347.     var left=body.style.pixelLeft;
  348.     var top=body.style.pixelTop;
  349.     var right=left+body.style.pixelWidth;
  350.     var bottom=top+body.style.pixelHeight;
  351.     var retval=new rct(left,top,right,bottom);
  352.     return retval;    
  353. }
  354.  
  355. function getClientRect(nmenu,wnd)
  356. {
  357.     var left=0;
  358.     var top=0;
  359.     var right=0;
  360.     var bottom=0;
  361.     var par=wnd;
  362.     while (par)
  363.     {
  364.         left+=par.offsetLeft;
  365.         top+=par.offsetTop;
  366.         if (par.offsetParent==par || par.offsetParent==getBody(nmenu.popupFrame)) break;
  367.         par=par.offsetParent;
  368.     }
  369.     right=left+wnd.offsetWidth;
  370.     bottom=top+wnd.offsetHeight;
  371.     var retval=new rct(left,top,right,bottom);
  372.     return retval;
  373. }
  374.  
  375. function findFr(wn,fr)
  376. {
  377.     if(wn.frames)
  378.     {
  379.         for(var i=0;i<wn.frames.length;i++)
  380.         {
  381.             if(wn.frames[i].name==fr)return wn.frames[i];
  382.             var ret=findFr(wn.frames[i],fr);
  383.             if(ret)return ret;
  384.         }
  385.     }
  386.     return null;
  387. }
  388.  
  389. function onItemClick()
  390. {
  391.     var item=this;
  392.     var nmenu=this.owner.nmenu;
  393.     if (item.url)
  394.     {
  395.         var trgFrame = nmenu.cntFrame;
  396.         var startPos=item.dispText.indexOf('<!--');
  397.         if (startPos!=-1)
  398.         {
  399.             var endPos = item.dispText.indexOf('-->',startPos);
  400.             trgFrame = item.dispText.substring (startPos+4,endPos);
  401.         }
  402.         if (trgFrame)
  403.         {
  404.             if (trgFrame=="_blank") window.open (item.url);
  405.             else if (trgFrame=="_top") window.top.location.href=item.url;
  406.             else if (trgFrame.indexOf('_')==0) parent.location.href=item.url;
  407.             else
  408.             {
  409.                 var fr=findFr(window.top,trgFrame);
  410.                 if(fr)fr.location.href=item.url;
  411.                 else window.location.href=item.url;
  412.             }
  413.         }
  414.         else
  415.         {
  416.             var find=item.url.indexOf("javascript:");
  417.             if (find!=-1)
  418.                 eval(item.url.substring(find));
  419.             else
  420.                 {
  421.                 var mt=item.url.indexOf("mailto:");
  422.                 if(mt!=-1)window.location=item.url.substring(mt);
  423.                 else if(nmenu.popupFrame!=window) window.open(item.url);
  424.                 else targetFrame.location=item.url;
  425.                 }
  426.         }
  427.         if(nmenu.activePopup)closePopup(nmenu,nmenu.activePopup.id,1);
  428.     }
  429. }
  430.  
  431. function onItemOver()
  432. {
  433.     var item=this;
  434.     var nmenu=this.owner.nmenu;
  435.     if (item.owner.expandedWnd)
  436.     {
  437.         resetPopup(item.owner);
  438.         closePopup(nmenu,item.owner.expandedWnd.id);
  439.     }
  440.     if (item.url&&item.url.indexOf("javascript:")==-1)
  441.         window.status=item.url;
  442.     else
  443.         window.status="";
  444.     
  445.     removeHighlight (item.owner,null);
  446.     item.style.color=item.owner.highlightColor;
  447.     item.style.backgroundColor=item.owner.highlightBgColor;
  448.     
  449.     var items=item.owner.getElementsByTagName("DIV");
  450.     if (item.popupArray)
  451.     {
  452.         var rect=getClientRect(nmenu,item);
  453.         var x=rect.right-nmenu.levelOffset;
  454.         var y=rect.top;
  455.         var popup=createPopupFromCode(nmenu,item.popupArray,item.owner.level+1);
  456.         item.owner.expandedWnd=popup;
  457.         openPopup(nmenu,popup,x,y+2,false,item.owner);
  458.     }
  459. }
  460.  
  461. function onItemOut()
  462. {
  463.     var item=this;
  464.     var nmenu=this.owner.nmenu;
  465.     window.status="";
  466. }
  467.  
  468. function expandMenu(nmenu,popupId,refWnd,dum,ml,mt,mr,mb)
  469. {
  470.     if(!docLoaded)return;
  471.     clearTimeout(nmenu.activePopupTimeout);
  472.     if (nmenu.activePopup&&nmenu.activePopup.id!=popupId+"popup")
  473.         closePopup(nmenu,nmenu.activePopup.id);
  474.     if(popupId=='none')return;
  475.     var rect;
  476.     if(refWnd=='coords'){rect=getClientRect(nmenu,findElement(0,nmenu.name+'tl'));rect.left=rect.left+ml;rect.top=rect.top+mt;rect.right=rect.left+mr;rect.bottom=rect.top+mb;}else{rect=getClientRect(nmenu,findElement(0,refWnd));}
  477.     var x;
  478.     var y;
  479.  
  480. #ifdef MENU_HORIZONTAL
  481. #ifdef MENU_VERTICAL
  482.     if(nmenu.menuHorizontal)
  483.     {
  484.         x=rect.left;
  485.         y=rect.bottom+nmenu.popupOffset;
  486.     }
  487.     else
  488.     {
  489.         x=rect.right+nmenu.popupOffset;
  490.         y=rect.top;
  491.     }
  492. #endif
  493. #endif
  494.  
  495. #ifdef MENU_HORIZONTAL
  496. #ifndef MENU_VERTICAL
  497.         x=rect.left;
  498.         y=rect.bottom+nmenu.popupOffset;
  499. #endif
  500. #endif
  501.  
  502. #ifndef MENU_HORIZONTAL
  503. #ifdef MENU_VERTICAL
  504.         x=rect.right+nmenu.popupOffset;
  505.         y=rect.top;
  506. #endif
  507. #endif
  508.  
  509. #ifdef MENU_SEPARATE_FRAME
  510.     if(nmenu.sepFrame&&!nmenu.openSameFrame)
  511.     {
  512.         var brRect=getBrowserRect(nmenu.popupFrame);
  513.         var wRect=getBrowserRect(window);
  514.         switch (nmenu.menuPos)
  515.         {
  516.         case 0:
  517.             x=brRect.left+nmenu.popupOffset;
  518.             y+=brRect.top-wRect.top;
  519.             break;
  520.         case 1:
  521.             x=brRect.right-nmenu.popupOffset;
  522.             y+=brRect.top-wRect.top;
  523.             break;
  524.         case 2:
  525.             x+=brRect.left-wRect.left;
  526.             y=brRect.top+nmenu.popupOffset;
  527.             break;
  528.         case 3:
  529.             x+=brRect.left-wRect.left;
  530.             y=brRect.bottom-nmenu.popupOffset;
  531.             break;
  532.         }
  533.     }
  534. #endif
  535.     var popup=createPopupFromCode(nmenu,popupId,0);
  536.     openPopup(nmenu,popup,x,y,true,null);
  537.     nmenu.activePopup=popup;
  538. }
  539.  
  540. function collapseMenu(nmenu,popupId)
  541. {
  542.     if(!docLoaded)return;
  543.     var popup=findElement(nmenu.popupFrame,popupId+"popup");
  544.     if(popup)onPopupOutImpl(nmenu,popup);
  545. }
  546.  
  547. function expandMenuNS(nmenu,popupId,e,dItem)
  548. {
  549. }
  550.  
  551. function collapseMenuNS(nmenu,popupId)
  552. {
  553. }
  554.  
  555. function onDocClick()
  556. {
  557.     var nmn;
  558.     for(nmn=1;nmn<lastm;nmn++)
  559.     {
  560.         var nmenu=eval("window.m"+nmn);
  561.         if(nmenu&&nmenu.activePopup)closePopup(nmenu,nmenu.activePopup.id,1);
  562.     }
  563. }
  564.  
  565. function initializeMenu()
  566. {
  567.     if(docLoaded)return;
  568.     var nmn;
  569.     for(nmn=1;nmn<lastm;nmn++)
  570.     {
  571.         var nmenu=eval("window.m"+nmn);
  572.         if(nmenu&&!nmenu.mout)addNewEvent(nmenu.popupFrame.document,"mousedown",onDocClick,false);
  573.     }
  574.     docLoaded=true;
  575. }
  576.  
  577. function addNewEvent(obj,event,fun,bubble)
  578. {
  579.     if (obj.addEventListener)
  580.         obj.addEventListener(event,fun,bubble);
  581.     else
  582.         eval("obj.on"+event+"="+fun);
  583. }
  584.  
  585. function chgBg(nmenu,item,color,cl)
  586. {
  587.     var el=findElement(0,item);
  588.     if (color==0)
  589.     {
  590.         if (cl)
  591.         {
  592.             if(!nmenu.bBitmapScheme)el.style.background=nmenu.tlmOrigBg;
  593.             el.style.color=nmenu.tlmOrigCol;
  594.         }
  595.     }
  596.     else
  597.     {
  598.         if(nmenu.actm) chgBg (nmenu, nmenu.actm, 0, 1);
  599.         if(!nmenu.bBitmapScheme&&(color&1))el.style.background=nmenu.tlmHlBg ;
  600.         if(color&2)el.style.color=nmenu.tlmHlCol ;
  601.         nmenu.actm = item;
  602.     }
  603. }
  604.  
  605. function initializeAll()
  606. {
  607.     var i;
  608.     for(i=0;i<=document.lastLoadHandler;i++)
  609.     {
  610.         eval(document.loadHandlers[i]+'();');
  611.     }
  612. }