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

  1. var objCurrent = null;
  2.  
  3. function mouseover(obj)
  4. {
  5.   if (obj != null)
  6.   {
  7.     obj.style.color = "#FF9900";
  8.   }
  9. }
  10.  
  11. function mouseout(obj)
  12. {
  13.   if (obj != null)
  14.   {
  15.     obj.style.color = "";
  16.     obj.style.fontWeight = "";
  17.   }
  18. }
  19.  
  20. function MouseOverCat(obj, type)
  21. {
  22.   if (obj != null)
  23.   {
  24.     if (type == 0)
  25.     {
  26.       MouseOverArrow(obj.all.plusminus, obj.getAttribute("state"));
  27.     }
  28.     else if (type == 1)
  29.     {
  30.       MouseOverText(obj.all.CatName, obj.getAttribute("state"));
  31.     }
  32.   }
  33. }
  34.  
  35. function MouseOutCat(obj, type)
  36. {
  37.   if (obj != null)
  38.   {
  39.     if (type == 0)
  40.     {
  41.       MouseOutArrow(obj.all.plusminus, obj.getAttribute("state"));
  42.     }
  43.     else if (type == 1)
  44.     {
  45.       MouseOutText(obj.all.CatName, obj.getAttribute("state"));
  46.     }
  47.   }
  48. }
  49.  
  50. function MouseOverArrow(obj, state)
  51. {
  52.   if (obj != null && state == 1)
  53.   {
  54.     obj.src = "images/over.gif";
  55.   }
  56. }
  57.  
  58. function MouseOutArrow(obj, state)
  59. {
  60.   if (obj != null)
  61.   {
  62.     if (state == 1)
  63.     {
  64.       obj.src = "images/plus.gif";
  65.     }
  66.     else
  67.     {
  68.       obj.src = "images/minus.gif";
  69.     }
  70.   }
  71. }
  72.  
  73. function MouseOverText(obj, state)
  74. {
  75.   if (obj != null)
  76.   {
  77.     obj.style.color = "#FF9900";
  78.   }
  79. }
  80.  
  81. function MouseOutText(obj, state)
  82. {
  83.   if (obj != null)
  84.   {
  85.     obj.style.color = "";
  86.   }
  87. }
  88.  
  89. function ImgOver(obj, img)
  90. {
  91.   if (obj != null)
  92.   {
  93.     obj.src = "images/" + img + "ovr.gif";
  94.   }
  95. }
  96.  
  97. function ImgOut(obj, img)
  98. {
  99.   if (obj != null)
  100.   {
  101.     obj.src = "images/" + img + ".gif";
  102.   }
  103. }
  104.  
  105. function ImgDn(obj, img)
  106. {
  107.   if (obj != null)
  108.   {
  109.     obj.src = "images/" + img + "dn.gif";
  110.   }
  111. }
  112.  
  113. function Link(id, keyword)
  114. {
  115.   top.location = "rd/asp/" + id + "," + keyword;
  116. }
  117.  
  118. function seekeyword(obj)
  119. {
  120.   if (obj != null)
  121.   {
  122.     window.open("3vseekw:" + obj.getAttribute("kw"), "_self");
  123.   }
  124. }
  125.  
  126. function seekeywordlist(obj)
  127. {
  128.   if (obj != null)
  129.   {
  130.     window.open("3vseekwlist:" + obj.getAttribute("kw"), "_self");
  131.   }
  132. }
  133.  
  134. function GotoCreateGroup()
  135. {
  136.   window.open("3vgotocreategroup:", "_self");
  137. }
  138.  
  139. function ExpandTree(Cat, bToggle)
  140. {
  141.   if (Cat != null)
  142.   {
  143.     var obj = Cat.parentElement;
  144.     var plusminus = Cat.all.plusminus;
  145.     if (obj != null && plusminus != null)
  146.     {
  147.       var child = GetInfoSrcList(obj);
  148.       if (child != null)
  149.       {
  150.         if ((bToggle == true && Cat.getAttribute("state") == 1) || bToggle == false)
  151.         {
  152.           Cat.setAttribute("state", 0);
  153.           plusminus.src = "images/minus.gif";
  154.           child.style.display = "inline";
  155.         }
  156.         else if (bToggle == true)
  157.         {
  158.           Cat.setAttribute("state", 1);
  159.           plusminus.src = "images/over.gif";
  160.           child.style.display = "none";
  161.         }
  162.       }
  163.     }
  164.   }
  165. }
  166.  
  167. function GetInfoSrcList(obj)
  168. {
  169.   var child = null;
  170.   if (obj != null)
  171.   {
  172.     var length = obj.children.length;
  173.     for (var i = 0; i < length; i++)
  174.     {
  175.       if (obj.children[i].className == "InfoSrcList")
  176.       {
  177.         child = obj.children[i];
  178.         break;
  179.       }
  180.     }
  181.   }
  182.   return child;
  183. }
  184.  
  185. function GotoLink(obj)
  186. {
  187.   if (obj.getAttribute("oneoff") != null && obj.getAttribute("oneoff") == 1)
  188.   {
  189.     window.open("3vgotooneoff:" + obj.getAttribute("iid"), "_self");
  190.   }
  191.   else
  192.   {
  193.     window.open("3vgoto:" + obj.getAttribute("iid"), "_self");
  194.   }
  195. }
  196.  
  197. function GotoGroup(obj)
  198. {
  199.   window.open("3vgroup:" + obj.getAttribute("gid") + "=" + obj.all.groupname.innerHTML, "_self");
  200. }
  201.  
  202. function ShowLinks(id)
  203. {
  204.   var obj = document.all[id];
  205.   if (obj != null)
  206.   {
  207.     var plusminus = obj.all["plusminus"];
  208.     if (plusminus)
  209.     {
  210.       ExpandTree(obj, plusminus, false);
  211.       HighlightParent(obj);
  212.     }
  213.   }
  214. }
  215.  
  216. function HighlightParent(obj)
  217. {
  218.   var parent = obj.parentElement;
  219.   if (parent.className == "Cat1")
  220.   {
  221.     if (objCurrent != null && objCurrent != parent)
  222.     {
  223.       objCurrent.style.backgroundColor = "";
  224.     }
  225.     parent.scrollIntoView(true);
  226.     parent.style.backgroundColor = "#ffcc66";
  227.     objCurrent = parent;
  228.   }
  229. }
  230.  
  231. function GoTop()
  232. {
  233.   window.open("3vgotop:", "_self");
  234. }
  235.  
  236. function GoBack()
  237. {
  238.   window.open("3vgoback:", "_self");
  239. }
  240.  
  241. function GoLogo()
  242. {
  243.   window.open("3vgologo:", "_self");
  244. }
  245.  
  246. function ShowElement(id, bShow)
  247. {
  248.   var obj = document.all[id];
  249.   if (obj)
  250.   {
  251.     if (bShow == true)
  252.     {
  253.       obj.style.display = "inline";
  254.       var content = id + "content";
  255.       obj = document.all[content];
  256.       if (obj)
  257.       {
  258.         obj.style.display = "inline";
  259.       }
  260.     }
  261.     else
  262.     {
  263.       obj.style.display = "none";
  264.     }
  265.   }
  266. }
  267.  
  268. function msieversion()
  269. {
  270.   var ua = window.navigator.userAgent;
  271.   var msie = ua.indexOf("MSIE ");
  272.   
  273.   if (msie > 0)      // If Internet Explorer, return version number
  274.     return parseInt(ua.substring(msie+5, ua.indexOf (".", msie)));
  275.   else                 // If another browser, return 0
  276.     return 0;
  277. }
  278.  
  279. function mousedown(obj)
  280. {
  281.   if (obj)
  282.   {
  283.     obj.style.fontWeight = "bold";
  284.   }
  285. }
  286.  
  287. function mouseup(obj)
  288. {
  289.   if (obj)
  290.   {
  291.     obj.style.fontWeight = "";
  292.   }
  293. }