home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 January / chipcd20010102.iso / software / internet / thirdvoice / setup3v.exe / %MAINDIR% / htm / ext / popup.js < prev    next >
Encoding:
Text File  |  2000-11-26  |  2.5 KB  |  139 lines

  1. var objLastPopup = null;
  2. var HIGHLIGHTED_COLOR = "#c71700";
  3. var HIGHLIGHTED_ARROW = "images/arrowovr.gif"
  4. var NORMAL_ARROW      = "images/arrow.gif"
  5.  
  6. function mouseover(obj, bShow)
  7. {
  8.   if (obj != null)
  9.   {
  10.       //obj.style.backgroundColor = HIGHLIGHTED_COLOR;
  11.     obj.style.color = HIGHLIGHTED_COLOR;
  12.     obj.all.arrow.src = HIGHLIGHTED_ARROW;
  13.     if (bShow == true)
  14.     {
  15.       //showsubmenu(obj);
  16.       // test test
  17.       //window.open("3vfocus:", "_self");
  18.     }
  19.     else
  20.     {
  21.       //window.open("3vhidesubmenu:", "_self");
  22.     }
  23.   }
  24. }
  25.  
  26. function mouseovernext(obj)
  27. {
  28.   if (obj != null)
  29.     {
  30.         //showsubmenu(obj.parentElement);
  31.     }
  32. }
  33.  
  34. function mouseovertext(obj)
  35. {
  36.   if (obj != null)
  37.   {
  38.     //obj.style.backgroundColor = HIGHLIGHTED_COLOR;
  39.     obj.style.color = HIGHLIGHTED_COLOR;
  40.     obj.all.arrow.src = HIGHLIGHTED_ARROW;
  41.   }
  42.   //window.open("3vhidesubmenu:", "_self");
  43. }
  44.  
  45. function mouseout(obj)
  46. {
  47.   if (obj)
  48.   {
  49.     //obj.style.backgroundColor = "";
  50.     obj.style.color = "";
  51.     obj.all.arrow.src = NORMAL_ARROW;
  52.   }
  53. }
  54.  
  55. function showsubmenu(obj)
  56. {
  57.   if (obj != null)
  58.   {
  59.     var y = obj.offsetTop;
  60.     var p = obj.parentElement;
  61.     while (p != null)
  62.     {
  63.             y += p.offsetTop;
  64.       p = p.parentElement;
  65.     }
  66.     var idx = obj.getAttribute("idx");
  67.     window.open("3vsubmenu:idx=" + idx + ",y=" + y, "_self"); 
  68.   }
  69. }
  70.  
  71. function GotoLink(obj)
  72. {
  73.   if (obj != null)
  74.   {
  75.         var idx = obj.getAttribute("idx");
  76.     window.open("3vgoto:idx=" + idx, "_self");
  77.   }
  78. }
  79.  
  80. function GotoAWInfo(obj)
  81. {
  82.   if (obj != null)
  83.   {
  84.         var idx = obj.getAttribute("idx");
  85.     window.open("3vinfo:idx=" + idx, "_self");
  86.   }
  87. }
  88.  
  89. function GotoURL(url)
  90. {
  91.   window.open("3vurl:" + url, "_self");
  92. }
  93.  
  94. function HighlightItem(itemid)
  95. {
  96.   var obj = document.all.itemid;
  97.   if (obj != null)
  98.   {
  99.     obj.style.backgroundColor = HIGHLIGHTED_COLOR;        
  100.   }
  101. }
  102.  
  103. function ShowPopup(itemid)
  104. {
  105.   var obj = document.all(itemid);
  106.   if (obj != null)
  107.   {
  108.     if (objLastPopup != null && objLastPopup != obj)
  109.     {
  110.       objLastPopup.style.color = "#3333FF";
  111.     }
  112.     objLastPopup = obj;
  113.     objLastPopup.style.color = "red";
  114.   }
  115. }
  116. /*
  117. function ShowPopup(obj)
  118. {
  119.   if (obj != null)
  120.   {
  121.     if (objLastPopup != null && objLastPopup != obj)
  122.     {
  123.       objLastPopup.style.color = "#3333FF";
  124.     }
  125.     objLastPopup = obj;
  126.     objLastPopup.style.color = "red";
  127.   }
  128. }
  129. */
  130. function HidePopup()
  131. {
  132.   if (objLastPopup != null)
  133.   {
  134.     objLastPopup.style.color = "#3333FF";
  135.   }
  136.   objLastPopup = null;
  137. }
  138.  
  139.