home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 October / Chip_2004-10_cd1.bin / servis / viry / cleaner / info / info_soubory / mmenu.js < prev    next >
Text File  |  2003-10-02  |  32KB  |  544 lines

  1.  
  2. function changeImages() {
  3.   if (document.images) {
  4.     for (var i=0; i<changeImages.arguments.length; i+=2) {
  5.       document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
  6.     }
  7.   }
  8. }
  9.  
  10. Mtimer=setTimeout("rep_img()",99999);_d=document;smc=-1;MLoaded=0;ST=0;mspu=0;pu=0;
  11. ns4=(_d.layers)?true:false
  12. ns6=(navigator.userAgent.indexOf("Gecko")!=-1)?true:false
  13. mac=(navigator.appVersion.indexOf("Mac")!=-1)?true:false
  14. mac45=(navigator.appVersion.indexOf("MSIE 4.5")!=-1)?true:false
  15. if(ns6||ns4)mac=false
  16.  
  17. cls = " class='menu_link'";
  18.  
  19. loadWait=0;
  20.  
  21. opra=(navigator.userAgent.indexOf("Opera")!=-1)?true:false
  22. if(mac&&opra)mac=0
  23. ns61=(parseInt(navigator.productSub)>=20010726)?true:false
  24. ie4=(!_d.getElementById&&_d.all)?true:false;ta=0;
  25. ie55=((navigator.appVersion.indexOf("MSIE 6.0")!=-1||navigator.appVersion.indexOf("MSIE 5.5")!=-1))?true:false;
  26. if(ie55&&opra)ie55=false;
  27. konq=(navigator.userAgent.indexOf("Konqueror")!=-1)?true:false
  28. IEDtD=0;if((_d.all&&_d.compatMode=="CSS1Compat")||(mac&&_d.doctype&&_d.doctype.name.indexOf(".dtd")!=-1))IEDtD=1;
  29. mp=(ns6)?"pointer":"hand";oatop=0;aleft=0;oaleft=1;osy=0;oww=-1;owh=-1;frs=0;fre=0;nsmatch=0;okpgms=0;inDragMode=0;closeFel=1;
  30. var a,_am,oa,im,om,flta;hlarr=new Array();hlcnt=0;hll=0;Mname=new Array();parr=new Array();SwapIM=new Array();SoImG=new Array();keyar=new Array();keyarC=0;keynum=0;MenuHasFocus=1;
  31. _OfM=0;ParentMenu=0;pf=0;gmi=20;ns6hif=0;timo=0;el=0;nshl=0;var omv=0;df=1;im=0;ofrac=0;omnu=0;kmnu=0;ac=22;m=1;sy=1;sx=1;ShM=0;ww=0;wh=0;var imar=new Array();mr=",";
  32. while(self["menu"+m]){mr+="menu"+m+",";tmenu=eval("menu"+m);
  33. Mname[m]=tmenu[0].toLowerCase();m++}
  34. mr=mr+" ";mr=mr.split("\,");menus=mr.length-1;var cgm=0;
  35. function gmobj(mtxt){if(_d.getElementById){m=_d.getElementById(mtxt)}else if(_d.all){m=_d.all[mtxt]}else if(_d.layers){m=_d[mtxt]}return m;}
  36. function gmstyle(mtxt){m=gmobj(mtxt);if(!ns4){if(m)m=m.style;}return m;}
  37. function spos(gm,t_,l_,h_,w_){px="px";if(ns4){px="";gms=gm;if(w_!=null)gms.clip.width=w_;if(h_!=null)gms.clip.height=h_;}else if(opra){px="";gms=gm.style;if(w_!=null)gms.pixelWidth=w_;if(h_!=null)gms.pixelHeight=h_}else{gms=gm.style;if(w_!=null)gms.width=w_+px;if(h_!=null)gms.height=h_+px;}if(t_!=null)gms.top=t_+px;if(l_!=null)gms.left=l_+px}
  38. function gpos(gm){if(ns4){t_=gm.top;l_=gm.left;h_=gm.clip.height;w_=gm.clip.width;}else if(opra){t_=gm.offsetTop;l_=gm.offsetLeft;h_=gm.offsetHeight;w_=gm.offsetWidth;}else if(ns6){t_=gm.offsetTop;l_=gm.offsetLeft;h_=gm.offsetHeight;w_=gm.offsetWidth}else{if(mac){topM=gm.offsetParent.topMargin;if(!topM)topM=0;leftM=gm.offsetParent.leftMargin;if(!leftM)leftM=0;t_=parseInt(topM)+gm.offsetTop;l_=parseInt(leftM)+gm.offsetLeft;}else{t_=gm.offsetTop;l_=gm.offsetLeft;}h_=gm.offsetHeight;w_=gm.offsetWidth;}if(konq){w_=parseInt(gm.style.width);h_=parseInt(gm.style.height);}var gpa=new Array();gpa[0]=t_;gpa[1]=l_;gpa[2]=h_;gpa[3]=w_;return(gpa)}
  39. function getMouseXY(e){if(ns4||ns6){MouseX=e.pageX;MouseY=e.pageY;}else{MouseX=event.clientX;MouseY=event.clientY}if(!opra&&_d.all){MouseX=MouseX+_d.body.scrollLeft;MouseY=MouseY+_d.body.scrollTop;if(IEDtD)MouseY=MouseY+sy}if(inDragMode){gm=gmobj(DragLayer);spos(gm,MouseY-DragY,MouseX-DragX);return false}return true}
  40. function parseLink(txt,what){txt=txt+";";lt="";if(what=="link"){if(txt.indexOf(""")>0){lt=txt}else{sp=txt.indexOf(" ");lt=txt.substr(0,sp);}}else{sp=txt.indexOf(what)+what.length+1;if(sp>what.length){lt=txt.substr(sp,999);lt=lt.substr(0,lt.indexOf(";"))}}return lt}
  41. function cHexColor(_c){return _c.match(/^[0-9a-f]{6,6}$/i) ? '#' + _c.toUpperCase() : _c;}
  42. function stch(ms){window.status=ms;return true}
  43. function fixForm(divname,show){if(ie55||ns6||mac)return;mfrms=divname.split(";");for(oa=0;oa<mfrms.length;oa++){if(opra||ns4){SDiv(mfrms[oa],show)}else{gmf=_d.forms[mfrms[oa]];if(gmf){for(foa=0;foa<gmf.length;foa++){if(gmf.elements[foa].type.substr(0,7)=="select-"){fobj=gmf.elements[foa].style;if(show){fobj.visibility="visible";fobj.overflow="visible"}else{fobj.visibility="hidden";fobj.overflow="hidden"}}}}}}}
  44. function SDiv(nm,sh){if(ns4&&nm.indexOf(".")>0)tD=eval(nm); else tD=gmstyle(nm);if(tD)if(sh)tD.visibility="visible";else {tD.visibility="hidden";if(ie55){gmif=gmobj("if"+nm);if(gmif)gmif.style.visibility='hidden';}}}
  45. function close_el(){for(xa=hlarr.length-1;xa>=0;xa--){ti=hlarr[xa].split("@");if(!ns4&&SoImG[ti[1]]){stimo="im_"+ti[0].substring(4,99)+"_"+ti[1]+"_"+ti[0];stimo=gmobj(stimo);menu=eval(ti[0]);if(menu[11]==1)stimo.src=menu[6][16]; else stimo.src=menu[6][10];}tmenu=eval(ti[0]);if(ns4){shl(ti[0],ti[1],'hide')}else{arg=gmobj("el"+ti[1]);arg.style.background=ti[2];arg.style.color=""+ti[3];if(ti[4])arg.style.borderColor=ti[4]}if(ti[0]==hll){if(ns4)shl(ti[0],hel,'show');return}}hlcnt=0;hlarr=new Array()}
  46. function closeallmenus(){ShM=0;om="";hll="";close_el();if(ParentMenu){if(ParentMenu.closeFel)ParentMenu.close_el();}if(pf&&pf.MLoaded){pf.closeallmenus();}if(ns4){omv.visibility="hide"}for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[17]&&MLoaded>1)fixForm(menu[17],1);if(menu[7]!=1)SDiv("menu"+a,0);else _am=""}}
  47. function rep_img(){if(timo&&timo.src!=o_img){timo.src=o_img}}
  48. function popdn(){arg=popdn.arguments;if(arg[0]){if(arg[3].substr(0,5)!="show-"){if(ns4){shl(arg[2],arg[1],"hide")}else{arg[0].style.background=arg[4];arg[0].style.color=arg[5];if(arg[6])arg[0].style.borderColor=arg[6]}}else{if(ns4)omv=0;hlarr[hlcnt]=arg[2]+"@"+arg[1]+"@"+arg[4]+"@"+arg[5]+"@"+arg[6];hlcnt++;}menu=eval(arg[2]);if(!menu[12]){clearTimeout(Mtimer);Mtimer=setTimeout("closeallmenus();resetShM();",timegap)}}else{clearTimeout(Mtimer);Mtimer=setTimeout("closeallmenus();resetShM",timegap)}}
  49. function dc(){if(nshl.indexOf("show-menu=")>-1)return;tr=ltarg.split("=");if(tr[1])parent.frames[tr[1]].location.href=nshl;else location.href=nshl;}
  50. function getMenuByName(mn){mn=mn.toLowerCase();for(a=1;a<menus;a++){if(mn==Mname[a]){return a;}}return a;}
  51. function getMenuItem(mn,item){for(a=1;a<mn;a++){menu=eval("menu"+a);item=item+((menu.length-ac)/5)}item--;return item}
  52. function sis(){for(a=1;a<imar.length;a++){tim=imar[a].split("_");if(tim[4]){tim[3]=tim[3]+"_"+tim[4]}menu=eval(tim[3]);if(ns4){im=_d.layers[tim[3]].document.layers["el"+tim[2]];imp=gpos(im);eln="";for(x=0;x<2;x++){imo=_d.layers[tim[3]].document.layers[eln+"el"+tim[2]].document.layers[imar[a]];imop=gpos(imo);imL=imp[3]-(imop[3]);imT=(imp[2]/2)-(imop[2]/2);if(menu[15])imL=1;if(menu[13]=="left")imL=1;if(menu[13]=="center")imL=(imp[3]/2);eln="m";spos(imo,imT,imL,null,null);}}else{imo=gmobj(imar[a]);imop=gpos(imo);im=gmobj("el"+tim[2]);imp=gpos(im);if(mac){x=menu[6][9];imp[0]=imp[0]-x;imop[0]=imo[0]-x}if(menu[11]){imco=gpos(gmobj("hel"+tim[2]));imc=imco[1];}else{imc=0}imT=imp[0]+(imp[2]/2)-(imop[2]/2);imL=imc+imp[3]-(imop[3]);if(menu[15])imL=imc;if(menu[13]=="left")imL=imc;if(menu[13]=="center")imL=imc+(imp[3]/2);if(ns6&&!ns61){nsC=gpos(gmobj(tim[3]));imT=imT-nsC[0];imL=imL-nsC[1]}spos(imo,imT,imL,null,null);}}}
  53. function fixb(mnu){menu=eval(mnu);ic=(menu.length-ac)/5;menu[21][2]=1;m42=menu[4]*2;mn=gmobj(mnu);if(ns4){if(menu[14]){spos(gmobj("menuback"+mnu),null,null,mn.clip.height+(menu[14]*2),null)}if(menu[11]){mn.clip.width=mn.clip.width+menu[4]}return}mp=gpos(mn);el=menu[21][1];ml=gmobj("el"+(el-1));mlp=gpos(ml);tw=null;th=null;if(menu[11]){lf=0;tc=0;for(y=el-ic;y<el;y++){tc++;ty=gmobj("el"+y);typ=gpos(ty);thy=gmobj("hel"+y);thyp=gpos(thy);if(mac&&!menu[3]){thy.style.width=1+"px";ty.style.width=thy.offsetWidth+menu[6][9]+"px";typ[3]=thy.offsetWidth}if(opra){ty.style.top=menu[4];if(lf==0)lf=menu[4];typ[2]=typ[2]+(m42);spos(ty,null,0,null,typ[3]);}spos(thy,null,lf,typ[2],typ[3]);lfL=0;if(menu[ac-1+(tc*5)]>0)lfL=menu[ac-1+(tc*5)];lf=lf+typ[3]+lfL;hsep=gmobj("hsep"+y);if(y<el-1)spos(hsep,null,typ[3],typ[2]); else spos(hsep,null,0,0,0);}tw=lf-lfL;th=typ[2];if(_d.compatMode=="CSS1Compat"){}else{if(mac){if(!_d.doctype){th=th+(m42);tw=tw+m42}else{if(_d.doctype.name.indexOf(".dtd")<0){th=th+(m42);}}}else if(_d.all&&!opra){tw=tw+(m42);th=th+(m42)}}if(opra)tw=tw+(menu[4])}else{marw=parseLink(menu[20],"margin");if(ns6){tw=mp[3]-(menu[4]*4);}if(IEDtD){tw=menu[3]-menu[4]}if(opra)tw=mp[3]-(menu[4]*2);if(menu[19]){spo=gmobj("S"+mnu);sp=gpos(spo);th=sp[2];}}spos(mn,null,null,th,tw);if(marw)tw=tw+(marw*2)+2;spos(mn,null,null,th,tw);if(menu[14]){spos(gmobj("menuback"+mnu),null,null,th+(menu[14]*2)+m42,null)}}                
  54. function sm(v1){menu=eval(v1);if(menu[19]&&!menu[21][2])fixb(v1);if(opra||ns6||menu[11]||IEDtD)if(!menu[7]&&!menu[21][2])fixb(v1);ap=gmobj(v1);if(flta)if(ap.filters[0])ap.filters[0].Apply();gmi++;if(!ns4)aps=ap.style; else aps=ap;aps.zIndex=gmi;aps.visibility='visible';if(ie55){gmif=gmobj("if"+v1);ifgp=gpos(ap);spos(gmif,ifgp[0],ifgp[1],ifgp[2],ifgp[3]);gmif.style.visibility='visible';}if(flta)if(ap.filters[0])ap.filters[0].Play();if(menu[17])fixForm(menu[17],0)}
  55. function popup(mn,mpos){if(isNaN(mn)){for(a=1;a<menus;a++){if(mn==Mname[a]){mn=a;break;}}}setpos();omv.visibility='hide';clearTimeout(Mtimer);closeallmenus();mtxt='menu'+mn;mi=gmstyle(mtxt);if(ns4)_d.captureEvents(Event.MOUSEMOVE);_d.onmousemove=getMouseXY;mn=gmobj(mtxt);gp=gpos(mn);if(mpos>0){ttop=MouseY+2;tleft=MouseX+2}else{ttop=gp[0];tleft=gp[1];}if((ttop+gp[2])>(wh+sy)){ttop=wh-gp[2]+sy;if(!mpos&&mpos>0){spos(mn,ttop,null,null,null);}}if((tleft+gp[3])>(ww+sx)){tleft=ww-gp[3]+sx;if(!mpos&&mpos>0){spos(mn,null,tleft,null,null);}}if(mpos){spos(mn,ttop,tleft,null,null);}flta=0;if((_d.all&&_d.getElementById)&&!mac){ap=gmobj(mtxt);getflta(ap);}sm(mtxt);_am=mn}
  56. function shl(lyr,el,s){clearTimeout(Mtimer);mt=_d.layers[lyr].document.layers["el"+el];omv.visibility="hide";menu=eval(lyr);mt.visibility=s;omv=mt}
  57. function resetShM(){for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[7]&&menu[12]){ShM=0;return}}if(ParentMenu)ParentMenu.resetShM()}
  58. function popi(v1,lyr,el)
  59. {
  60.     if((loadWait&&MLoaded==0)||inDragMode)return;
  61.     subfound=0;nv1=v1;
  62.     for(a=1;a<menus;a++){if(v1.match("show-menu")&&v1.substring(10,99)==Mname[a]){v1="show-menu"+a;subfound=1;a=999}    }
  63.     if(!om)om=lyr;clearTimeout(Mtimer);
  64.     if(ParentMenu)ParentMenu.clearTimeout(ParentMenu.Mtimer);
  65.     if(ns4){timo=_d.layers[lyr].document.layers["el"+el].document.images[0]}else{timo=gmobj("im"+el)}
  66.     o_img="";if(timo){o_img=timo.src;if(SwapIM[el].src)timo.src=SwapIM[el].src}
  67.     kmnu=lyr;container=eval(lyr);
  68.     if(SoImG[el])
  69.     {
  70.         stimo="im_"+lyr.substring(4,99) + "_" + el+"_" + lyr
  71.         if(ns4){stimo=_d.layers[lyr].document.layers["el"+el].document.layers[stimo]}else{stimo=gmobj(stimo)}
  72.         stimo.src=SoImG[el].src
  73.     }
  74.  
  75.     if(subfound)
  76.     {
  77.         v1=v1.substring(5,99);
  78.         menu=eval(v1);
  79.         
  80.         omnu=v1;
  81.         mi=gmobj(v1);
  82.         
  83.         gp=gpos(gmobj(lyr));
  84.         h3="";
  85.         
  86.         if(container[11])h3="h";
  87.         if(ns4){tel=gpos(_d.layers[lyr].document.layers["el"+el])}else{
  88.         tel=gpos(gmobj(h3+"el"+el))
  89.     }
  90.     
  91.         np=gpos(mi);
  92.         if(np[2]<10){fixb(v1);np=gpos(mi)}
  93.         if(container[11])
  94.         {
  95.             kmnu=v1
  96.             if(!container[5])container[5]="";
  97.             if(!opra&&_d.all&&!mac)gp[1]=gp[1]+container[4];
  98.             if(ns6)if(ns61)gp[1]=gp[1]+container[4];else gp[1]=-1;gp[0]=gp[0]-container[4]
  99.             if(mac)gp[0]=gp[0]-container[4];
  100.             if(container[5].indexOf("bottom")>=0){tvar=container[1];if(!tvar)tvar=0;gp[0]=gp[0]-np[2]-tel[2]}
  101.             if(tel[1]+gp[1]+np[3]>ww+sx){gp[1]=ww-np[3]-tel[1]+sx;}
  102.             mtop=gp[0]+gp[2];
  103.             mleft=tel[1]+gp[1];
  104.             if(container[15])mleft=mleft-np[3]+tel[3]+(container[4]*2)
  105.             m1=menu[1];
  106.             if(m1)
  107.             {
  108.                 m1=m1+"";
  109.                 if(m1.indexOf("offset=")==0)
  110.                 {
  111.                     os=m1.substr(7,99);
  112.                     mtop=(parseInt(os)+mtop)
  113.                 }
  114.                 else
  115.                 {
  116.                     if(m1)mtop=parseInt(m1)
  117.                 }
  118.             }
  119.  
  120.             m2=menu[2];
  121.             if(m2){m2=m2+"";
  122.             if(m2.indexOf("offset=")==0)
  123.             {
  124.                 os=menu[2].substr(7,99);
  125.                 mleft=(parseInt(os)+mleft);
  126.             }else{if(m2)mleft=m2;}
  127.         }
  128.         if(menu[5])setpos();else spos(mi,mtop,mleft-1,null,null);
  129.         }
  130.         else
  131.         {
  132.             if(!ns61&&ns6)tel[0]=tel[0]-gp[0];
  133.             nt=tel[0]+gp[0]+suboffset_top;
  134.             nl=gp[1]+tel[3]-suboffset_left;
  135.             onl=nl
  136.             ont=nt
  137.             if((gp[1]+gp[3]+np[3])>=ww+sx||menu[15]){nl=gp[1]-np[3]+suboffset_left}
  138.             if(nl<0)nl=onl;
  139.             if(nt+np[2]>wh+sy){nt=wh-np[2]+sy;}
  140.             if(nt<0)nt=sy+4
  141.             if(menu[1]>=0)nt=menu[1]
  142.             if(menu[2]>=0)nl=menu[2]
  143.             if(menu[5])setpos();else spos(mi,nt,nl,null,null);
  144.         }
  145.         om+=","+v1;
  146.         
  147.         if(ShM==1){sm(v1);if(!ns4)mi.style.visibility="visible"}
  148.  
  149. // Scroll Code **********
  150.         if(menu[19])
  151.         {
  152.             gp=gpos(gmobj(v1));
  153.             gpc=gpos(gmobj("S"+v1))
  154.             tt=0;
  155.             if((gp[0]+gpc[2])>wh+sy)
  156.             {
  157.                 spos(gmobj("S"+v1),null,null,(wh+sy)-gp[0]-10-2);
  158.                 spos(gmobj(v1),null,null,(wh+sy)-gp[0]-10);
  159.             }
  160.             else
  161.             {
  162.             }
  163.         }
  164. // Scroll Code **********
  165.     }
  166.     else
  167.     {
  168.         frt=v1.indexOf(" ")
  169.         lt=parseLink(v1, "sourceframe");
  170.         if(lt)pf=parent[lt];
  171.         if(frt>0&&v1.indexOf("show-menu=")>-1)
  172.         {
  173.             if(lt)
  174.             {
  175.                 v1=v1.substring(10,frt);
  176.                 if(pf.MLoaded)
  177.                 {
  178.  
  179.                     pf.mn=pf.gmobj("menu"+pf.getMenuByName(v1));
  180.                     menu=eval(lyr);
  181.                     gp=gpos(gmobj(lyr));
  182.                     h3="";
  183.                     if(container[11])h3="h";
  184.                     if(ns4){mp=gpos(_d.layers[lyr].document.layers["el"+el])}else{mp=gpos(gmobj(h3+"el"+el))}
  185.                     fLeft=0;
  186.                     if(menu[11])
  187.                     {
  188.                         fTop=pf.sy;
  189.                         fLeft=pf.sx+gp[1]+mp[1]+Frames_Left_Offset;
  190.                     }
  191.                     else
  192.                     {
  193.                         fTop=pf.sy+gp[0]+mp[0]+Frames_Top_Offset;
  194.                         fLeft=pf.sx+100
  195.                     }
  196.                     tp=gpos(pf.mn)
  197.                     if(fTop+tp[2]>(pf.sy+pf.wh))fTop=pf.wh-tp[2]+pf.sy
  198.                     pf.spos(pf.mn,fTop,fLeft-100,null,null);
  199.                     closeFel=0
  200.                     if(_OfM!=v1)closeFel=1                    
  201.                     if(ShM==1)
  202.                     {
  203.                         if(pf.mn.visibility=="hide"||pf.mn.style.visibility=="hidden")pf.popup(v1); 
  204.                     }
  205.                     else
  206.                     {
  207.                         if(closeFel)close_el();
  208.                     }
  209.                     
  210.                     _OfM=v1
  211.                     closeFel=1
  212.                     pf.ParentMenu=self
  213.                 }
  214.             }
  215.         }
  216.         else if(frt>0)
  217.         {
  218.             if(lt)if(pf)if(pf.MLoaded)pf.closeallmenus()
  219.             if(ns4)shl(lyr,el,"show");
  220.         }
  221.         
  222.     }
  223.     ta=om.split(",")
  224.     strt=0;
  225.     for(a=0;a<ta.length;a++)
  226.     {
  227.         if (ta[a]==v1)strt=0;
  228.         if (strt)
  229.         {
  230.             if(ta[a])
  231.             {
  232.                 hll=lyr;
  233.                 hel=el;
  234.                 close_el();
  235.                 tmnu=eval(ta[a])
  236.                 if(tmnu[17]&&!menu[17])fixForm(tmnu[17],1)
  237.                 if(!tmnu[7])SDiv(ta[a],0)
  238.             }
  239.         ta[a]=""
  240.         }
  241.         if(ta[a]==lyr)strt=1;
  242.     }
  243.     mmenu=eval(lyr)
  244.     if(mmenu[7]&&lyr!=ta[0])
  245.     {
  246.         closeallmenus();
  247.         if(v1==ta[ta.length-1])
  248.         {
  249.             if(ns4)shl(lyr,el,'show');
  250.             tmnu=eval(v1)
  251.             if(tmnu[17])fixForm(tmnu[17],0)
  252.  
  253.             SDiv(v1,1)
  254.         }
  255.     }
  256.     om=""
  257.     mdisp=0
  258.     for(a=0;a<ta.length;a++)
  259.     {
  260.         if(ta[a]==lyr)frs=a
  261.         if(ta[a]==v1)fre=a
  262.         if (mdisp||(a>frs&&a<fre))
  263.         {
  264.             if (ta[a]&&ta[a]!=v1)
  265.             {
  266.                 SDiv(ta[a],0)
  267.                 close_el();
  268.                 if(ns4)shl(lyr,el,'hide');
  269.             }
  270.         }
  271.         else
  272.         {
  273.             if(ta[a])om+=ta[a]+",";
  274.         }
  275.         if (v1==ta[a])mdisp=1
  276.     }
  277. }
  278.  
  279.  
  280. // Scroll Code **********
  281. function scroll(val,mnu)
  282. {
  283.     mn=getMenuByName(mnu);
  284.     mi=gmobj("Smenu"+mn);
  285.     mip=gpos(mi)
  286.     tt=tt-val
  287.     gp=gpos(gmobj("menu"+mn))
  288.  
  289.     if(tt>=0 && tt<(gp[2]-gp[0]))
  290.     {
  291.         mi.style.clip = "rect("+tt+"px "+mip[3]+"px "+(tt+gp[2]-7)+"px 0px)"
  292.         ns6c=0
  293.         if((ns6&&!ns61)||mac)ns6c=1
  294.         spos(mi,-tt,null,tt+gp[2])
  295.         ST = setTimeout("scroll("+val+",'"+mnu+"')",30);
  296.     }
  297.     else
  298.     {
  299.         tt=tt+val
  300.         clearTimeout(ST)
  301.     }
  302.     clearTimeout(Mtimer);
  303. }
  304. // Scroll Code **********
  305.  
  306. function replaceSubstring(input, from, to) {
  307.  // Goes through the input and replaces every occurrence of from with to
  308.  var output='';
  309.  while(input.length >= from.length && input.length > 0){
  310.   if(input.substring(0,from.length) == from){
  311.    output += to;
  312.    input = input.substring(from.length);
  313.   }else{
  314.    output += input.substring(0,1);
  315.    input = input.substring(1);
  316.   }
  317.  }
  318.  return output + input;
  319. }
  320.  
  321.  
  322. function hl()
  323. {
  324.     arg=hl.arguments;imgact="";hlnk=arg[1];if(!menu[8]&&menu[15])menu[8]="right";_am=" "+a;_am=_am.length-1;subimg="";arg[0]+="";if(ns6){dwd=arg[2][9]*2}else{dwd=0};if(ns4){if(el==0){st="<style type=\"text/css\">A.m{text-decoration:none;}</style>";_d.write(st);oatop=atop;}else{mtl=_d.layers[omnu].document.layers["el"+(el-1)];
  325.     if(oatop==atop){atop+=mtl.clip.height}else{atop=menu[4];}oatop=atop}if(menu[11]){atop=menu[4];if(oaleft==aleft){aleft+=mtl.clip.width+arg[8]}else{aleft=menu[4];oaleft=aleft}oaleft=aleft}else{aleft=menu[4];}}
  326.     if(hlnk.substring(0,5)=="show-"){arg[1]=arg[1].toLowerCase();if(arg[7]==hlnk) if(arg[6])arg[7]=arg[6];else arg[7]="";hlnk="#";if (arg[6]+" "!="undefined ")hlnk=arg[6];}
  327.     pI="popi('"+arg[1]+"','"+arg[5]+"',"+el+");";if(arg[1].substring(0,5)=="show-"&&(!menu[11]||menu[6][16])&&(menu[11]||menu[6][10])){im++;ims="im_"+a+"_"+el+"_"+arg[5];ti=arg[2][10];if(menu[6][16]&&menu[11])ti=menu[6][16];if(ns4){sti="<img border=0 src="+ti+">";
  328.     subimg="<layer id="+ims+">"+sti+"</layer>";}else{
  329.     if(!parseLink(arg[1],"sourceframe"))imgact="onmouseover=\"gmobj('el"+el+"').onmouseover();\" onmouseout=\"gmobj('el"+el+"').onmouseout();\"";
  330.     if(opra)imgact="onmouseover=\"clearTimeout(Mtimer)\"";
  331.     subimg="<img id="+ims+" style=\"position:absolute;\" "+imgact+" border=0 src="+ti+">"};imar[im]=ims;}omp=mp;ofc=arg[2][0];ofb=arg[2][1];onc=arg[2][2];onb=arg[2][3];ltarg=" ";lOnfunc="";lOffunc="";ltype="";lalign=menu[8];if(!lalign)lalign="left"
  332.     tfborc="";nborc="";fborc="";dragable=0;simg="";bimg="";sbimg="";sbgc="";sbgc=parseLink(hlnk,"separatorcolor");if(!sbgc)if(menu[6][19])sbgc=menu[6][19]; else sbgc=menu[6][4]
  333.     marw=parseLink(menu[20],"margin");
  334.     if(!marw)marw=0;
  335.     if(hlnk.indexOf(" ")>0){k2o=parseLink(hlnk,"keytoopen");if(k2o){keyar[keyarC]=k2o.toUpperCase()+";"+arg[1]+";"+arg[5]+";"+el;keyarC++;}
  336.         _al=parseLink(hlnk,"align");if(_al)lalign=_al;
  337.         ltarg=parseLink(hlnk,"target");
  338.         if(ltarg)ltarg=" target="+ltarg
  339.         lOnfunc= replaceSubstring(parseLink(hlnk,"onfunction")+";","\\","");;
  340.         lOffunc=replaceSubstring(parseLink(hlnk,"offfunction")+";","\\","");;
  341.         ltype=parseLink(hlnk,"type");
  342.         tofc=parseLink(hlnk,"offfontcolor");if(tofc)ofc=cHexColor(tofc)
  343.         tofb=parseLink(hlnk,"offbackcolor");if(tofb)ofb=cHexColor(tofb)
  344.         tonc=parseLink(hlnk,"onfontcolor");if(tonc)onc=cHexColor(tonc)
  345.         tonb=parseLink(hlnk,"onbackcolor");if(tonb)onb=cHexColor(tonb)
  346.         nborc=parseLink(hlnk,"onbordercolor");if(nborc){nborc=cHexColor(nborc);nborc="this.style.borderColor='"+nborc+"';"}
  347.         fborc=parseLink(hlnk,"offbordercolor");if(fborc){fborc=cHexColor(fborc);tfborc="border:"+fborc+" 1px solid;"}
  348.         simg=parseLink(hlnk,"swapimage");
  349.         soimg=parseLink(hlnk,"suboverimage");
  350.         if(soimg){SoImG[el]=new Image();SoImG[el].src=soimg}
  351.         bimg=parseLink(hlnk,"backimage");
  352.         sbimg=parseLink(hlnk,"overbackimage");
  353.         dragable=parseLink(hlnk,"dragable");
  354.         hlnk=parseLink(hlnk,"link");
  355.         if(hlnk.indexOf(" ")>0)hlnk=hlnk.substr(0,hlnk.indexOf(" "));
  356.     }
  357.     if(ns4&&ofb=="transparent")ofb=""
  358.     if(!ofb&&(mac||opra))ofb="transparent"
  359.     if(arg[7]+""=="undefined"){arg[7]=hlnk}        
  360.     if(ltype=="form"){onc=ofc;onb=ofb;mp="default"}
  361.     if(ltype=="header"&&arg[2][17]){ofc=arg[2][17];ofb=arg[2][18];onc=arg[2][17];onb=arg[2][18];mp="default"};smO="ShM=1;";smC="";
  362.     if(menu[16]==1){smO="";if(!arg[1].indexOf("show-menu"))hlnk="javascript:ShM=1;"+pI}    
  363.     if(hlp[14]){tlen=hlnk.length;thlnk=location.href;thlnk=thlnk.substring(thlnk.length-tlen,thlnk.length);if(hlnk!="#"&&hlnk==thlnk){ofc=arg[2][14];ofb=arg[2][15]}}    
  364.     if(ltype=="form"||hlnk=="#"||ltype=="header"){mp="default";
  365.     if(ns4){hlnk="<a "+cls;}else{hlnk=" "}}else{if(ns4){hlnk="<a href=\""+hlnk+"\" "+ltarg+cls}else{hlnk="<a id=lnk"+el+" href=\""+hlnk+"\" "+ltarg+" style='text-decoration:none;'"+cls+">"}}
  366.     if(!ns4){if(bimg)ofb="url("+bimg+") "+ofb;if(sbimg){if(sbimg!="NONE"){onb="url("+sbimg+") "+onb;}}else{if(bimg)onb="url("+bimg+") "+onb;}}
  367.     pd="popdn(this," + el + ", '" + arg[5] + "', '"+arg[1]+"', '"+ofb+"', '"+ofc+"', '"+fborc+"');"
  368.     if(arg[0].toLowerCase().indexOf("<img")>=0){if(menu[11]&&ns6)ns6hif=1;ipos=arg[0].toLowerCase().indexOf("<img");if(simg){SwapIM[el]=new Image();SwapIM[el].src=simg;}else{SwapIM[el]=0}iefix="";
  369.     if(navigator.appVersion.indexOf("MSIE 6")){iefix=" onclick=\"gmobj('el"+el+"').click()\"";}
  370.     arg[0]=arg[0].substr(0,ipos+4)+iefix+" id=im"+el+" "+ arg[0].substr(ipos+5,900)}if(!isNaN(arg[2][5]))arg[2][5]+="px"
  371.     dragfunc="";
  372.     if(dragable){dragfunc="drag_drop('"+arg[5]+"');";}
  373.     if(ns4){
  374.         if(bimg)bimg=" background="+bimg;if(sbimg){if(sbimg!="NONE")sbimg=" background="+sbimg;else sbimg=""}else{sbimg=bimg}
  375.         tdwd=" width="+(menu[3]-(arg[2][9]*2))
  376.         ns4nwrap="";if(menu[11])ns4nwrap="nowrap";
  377.         ls="<table border=0 cellpadding="+arg[2][9]+" cellspacing=0><tr><td "+ns4nwrap+" height=-1 align="+lalign+tdwd+">"+hlnk+" style='color:"
  378.         le=";text-decoration:none;font-size:"+arg[2][5]+";font-weight:"+arg[2][7]+";font-family:"+arg[2][8]+"' onmouseover=\"status='"+arg[7]+"';\">"+arg[0]+"</a>"+subimg+"</td></tr></table></layer>"
  379.         if(menu[11])nswid=menu[3]; else nswid=(menu[3]-(menu[4]*2))
  380.         lv=" left="+aleft+" width="+nswid+" top="+atop
  381.         nsofb="";if(ofb)nsofb=" BGColor="+ofb
  382.         nsonb="";if(onb)nsonb=" BGColor="+onb
  383.         tshl="shl('"+arg[5]+"',"+el+",'show');"
  384.         if(ltype=="form")tshl=""
  385.         mt="<layer id=mel"+el+lv+" "+nsofb+bimg+" onmouseover=\""+smO+tshl+pI+" "+dragfunc+lOnfunc+";return stch('"+arg[7]+"');\">"+ls+ofc+le
  386.         mt+="<layer id=el"+el+lv+" "+nsonb+sbimg+" onmouseover=\"clearTimeout(Mtimer);"+pI+"ltarg='"+ltarg+"'; nshl='"+arg[1]+"'; this.captureEvents(Event.CLICK); this.onClick=dc;\" onmouseout=\""+pd+"; "+lOffunc+"; return stch('');\" visibility=hidden >"+ls+onc+le
  387.     }else{
  388.         mt="";
  389.         if(menu[11]){bgc=hlp[4];if(hlp[11])bgc=hlp[12];
  390.         mt+="<div class=\"main_menu\" id=hel"+el+" style=\"text-align:left;background:'"+ofb+"';width:"+(menu[3]-menu[4])+"px;position:absolute;top:0;left:"+dlft+";\">";dlft=dlft+menu[3]-(menu[4]*2)+menu[4]}
  391.         rsp=0;if (lalign=="right") rsp=7;
  392.         mt+=hlnk
  393.         dw=(menu[3]-(2*menu[4]+dwd))
  394.         if(dw+" "=="NaN "){dw=""}else{dw="width:"+dw+"px"}
  395.         if(opra&&menu[3])dw="width:"+(menu[3]-(arg[2][9]*2)-(menu[4]*2))+"px;"
  396.         if(!menu[3]&&ie4)dw="width:1px";
  397.         if(menu[11]&&opra){dw="position:absolute;"}
  398.         if(!menu[11]&&IEDtD){dw="width:"+(menu[3]-menu[4]-(arg[2][9]*2))+"px;"}
  399.         if(isNaN(arg[2][9])){padd=arg[2][9]}else{psp=arg[2][9]+"px ";padd=psp+psp+psp+psp}
  400.         if(menu[11]&&menu[3]>0)dw="position:absolute;width:"+menu[3]+"px"
  401.         hms="";if(menu[11])hms="<div class=\"main_menu\" style=\";top:0;position:absolute;\"><div class=\"main_menu\" onmouseover=\"clearTimeout(Mtimer)\" id=hsep"+el+" style=\"position:absolute;background:"+sbgc+";width:"+menu[b]+"px; clip:rect(0 "+menu[b]+"px 100% 0);\">\n</div>\n</div>";
  402.         mt+="<div class=\"main_menu\" id=el"+el+" style=\"margin:"+marw+"px;"+tfborc+"text-align:"+lalign+";"+dw+";padding:"+padd+";font-weight:"+arg[2][7]+";font-style:"+arg[2][6]+";font-family:"+arg[2][8]+";font-size:"+arg[2][5]+";color:"+ofc+";background:"+ofb+";\""
  403.         mt+=" onMouseOver=\""+nborc+";this.style.background='"+onb+"';style.color='"+onc+"';this.style.cursor='"+mp+"';"+smO+"; "+pI+";"+dragfunc+lOnfunc+";return stch('"+arg[7]+"');\""
  404.         if(mac&&_d.all)mt+=" onClick=\"lnk"+el+".click()\"";
  405.         mt+=" onMouseOut=\"rep_img(); "+pd+";"+lOffunc+"; return stch('');\">"
  406.         mt+=(arg[0])+"</div>";
  407.         mt+="</a>";
  408.         if (menu[11])mt+=hms+"</div>";
  409.         mt+=subimg
  410.     }
  411.     mp=omp
  412.     _d.write(mt);el++;
  413. }
  414.  
  415.  
  416. function dmenu(mnu){
  417.  
  418.     menu=eval(mnu);
  419.     menu[21]=new Array();if(menu[7]){parr[parr.length]=mnu.substr(4,3);}
  420.     if(ac==menu.length){menu[23]=""}
  421.     atop=menu[4];if(!atop)atop=0;hlp=menu[6];if(!menu[4])menu[4]=0;if(ns4)eq="="; else eq=":";
  422.     for(z=0;z<21;z++){if(z==5)z=12;if(z==16)z++;if(hlp[z]&&hlp[z].charAt(0)!="#")hlp[z]=cHexColor(hlp[z]);}
  423.     if(menu[14]){m14=";"+menu[14];m14ar=m14.split(";");if(m14ar[2]){m14h=m14ar[1];m14w=m14ar[2].substr(6,99)+"px";menu[14]=m14h}else{m14h=m14ar[1];m14w="100%"}
  424.     if(_d.layers)_d.write("<layer z-index=1 id=menuback"+mnu+" top="+(menu[1]-m14h)+" height=2 width="+m14w+" left=0 bgcolor="+hlp[1]+"></layer>");else    _d.write("<div class=\"main_menu\" id=menuback"+mnu+" style=\"position:absolute;top:"+(menu[1]-m14h)+"px;width:"+m14w+";height:2px;background:"+hlp[1]+"\"> </div>")}
  425.     if(el)ns6c=3;else ns6c=2;ns6w=0;if(menu[8]=="right"&&ns6)ns6w=7;
  426.     if (menu[3]<1)menu[3]="undefined"
  427.     if(ns4)
  428.     {
  429.         bgc="";thw=menu[3];
  430.         if(menu[11]){ic=(menu.length-ac)/5;thw=(menu[3]*ic)-(menu[4]*ic)+menu[4]}
  431.         if(hlp[4])bgc="bgColor="+hlp[4]
  432.         if (hlp[11])bgc="bgColor="+hlp[13]
  433.         m18="";if(menu[18])m18="background="+menu[18];
  434.         mt="<layer "+m18+" z-index=29 visibility=hidden "+bgc+" id="+mnu+" top="+menu[1]+" left="+menu[2]+" width="+thw+">"
  435.         if (hlp[11])mt+="<layer bgcolor="+hlp[12]+" top=0 left=0 height=2 width=100%></layer>"
  436.         mt+="<layer id="+mnu+"3d bgcolor="+hlp[12]+" top=0 left=0 height=0 width=2></layer>"
  437.     }
  438.     else
  439.     {
  440.         m18="";if(menu[18]){m18="url("+menu[18]+ ") ";}iedf="";if(!opra&&!mac&&_d.all&&menu[9]){iedf=" filter:";flt=menu[9].split("\;");for(fx=0;fx<flt.length;fx++){iedf+="progid:DXImageTransform.Microsoft."+flt[fx];if(navigator.appVersion.indexOf("MSIE 5.5")>0)fx=999}}
  441.         if(!hlp[4]&&(mac||opra))hlp[4]="transparent"
  442.         if(hlp[11])brd = "border:solid "+menu[4]+"px; border-left-color:"+hlp[12]+";border-top-color:"+hlp[12]+";border-bottom-color:"+hlp[13]+";border-right-color:"+hlp[13]+";";else brd = " border:solid "+menu[4]+"px "+hlp[4]+";";
  443.         mt="";scrof="";if(!ns6)scrof="overflow:hidden;";dmleft=0;if(menu[2])dmleft=menu[2];        
  444.         if(ie55){ifBlnk="";if(location.protocol=="https:")ifBlnk="/blank.htm";mt="<IFRAME frameborder=0 id=if"+mnu+" src=\""+ifBlnk+"\" scroll=none style=\"FILTER:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);visibility:hidden;height:20;position:absolute;width:"+(menu[3]+ns6w)+"px;left:"+dmleft+"px;top:"+menu[1]+"px;z-index:5\"></iframe>"}
  445.         mt+="<div class=\"main_menu\" tabindex=1 id="+mnu+" style=\""+iedf+scrof+";z-index:19;visibility:hidden;"+brd+"position:absolute;background:"+m18+hlp[1]+";width:"+(menu[3]+ns6w)+"px;left:"+dmleft+"px;top:"+menu[1]+"px;\">"
  446.         if(menu[19]){mt+="<div class=\"main_menu\" id=S"+mnu+" style=\"position:absolute;overflow:hidden;\">"}
  447.     }
  448.  
  449.     _d.write(mt)
  450.     x=0;
  451.     dlft=0
  452.     aleft=0;
  453.     if(menu[3]&&menu[11]&&(ns6||opra))menu[3]=menu[3]-(hlp[9]*2)
  454.     for(b=ac;b<menu.length;b++)
  455.     {
  456.         b=b+4
  457.         if(menu[b-3]==""){menu[b-3]="#"}
  458.         menu[b-3]=menu[b-3].replace(/\"/gi, """)
  459.         if(menu[b-2])menu[b-2]=menu[b-2].replace(/\"/gi, """)
  460.         hl(menu[b-4], menu[b-3],hlp,100,100,mnu,menu[b-2],menu[b-1],menu[b-5])
  461.         txt="";
  462.         if(ns4)
  463.         {
  464.             mt=_d.layers[mnu].document.layers["el"+(el-1)]
  465.             if (!menu[11])
  466.             {
  467.                 if (menu[b]&&b<menu.length-1)
  468.                 {
  469.  
  470.                     x=atop+mt.clip.height
  471.                     if(sbgc)bgc="bgcolor="+sbgc;
  472.                     if(!hlp[11])x++
  473.                     txt="<layer top="+(x-2)+" left="+menu[4]+" height="+menu[b]+" "+bgc+" width="+mt.clip.width+" onmouseover=\"clearTimeout(Mtimer)\" ></layer>"
  474.                     if(hlp[11]){txt+="<layer top="+(x-1)+" left="+menu[4]+" height=1 bgcolor="+hlp[12]+" width="+mt.clip.width+"></layer>"
  475.                     }
  476.                 }
  477.             }
  478.             else
  479.             {
  480.                 if(sbgc)txt="<layer bgcolor="+sbgc+" left="+(aleft+mt.clip.width)+" width="+menu[b]+" top="+x+" height="+(mt.clip.height+(menu[4]))+"></layer>"
  481.             }
  482.         }
  483.         else
  484.         {
  485.             mbw=menu[b];
  486.             if(hlp[19])bc=hlp[19]; else    bc=hlp[4]
  487.             if(b+1==menu.length)mbw=0;
  488.             if(mbw>0)
  489.             {
  490.                 if(!sbgc)sbgc=bc;
  491.                 if (!menu[11])
  492.                 {
  493.                     dwid=(menu[3]-menu[4]*2)
  494.                     if(IEDtD)dwid=menu[3]-menu[4]
  495.                     if (hlp[11]&&mbw==1)
  496.                     {
  497.                         oc="";if(opra)oc="_d.getElementById('el"+el+"').style.background='"+hlp[1]+"';_d.getElementById('el"+el+"').style.color='"+hlp[0]+"'";
  498.                         txt="<div class=\"main_menu\" onmouseout=\""+oc+"\" onmouseover=\"clearTimeout(Mtimer)\" style=\"position:relative\">"
  499.                         txt+="<div class=\"main_menu\" style=\"border-top:1px solid "+hlp[13]+"; background:"+hlp[12]+"; width:"+dwid+"px;position:absolute;clip:rect(0 100% 2px 0);height:1px;\">"
  500.                         txt+="</div>\n</div>"
  501.                     }
  502.                     else
  503.                     {
  504.                         txt="<div class=\"main_menu\" style='text-align:left;'>";
  505.                         txt+="<div class=\"main_menu\" onmouseout=\"popdn();\" onmouseover=\"clearTimeout(Mtimer)\" style=\"left:0;background:"+sbgc+";width:"+dwid+"px;position:absolute;"
  506.                         txt+="clip:rect(0 100% "+mbw+"px 0);height:"+mbw+"px;\">"
  507.                         txt+="</div>"
  508.                         txt+="</div>"
  509.                     }
  510.                 }
  511.             }
  512.         }
  513.         _d.write(txt);
  514.         omnu=mnu;
  515.         mt=""
  516.     }
  517.     oatop=-1;
  518.     if (ns4){mt="</layer>"}else{
  519.     mt+="</div>\n";
  520.     if(menu[19])mt+="</div>"}
  521.     _d.write(mt)
  522.     if(ns4){ml=gmobj(mnu);ml.clip.height += menu[4];ml3d=_d.layers[mnu].document.layers[mnu+"3d"];
  523.     if(hlp[11])ml3d.clip.height=ml.clip.height};
  524.     menu[21][1]=el
  525. }
  526. function checs(e){stopchec=1;for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[10]>0){stopchec=0;if(df!=0||osy!=sy){mi=gmobj("menu"+a);tm=gpos(mi);mit=tm[0];if(isNaN(menu[1]))menu[1]=0;df=parseInt(menu[1])-mit;if(sy+menu[10]>=menu[1])df=sy-mit+menu[10];nt=df/followspeed;of1=nt.toString();ofr=of1.split("\.");if(ofr[1]+" "=="undefined ")ofr[1]=0;ofrac=ofrac+parseInt(ofr[1]);if(mac&&parseInt(nt)==0)return;if(ofrac>10){ofrac=ofrac-10;if(df>=0)nt++; else    nt--;}
  527. spos(mi,mit+nt);
  528. if(menu[14])nt=nt-menu[14]
  529. if(ie55){spos(gmobj("ifmenu"+a),mit+nt)}
  530. if(menu[14])spos(gmobj("menubackmenu"+a),mit+nt-menu[14])
  531. }else{return;}osy=sy}}if(stopchec){osy=sy;return}pu=setTimeout('checs()',followrate)}
  532. function PlaceMenu(mn){if(ns4||ns6)pos="relative";else pos="absolute";mnt="<div class=\"main_menu\" id=\""+mn+"DIV\" style=\"width:1;height:1;position:"+pos+"\"></div>";menu=eval("menu"+getMenuByName(mn));menu[21][0]=mn+"DIV";_d.write(mnt)}
  533. function setpos(){for(a=1;a<menus;a++){menu=eval("menu"+a);if(menu[21][0]){gm=gmobj(menu[21][0]);if(ns4){ntp=gm.pageY;nlp=gm.pageX}else{gp=gpos(gm);ntp=gp[0];nlp=gp[1]}mn=gmobj("menu"+a);mnp=gpos(mn);if(ntp==0)ntp=null;if(nlp==0)nlp=null;spos(mn,ntp,nlp,null,null);if(ie55){gmif=gmobj("ifmenu"+a);spos(gmif,ntp,nlp,null,null)}}else{if(!menu[5])menu[5]="";if (menu[5].indexOf("left")!=-1||menu[5].indexOf("center")!=-1||menu[5].indexOf("right")!=-1){mn=gmobj("menu"+a);mnp=gpos(mn);mnw=mnp[3];nlp=((ww-mnw)/2);if(menu[5].indexOf("right")!=-1)nlp=ww-mnw;if(menu[5].indexOf("left")!=-1)nlp=1;ts=menu[2]+"";if(ts.indexOf("offset=")==0){os=parseLink(ts,"offset");nlp=nlp+parseInt(os);min=parseLink(ts,"minimum");if(min&&(nlp<min))nlp=min;}spos(mn,null,nlp,null,null)}if(menu[5].indexOf("top")!=-1||menu[5].indexOf("bottom")!=-1||menu[5].indexOf("middle")!=-1){mn=gmobj("menu"+a);mnp=gpos(mn);mnh=mnp[2];if(opra)mnh=mn.style.pixelHeight;nlp=wh-mnh;if(menu[5].indexOf("middle")!=-1)nlp=((wh-mnh)/2);if(menu[5].indexOf("top")!=-1)nlp=1;ts=menu[1]+"";if(ts.indexOf("offset=")==0){os=parseLink(ts,"offset");mnp=gpos(mn);nlp=nlp+parseInt(os);min=parseLink(ts,"minimum");if(min&&(nlp<min))nlp=min;}if(menu[10]>0){menu[1]=nlp;if(nlp>0)menu[10]=nlp;nlp=nlp+sy;if(menu[10]==nlp&&MLoaded<2)spos(mn,nlp,null,null,null)}else{spos(mn,nlp,null,null,null)}}}}}
  534. function MScan(){sy=self.pageYOffset;sx=self.pageXOffset;if(opra){ww=window.innerWidth;wh=window.innerHeight}else if(_d.all){sy=_d.body.scrollTop;sx=_d.body.scrollLeft;if(!ie4&&!mac){if(sy==0)sy=_d.documentElement.scrollTop;if(sx==0)sx=_d.documentElement.scrollLeft;}if(_d.compatMode=="CSS1Compat"){ww=document.documentElement.clientWidth;wh=document.documentElement.clientHeight}else{ww=_d.body.clientWidth;wh=_d.body.clientHeight}}else{if(ns4){ww=self.innerWidth-16;wh=self.innerHeight-17}else{ww=_d.body.offsetWidth;if(!ww)ww=self.innerWidth-15;ww--;wh=self.innerHeight;}}if(opra&&(owh!=wh||oww!=ww)){if(MLoaded>1){location.reload()}MLoaded++;oww=ww;owh=wh;}if(sy!=osy)checs();if(!mac&&!opra&&MLoaded<2)sis();setpos();}
  535. function mOL(){if(!ns61&&ns6||ns6hif){Minit()}MLoaded=1;if(Oload)Oload();if(loadWait||opra){for(x=0;x<parr.length;x++){fixb("menu"+parr[x]);popup(parr[x])}}sis();MScan();if(!opra)MLoaded++;}
  536. function Minit(){el=0;df=-1;if((_d.all&&_d.getElementById)&&!mac)_d.write("<"+"script>function getflta(ap){try{if(ap.filters){flta=1}}catch(e){}}<"+"/script>");for(x=0;x<parr.length;x++){if(!opra){fixb("menu"+parr[x]);popup(parr[x])}}if(ns4){_d.captureEvents(Event.MOUSEMOVE);oww=self.innerWidth-16;owh=self.innerHeight-17;window.onresize=function(){if(ww!=oww||wh!=owh)window.history.go(0)}}_d.onmousemove=getMouseXY;MScan();}for(a=1;a<menus;a++){dmenu("menu"+a)}if(mac45)Oload=window.onLoad;else Oload=window.onload;if(!ns61&&ns6||ns6hif){window.onload=mOL}else{Minit();sis();window.onload=mOL}
  537. setInterval("MScan()",150);
  538.  
  539. //function cam(){closeallmenus();if(ParentMenu)ParentMenu.ShM=0}
  540. //if(ns4)_d.captureEvents(Event.MOUSEMOVE)
  541. //_d.onmouseup=cam;
  542.  
  543.  
  544.