home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / share / 16 / setup.exe / %AppDir% / code.dat < prev    next >
Encoding:
Text File  |  2001-04-24  |  17.5 KB  |  615 lines

  1. //COPYRIGHT
  2.  
  3.     var nStyle = new Array;
  4.     var hStyle = new Array;
  5.     var nLayer = new Array;
  6.     var hLayer = new Array;
  7.     var nTCode = new Array;
  8.  
  9.     var AnimStep = 0;
  10.     var AnimHnd = 0;
  11.     var HTHnd = new Array;
  12.     var DoFormsTweak = true;
  13.  
  14.     var mFrame;
  15.     var cFrame;
  16.  
  17.     var OpenMenus = new Array;
  18.     var SelCommand;
  19.     var nOM = 0;
  20.  
  21.     var mX;
  22.     var mY;
  23.     var xOff = 0;
  24.  
  25.     var HideSpeed = 300;
  26.  
  27. //BROWSERDETECTION
  28.  
  29.     if((!IsWin&&IE)||SM) {
  30.         frames.self = window;
  31.         frames.top = top;
  32.     }
  33.  
  34.     if(IE)
  35.         xOff = (SM&&!OP)?-9:2;
  36. //CODEFRAME
  37.  
  38. //FX
  39.  
  40. //STYLECODE
  41.  
  42.     function GetCurCmd(e) {
  43.         //IE
  44.         //This function will return the current command under the mouse pointer.
  45.         //It will return null if the mouse is not over any command.
  46.         //------------------------------
  47.         //Version 1.5
  48.         //
  49.         if(SM)
  50.             var cc = e;
  51.         else
  52.             var cc = mFrame.window.event.srcElement;
  53.         while(cc.id=="") {
  54.             cc = cc.parentElement;
  55.             if(cc==null)
  56.                 break;
  57.         }
  58.         return cc;
  59.     }
  60.  
  61.     function HoverSel(mode, imgLName, imgRName, e) {
  62.         //IE
  63.         //This is the function called every time the mouse pointer is moved over a command.
  64.         //------------------------------
  65.         //mode: 0 if the mouse is moving over the command and 1 if is moving away.
  66.         //imgLName: Name of the left image object, if any.
  67.         //imgRName: Name of the right image object, if any.
  68.         //------------------------------
  69.         //Version 10.0
  70.         //
  71.         var imgL = new Image;
  72.         var imgLRsc = new Image;
  73.         var imgR = new Image;
  74.         var imgRRsc = new Image;
  75.         var nStyle;
  76.         var mc;
  77.         
  78.         if(mode==0 && OpenMenus[nOM].SelCommand!=null)
  79.             HoverSel(1);
  80.         
  81.         if(imgLName!="_")
  82.             var imgL = eval("mFrame.document.images['"+imgLName+"']");
  83.         if(imgRName!="_")
  84.             var imgR = eval("mFrame.document.images['"+imgRName+"']");
  85.         
  86.         if(mode==0) {
  87.             mc = GetCurCmd(e);
  88.             if(nOM>1)
  89.                 if(mc==OpenMenus[nOM-1].SelCommand)
  90.                     return false;
  91.             if(OpenMenus[nOM].SelCommand || nOM>1)
  92.                 while(!InMenu()&&nOM>1)
  93.                     Hide();
  94.             if(imgLName!='_') imgLRsc = eval(imgLName+"On");
  95.             if(imgRName!='_') imgRRsc = eval(imgRName+"On");
  96.             OpenMenus[nOM].SelCommand = mc;
  97.             OpenMenus[nOM].SelCommandPar = [imgLName,imgRName,SM?mc.getAttribute("style"):mc.style.cssText];
  98.             if(SM)
  99.                 mc.setAttribute("style", GetCStyle(mc.style) + hStyle[mc.id]);
  100.             else
  101.                 mc.style.cssText = GetCStyle(mc.style) + hStyle[mc.id];
  102.         } else {
  103.             mc = (mode==1)?OpenMenus[nOM].SelCommand:OpenMenus[nOM].Opener;
  104.             imgLName = (mode==1)?OpenMenus[nOM].SelCommandPar[0]:OpenMenus[nOM].OpenerPar[0];
  105.             imgRName = (mode==1)?OpenMenus[nOM].SelCommandPar[1]:OpenMenus[nOM].OpenerPar[1];
  106.             nStyle = (mode==1)?OpenMenus[nOM].SelCommandPar[2]:OpenMenus[nOM].OpenerPar[2];
  107.             mc.style.background = "";
  108.             if(SM)
  109.                 mc.setAttribute("style", nStyle);
  110.             else
  111.                 mc.style.cssText = nStyle;
  112.             if(imgLName!='_') imgLRsc = eval(imgLName+"Off");
  113.             if(imgRName!='_') imgRRsc = eval(imgRName+"Off");
  114.             window.status = "";
  115.             OpenMenus[nOM].SelCommand = null;            
  116.         }
  117.         
  118.         if(imgLName!='_') {
  119.             imgL = eval("mFrame.document.images."+imgLName);
  120.             imgL.src = imgLRsc.src;
  121.         }
  122.         if(imgRName!='_') {
  123.             imgR = eval("mFrame.document.images."+imgRName);
  124.             imgR.src = imgRRsc.src;
  125.         }
  126.         
  127.         return true;
  128.     }
  129.  
  130.     function NSHoverSel(mode, mc, bcolor) {
  131.         //NS
  132.         //This is the function called every time the mouse pointer is moved over or away from a command.
  133.         //------------------------------
  134.         //mode: 0 if the mouse is moving over the command and 1 if is moving away.
  135.         //mc: Name of the layer that corresponds to the selected command.
  136.         //n: Unique ID that identifies this command. Used to retrieve the data from the nLayer or hLayer array.
  137.         //bcolor: Background color of the command. Ignored if the group uses a background image.
  138.         //w: Width of the command's layer.
  139.         //h: Height of the command's layer.
  140.         //------------------------------
  141.         //Version 11.0
  142.         //
  143.         var n;
  144.         var LayerHTM;
  145.         
  146.         window.clearTimeout(CBparseInt(HTHnd[nOM]));HTHnd[nOM] = 0;
  147.         if(!nOM) return false;
  148.         
  149.         if(mode==0 && OpenMenus[nOM].SelCommand!=null)
  150.             NSHoverSel(1);
  151.         
  152.         if(mode==0) {
  153.             mc = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH"))];
  154.             n = CBparseInt(mc.name.substr(2));
  155.             if(nOM>1)
  156.                 if(mc==OpenMenus[nOM-1].SelCommand)
  157.                     return false;
  158.             while(!InMenu()&&nOM>1)
  159.                 Hide();
  160.             LayerHTM = hLayer[n];
  161.             OpenMenus[nOM].SelCommand = mc;
  162.             OpenMenus[nOM].SelCommandPar = mc.bgColor;
  163.             mc.bgColor = bcolor;
  164.         } else {
  165.             mc = (mode==1)?OpenMenus[nOM].SelCommand:OpenMenus[nOM].Opener;
  166.             bcolor = (mode==1)?OpenMenus[nOM].SelCommandPar:OpenMenus[nOM].OpenerPar;
  167.             n = CBparseInt(mc.name.substr(2));
  168.             LayerHTM = nLayer[n];
  169.             if(mc.parentLayer.background.src!="")
  170.                 mc.bgColor = null;
  171.             else
  172.                 mc.bgColor = bcolor;
  173.             window.status = "";
  174.             OpenMenus[nOM].SelCommand = null;
  175.         }
  176.         mc.clip.width = mc.parentLayer.parentLayer.clip.width - 2*mc.parentLayer.left;
  177.         mc.document.open();
  178.         mc.document.write(LayerHTM);
  179.         mc.document.close();
  180.  
  181.         return true;
  182.     }
  183.  
  184.     function Hide() {
  185.         //IE,NS
  186.         //This function hides the last opened group and it keeps hiding all the groups until
  187.         //no more groups are opened or the mouse is over one of them.
  188.         //Also takes care of reseting any highlighted commands.
  189.         //------------------------------
  190.         //Version 3.5
  191.         //
  192.         window.clearTimeout(HTHnd[nOM]);HTHnd[nOM] = 0;
  193.         window.clearTimeout(AnimHnd);AnimHnd = 0;
  194.  
  195.         if(OpenMenus[nOM].SelCommand!=null) {
  196.             if(IE) HoverSel(1);
  197.             if(NS) NSHoverSel(1);
  198.         }
  199.         if(OpenMenus[nOM].Opener!=null) {
  200.             if(IE) HoverSel(3);
  201.             if(NS) NSHoverSel(3);
  202.         }
  203.  
  204.         OpenMenus[nOM].visibility = "hidden";
  205.         nOM--;
  206.  
  207.         if(nOM>0)
  208.             if(!InMenu())
  209.                 HTHnd[nOM] = window.setTimeout("Hide()", HideSpeed/4);
  210.  
  211.         if(nOM==0)
  212.             FormsTweak("visible");
  213.     }
  214.  
  215.     function ShowMenu(mName, x, y, isCascading) {
  216.         //IE,NS
  217.         //This is the main function to show the menus when a hotspot is triggered or a cascading command is activated.
  218.         //------------------------------
  219.         //mName: Name of the <div> or <layer> to be shown.
  220.         //x: Left position of the menu.
  221.         //y: Top position of the menu.
  222.         //isCascading: True if the menu has been triggered from a command, and not from a hotspot.
  223.         //------------------------------
  224.         //Version 14.5
  225.         //
  226.         window.clearTimeout(CBparseInt(HTHnd[nOM]));HTHnd[nOM] = 0;
  227.         x = CBparseInt(x);y = CBparseInt(y);
  228.         
  229.         if(AnimHnd && nOM>0) {
  230.             AnimStep=101;
  231.             Animate();
  232.         }
  233.         if(IE)
  234.             if(SM)
  235.                 var Menu = mFrame.document.getElementById(mName);
  236.             else
  237.                 var Menu = mFrame.document.all[mName];
  238.         if(NS)
  239.             var Menu = mFrame.document.layers[mName];
  240.         if(!Menu)
  241.             return false;
  242.         if(IE)
  243.             Menu = Menu.style;
  244.         if(Menu==OpenMenus[nOM])
  245.             return false;
  246.             
  247.         if(!isCascading)
  248.             HideAll();
  249.             
  250.         Menu.Opener = nOM>0?OpenMenus[nOM].SelCommand:null;
  251.         Menu.OpenerPar = nOM>0?OpenMenus[nOM].SelCommandPar:null;
  252.         Menu.SelCommand = null;
  253.         if(OP) {
  254.             Menu.width = Menu.pixelWidth;
  255.             Menu.height = Menu.pixelHeight;
  256.         }
  257.  
  258.         var pW = GetWidthHeight()[0] + GetLeftTop()[0];
  259.         var pH = GetWidthHeight()[1] + GetLeftTop()[1];
  260.         
  261.         if(IE) {
  262.             if(isCascading) {
  263.                 x = CBparseInt(OpenMenus[nOM].left) + CBparseInt(OpenMenus[nOM].width) - 6;
  264.                 y = CBparseInt(OpenMenus[nOM].SelCommand.style.top) + CBparseInt(OpenMenus[nOM].top) - y;
  265.                 Menu.left = (x+CBparseInt(Menu.width)>pW)?CBparseInt(OpenMenus[nOM].left) - CBparseInt(Menu.width) + 6:x;
  266.                 Menu.top =  (y+CBparseInt(Menu.height)>pH)?pH - CBparseInt(Menu.height):y;
  267.             } else {
  268.                 Menu.left = (x+CBparseInt(Menu.width)>pW)?pW - CBparseInt(Menu.width):x;
  269.                 Menu.top =  (y+CBparseInt(Menu.height)>pH)?pH - CBparseInt(Menu.height):y;
  270.             }
  271.             if(IsWin&&!SM)
  272.                 Menu.clip = "rect(0 0 0 0)";
  273.         }
  274.         if(NS) {
  275.             if(isCascading) {
  276.                 x = OpenMenus[nOM].left + OpenMenus[nOM].clip.width - 6;
  277.                 y = OpenMenus[nOM].top + OpenMenus[nOM].SelCommand.top;
  278.                 x = (x+Menu.w>pW)?OpenMenus[nOM].left - Menu.w + 6:x;
  279.                 y = (y+Menu.h>pH)?pH - Menu.h:y;
  280.             } else {
  281.                 x = (x+Menu.w>pW)?pW - Menu.w:x;
  282.                 y = (y+Menu.h>pH)?pH - Menu.h:y;
  283.             }
  284.             Menu.clip.width = 0;
  285.             Menu.clip.height = 0;
  286.             Menu.moveToAbsolute(x,y);
  287.         }
  288.         if(isCascading)
  289.             Menu.zIndex = CBparseInt(OpenMenus[nOM].zIndex) + 1;
  290.         Menu.visibility = "visible";
  291.         OpenMenus[++nOM] = Menu;
  292.         HTHnd[nOM] = 0;
  293.         if((IE&&IsWin&&!SM)||NS)
  294.             AnimHnd = window.setTimeout("Animate()", 10);
  295.         FormsTweak("hidden");
  296.  
  297.         return true;
  298.     }
  299.  
  300.     function Animate() {
  301.         //IE,NS
  302.         //This function is called by ShowMenu every time a new group must be displayed and produces the predefined unfolding effect.
  303.         //Currently is disabled for Navigator, because of some weird bugs we found with the clip property of the layers.
  304.         //------------------------------
  305.         //Version 1.9
  306.         //
  307.         var r = '';
  308.         var nw = nh = 0;
  309.         switch(fx) {
  310.             case 1:
  311.                 if(IE) r = "0 " + AnimStep + "% " + AnimStep + "% 0";
  312.                 if(NS) nw = AnimStep; nh = AnimStep;
  313.                 break;
  314.             case 2:
  315.                 if(IE) r = "0 100% " + AnimStep + "% 0";
  316.                 if(NS) nw = 100; nh = AnimStep;
  317.                 break;
  318.             case 3:
  319.                 if(IE) r = "0 " + AnimStep + "% 100% 0";
  320.                 if(NS) nw = AnimStep; nh = 100;
  321.                 break;
  322.             case 0:
  323.                 if(IE) r = "0 100% 100% 0";
  324.                 if(NS) nw = 100; nh = 100;
  325.                 break;
  326.         }
  327.         if(OpenMenus[nOM]) {
  328.             with(OpenMenus[nOM]) {
  329.                 if(IE)
  330.                     clip =  "rect(" + r + ")";
  331.                 if(NS) {
  332.                     clip.width = w*(nw/100);
  333.                     clip.height = h*(nh/100);
  334.                 }
  335.             }
  336.             AnimStep += 20;
  337.             if(AnimStep<=100)
  338.                 AnimHnd = window.setTimeout("Animate()",25);
  339.             else {
  340.                 window.clearTimeout(AnimHnd);
  341.                 AnimStep = 0;
  342.                 AnimHnd = 0;
  343.             }
  344.         }
  345.     }
  346.     
  347.     function InMenu() {
  348.         //IE,NS
  349.         //This function returns true if the mouse pointer is over the last opened menu.
  350.         //------------------------------
  351.         //Version 1.6
  352.         //
  353.         var m = OpenMenus[nOM];
  354.         if(!m)
  355.             return false;
  356.         if(IE&&!SM)
  357.             SetPointerPos();            
  358.         var l = CBparseInt(m.left) + xOff;
  359.         var r = l+(IE?CBparseInt(m.width):m.clip.width) - xOff;
  360.         var t = CBparseInt(m.top) + xOff;
  361.         var b = t+(IE?CBparseInt(m.height):m.clip.height) - xOff;
  362.         return ((mX>=l && mX<=r) && (mY>=t && mY<=b));
  363.     }
  364.  
  365.     function SetPointerPos(e) {
  366.         //IE,NS
  367.         //This function sets the mX and mY variables with the current position of the mouse pointer.
  368.         //------------------------------
  369.         //e: Only used under Navigator, corresponds to the Event object.
  370.         //------------------------------
  371.         //Version 1.2
  372.         //
  373.         if(IE) {
  374.             if(!SM) {
  375.                 if(mFrame!=cFrame||event==null)
  376.                     if(mFrame.window.event==null)
  377.                         return;
  378.                     else
  379.                         e = mFrame.window.event;
  380.                 else
  381.                     e = event;
  382.             }
  383.             mX = e.clientX + GetLeftTop()[0];
  384.             mY = e.clientY + GetLeftTop()[1];
  385.         }
  386.         if(NS) {
  387.             mX = e.pageX;
  388.             mY = e.pageY;
  389.         }
  390.     }
  391.     
  392.  
  393.     function HideMenus(e) {
  394.         //IE,NS
  395.         //This function checks if the mouse pointer is on a valid position and if the current menu should be kept visible.
  396.         //The function is called every time the mouse pointer is moved over the document area.
  397.         //------------------------------
  398.         //e: Only used under Navigator, corresponds to the Event object.
  399.         //------------------------------
  400.         //Version 25.0
  401.         //
  402.         if(nOM>0) {
  403.             SetPointerPos(e);
  404.             if(OpenMenus[nOM].SelCommand!=null)
  405.                 if(!InMenu()&&!HTHnd[nOM])
  406.                     HTHnd[nOM] = window.setTimeout("if(nOM>0)if(!InMenu())Hide()", HideSpeed);
  407.         }
  408.     }
  409.     
  410.     function FormsTweak(state) {
  411.         //IE
  412.         //This is an undocumented function, which can be used to hide every listbox (or combo) element on a page.
  413.         //This can be useful if the menus will be displayed over an area where is a combo box, which is an element that cannot be placed behind the menus and it will always appear over the menus resulting in a very undesirable effect.
  414.         //------------------------------
  415.         //Version 2.0
  416.         //
  417.         if(DoFormsTweak && IE)
  418.             for(var f = 0; f <= (mFrame.document.forms.length - 1); f++)
  419.                 for(var e = 0; e <= (mFrame.document.forms[f].elements.length - 1); e++)
  420.                     if(mFrame.document.forms[f].elements[e].type=="select-one")
  421.                         mFrame.document.forms[f].elements[e].style.visibility = state;
  422.     }
  423.  
  424.     function execURL(url, tframe) {
  425.         //IE,NS
  426.         //This function is called every time a command is triggered to jump to another page or execute some javascript code.
  427.         //------------------------------
  428.         //url: Encrypted URL that must be opened or executed.
  429.         //tframe: If the url is a document location, tframe is the target frame where this document will be opened.
  430.         //------------------------------
  431.         //Version 1.1
  432.         //
  433.         HideAll();
  434.         window.setTimeout("execURL2('" + url + "', '" + tframe + "')", 100);
  435.     }
  436.  
  437.     function execURL2(url, tframe) {
  438.         //IE,NS
  439.         //This function is called every time a command is triggered to jump to another page or execute some javascript code.
  440.         //------------------------------
  441.         //url: Encrypted URL that must be opened or executed.
  442.         //tframe: If the url is a document location, tframe is the target frame where this document will be opened.
  443.         //------------------------------
  444.         //Version 1.1
  445.         //
  446.         var fObj = eval(rStr(tframe));
  447.         url = rStr(url);
  448.         url.indexOf("javascript")!=url.indexOf("vbscript")?eval(url):fObj.location.href = url;
  449.     }
  450.  
  451.     function rStr(s) {
  452.         //IE,NS
  453.         //This function is used to decrypt the URL parameter from the triggered command.
  454.         //------------------------------
  455.         //Version 1.1
  456.         //
  457.         s = xrep(s,"\x1E","'");
  458.         s = xrep(s,"\x1D","\x22");
  459.         s = xrep(s,"\x1C",",");
  460.         return s;
  461.     }
  462.  
  463.     function xrep(s, f, n) {
  464.         //IE,NS
  465.         //This function looks for any occurrence of the f string and replaces it with the n string.
  466.         //------------------------------
  467.         //Version 1.0
  468.         //
  469.         var tmp = s.split(f);
  470.         return tmp.join(n);
  471.     }
  472.  
  473.     function hNSCClick(e) {
  474.         //NS
  475.         //This function executes the selected command's trigger code.
  476.         //------------------------------
  477.         //Version 1.0
  478.         //
  479.         eval(this.TCode);
  480.     }
  481.     
  482.     function CBparseInt(n) {
  483.     //IE,NS
  484.     //This function fixes a bug in Navigator's parseInt() function for the Mac.
  485.     //------------------------------
  486.     //Version 1.3
  487.     //
  488.         if(typeof(n)=="number"||typeof(n)=="string")
  489.             return (!IsWin&&!SM?n:parseInt(n))*1;
  490.         return 0;
  491.     }
  492.  
  493.     function HideAll() {
  494.         //IE,NS
  495.         //This function will hide all the currently opened menus.
  496.         //------------------------------
  497.         //Version 1.0
  498.         //
  499.         while(nOM>0)
  500.             Hide();
  501.     }
  502.  
  503.     function GetLeftTop() {
  504.         //IE,NS
  505.         //This function returns the scroll bars position on the menus frame.
  506.         //------------------------------
  507.         //Version 2.0
  508.         //
  509.         if(IE)
  510.             return [OP?0:SM?mFrame.scrollX:mFrame.document.body.scrollLeft,OP?0:SM?mFrame.scrollY:mFrame.document.body.scrollTop];
  511.         if(NS)
  512.             return [mFrame.pageXOffset,mFrame.pageYOffset];
  513.     }
  514.     
  515.     function tHideAll() {
  516.         //IE,NS
  517.         //This function is called when the mouse is moved away from a hotspot to close any opened menu.
  518.         //------------------------------
  519.         //Version 1.0
  520.         //
  521.         HTHnd[nOM] = window.setTimeout("if(!InMenu()&&nOM==1)HideAll(); else HTHnd[nOM]=0;", HideSpeed);
  522.     }
  523.  
  524.     function GetWidthHeight() {
  525.         //IE,NS
  526.         //This function returns the width and height of the menus frame.
  527.         //------------------------------
  528.         //Version 2.0
  529.         //
  530.         if(IE&&!SM)
  531.             return [mFrame.document.body.clientWidth,mFrame.document.body.clientHeight];
  532.         if(NS||SM)
  533.             return [mFrame.innerWidth,mFrame.innerHeight];
  534.     }
  535.     
  536.     function GetCStyle(cmc) {
  537.         //IE,SM
  538.         //This functions completes the style of command with all the common
  539.         //parameters from the original style code.
  540.         //------------------------------
  541.         //Version 1.0
  542.         //
  543.         return "position: absolute; left:" + cmc.left + 
  544.                "; top: " + cmc.top + 
  545.                "; width: " + (OP?cmc.pixelWidth:cmc.width) + 
  546.                "; height: " + (OP?cmc.pixelHeight:cmc.height) + "; ";
  547.     }
  548.     
  549.     function SetUpEvents() {
  550.         //IE,NS
  551.         //This function initializes the frame variables and setups the event handling.
  552.         //------------------------------
  553.         //Version 1.9
  554.         //
  555.         onerror = errHandler;
  556.         if(typeof(mFrame)=="undefined")
  557.         //MENUFRAME
  558.         if(typeof(mFrame)=="undefined")
  559.             window.setTimeout("SetUpEvents()",10);
  560.         else {
  561.             if(NS) {
  562.                 mFrame.captureEvents(Event.MOUSEMOVE);
  563.                 mFrame.onmousemove = HideMenus;
  564.                 PrepareEvents();
  565.             }
  566.             if(IE) {
  567.                 document.onmousemove = HideMenus;
  568.                 mFrame.document.onmousemove = document.onmousemove;
  569.             }
  570.         }
  571.     }
  572.     
  573.     function errHandler(sMsg,sUrl,sLine) {
  574.     //IE,NS
  575.     //This function will trap any errors generated by the scripts and filter the unhandled ones.
  576.     //------------------------------
  577.     //Version 1.0
  578.     //
  579.         if(sMsg.substr(0,16)!="Access is denied"&&sMsg!="Permission denied")
  580.             alert("DHTML Menu Builder Java Script Error\n" +
  581.                   "\nDescription: " + sMsg +
  582.                   "\nSource: " + sUrl +
  583.                   "\nLine: "+sLine);
  584.         return true;
  585.     }
  586.  
  587.     function PrepareEvents() {
  588.         //NS
  589.         //This function is called right after the menus are rendered.
  590.         //It has been designed to attach the OnClick event to the <layer> tag. This is being
  591.         //done this way because Navigator does not support a click inline event capturing on
  592.         //the layer tag... duh!
  593.         //------------------------------
  594.         //Version 2.7
  595.         //
  596.         for(var l=0; l<mFrame.document.layers.length; l++) {
  597.             var lo = mFrame.document.layers[l];
  598.             if(lo.layers.length) {
  599.                 lo.w = lo.clip.width;
  600.                 lo.h = lo.clip.height;
  601.                 for(var sl=0; sl<lo.layers[0].layers.length; sl++) {
  602.                     var slo = mFrame.document.layers[l].layers[0].layers[sl];
  603.                     if(slo.name.indexOf("EH")>0) {
  604.                         slo.document.onmouseup = hNSCClick;
  605.                         slo.document.TCode = nTCode[slo.name.split("EH")[1]];
  606.                     }                    
  607.                 }
  608.             }
  609.         }
  610.     }
  611.  
  612. //BROWSERCODE
  613.  
  614. //EXPAND
  615.