home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 June / Chip_06_2000.iso / internet / nd / js / nav3.js < prev   
Text File  |  2000-02-24  |  2KB  |  88 lines

  1.     IE4 = (document.all) ? 1 : 0;
  2.     NS4 = (document.layers) ? 1 : 0;    
  3.     ver4 = (IE4 || NS4) ? 1 : 0;
  4.  
  5.  
  6.     if (ver4) 
  7.     {
  8.             secondImg = "<IMG SRC='images/nav.gif' USEMAP='#on' BORDER='0'>";
  9.             
  10.  
  11.             arPopups = new Array()
  12.         arPopupsUp = new Array()     
  13.     }    
  14.     else 
  15.     { 
  16.         secondImg = "<IMG SRC='images/nav.gif' USEMAP='#on' BORDER='0'>";
  17.         secondImgUp = ""
  18.     }
  19.  
  20.     function setBeginEnd(which, left, top, right, bottom)
  21.     {
  22.         arPopups[which] = new Array();
  23.         arPopups[which][0] = left;
  24.         arPopups[which][1] = top;
  25.         arPopups[which][2] = right;
  26.         arPopups[which][3] = bottom;
  27.     }
  28.  
  29.     function setBeginEndUp(which, left, top, right, bottom)
  30.     {
  31.         arPopupsUp[which] = new Array();
  32.         arPopupsUp[which][0] = left;
  33.         arPopupsUp[which][1] = top;
  34.         arPopupsUp[which][2] = right;
  35.         arPopupsUp[which][3] = bottom;
  36.     }
  37.  
  38.  
  39.     if (ver4)
  40.     {
  41.         setBeginEnd(1,62,16,126,38);
  42.         setBeginEnd(2,42,42,114,63);
  43.         setBeginEnd(3,2,67,106,97);
  44.         setBeginEnd(4,28,102,94,123);
  45.         setBeginEnd(5,30,128,86,146);
  46.         setBeginEnd(6,6,150,76,166);
  47.         setBeginEnd(7,20,173,76,201);
  48.         setBeginEnd(8,0,209,76,223);
  49.         setBeginEnd(9,35,230,75,246);
  50.         
  51.         }
  52.  
  53.  
  54.     function mapOver(which,on) 
  55.     {
  56.         if (!ver4) { return }
  57.         if (IE4) 
  58.         { 
  59.             whichEl = document.all.logoover.style; 
  60.         }
  61.         else 
  62.         { 
  63.             whichEl = document.logoover; 
  64.         
  65.         }
  66.  
  67.         clLeft = arPopups[which][0];        
  68.         clTop = arPopups[which][1];        
  69.         clRight = arPopups[which][2];
  70.         clBot = arPopups[which][3];
  71.     
  72.         if (!on) { whichEl.visibility = "hidden"; return }
  73.         if (NS4) 
  74.         {
  75.             whichEl.clip.left = clLeft;
  76.             whichEl.clip.top = clTop;
  77.             whichEl.clip.right = clRight;
  78.             whichEl.clip.bottom = clBot
  79.         }
  80.         else 
  81.         { 
  82.             whichEl.clip = "rect(" + clTop + " " + clRight + " " + clBot + " " + clLeft + ")";
  83.         }
  84.     
  85.         whichEl.visibility = "visible" 
  86.     }
  87.  
  88.