home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / chplus / tipy / web / fce2.js < prev    next >
Text File  |  2000-10-16  |  995b  |  52 lines

  1. var Xpos = 0;
  2. var Ypos = 0;
  3. function MoveHandler(evnt) {
  4. if(NS4){
  5. Xpos = evnt.pageX;
  6. Ypos = evnt.pageY;
  7. }
  8. else{
  9. Xpos = event.clientX;
  10. Ypos = event.clientY;
  11. }
  12. }
  13. if (NS4){
  14. window.captureEvents(Event.MOUSEMOVE);
  15. window.onMouseMove = MoveHandler;
  16. }
  17. document.onmousemove = MoveHandler;
  18.  
  19.  
  20.  
  21. function moveLayers() {
  22.     if (gotlayers) {
  23.         if (NS4) {
  24.             document.layers['searchpop'].left = Xpos-400;
  25.             document.layers['searchpop'].top = Ypos+5;
  26.         } else {
  27.             document.all['searchpop'].style.pixelLeft = Xpos-400;
  28.             document.all['searchpop'].style.pixelTop = Ypos+5;
  29.             
  30.         }
  31.     }
  32. }
  33.  
  34. function popUp(menuName,on) {
  35.     if (gotlayers) {
  36.         if (on) {
  37.             moveLayers();
  38.             if (NS4) {
  39.                 document.layers[menuName].visibility = "show";
  40.             } else {
  41.                 document.all[menuName].style.visibility = "visible";
  42.             }
  43.         } else {
  44.             if (NS4) {
  45.                 document.layers[menuName].visibility = "hide";
  46.             } else {
  47.                 document.all[menuName].style.visibility = "hidden";
  48.             }
  49.         }
  50.     }
  51. }
  52.