menu.js
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 4k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //menu.js 
  2. // menu items in menu.htm
  3. function reg()
  4. {
  5.   top.content.location.href = "reg.htm";
  6. }
  7. function ad()
  8. {
  9.   top.content.location.href = (srvwiz.DsRole(0)) ? "ad2.htm" :  "ad.htm";
  10. }
  11. function net()
  12. {
  13.   top.content.location.href = "net.htm";
  14. }
  15. function dhcp()
  16. {
  17.   top.content.location.href = (srvwiz.ServiceState("DHCPServer") == 1) ? "dhcp.htm" : "dhcp2.htm";
  18. }
  19. function dns()
  20. {
  21.   top.content.location.href = (srvwiz.ServiceState("DNS") == 1) ? "dns.htm" : "dns2.htm";
  22. }
  23. function ras()
  24. {
  25.   top.content.location.href = (srvwiz.ServiceState("RemoteAccess") == 1) ? "ras.htm" : "ras2.htm";
  26. }
  27. function rtg()
  28. {
  29.   top.content.location.href = (srvwiz.ServiceState("Routing") == 1) ? "route.htm" : "route2.htm";
  30. }
  31. function file()
  32. {
  33.   top.content.location.href = "file.htm";
  34. }
  35. function print()
  36. {
  37.   top.content.location.href = "print.htm";
  38. }
  39. function web()
  40. {
  41.   top.content.location.href = "web.htm";
  42. }
  43. function iis()
  44. {
  45.   top.content.location.href = (srvwiz.ServiceState("IISAdmin") == 1) ? "iis.htm" : "iis2.htm";
  46. }
  47. function sms()
  48. {
  49.   top.content.location.href = (srvwiz.ServiceState("NetShow")  == 1) ? "sms.htm" : "sms2.htm";
  50. }
  51. function as()
  52. {
  53.   top.content.location.href = "as.htm";
  54. }
  55. function com()
  56. {
  57.   top.content.location.href = "com.htm";
  58. }
  59. function db()
  60. {
  61.   top.content.location.href = "db.htm";
  62. }
  63. function mq()
  64. {
  65.   top.content.location.href = (srvwiz.ServiceState("MessageQueue") == 1) ? "mq.htm" : "mq2.htm";
  66. }
  67. function email()
  68. {
  69.   top.content.location.href = "email.htm";
  70. }
  71. function adv()
  72. {
  73.   top.content.location.href = "adv.htm";
  74. }
  75. function cls()
  76. {
  77.   top.content.location.href = (srvwiz.ServiceState("Clustering") > 0) ? "cs.htm" : "cs2.htm";
  78. }
  79. function ts()
  80. {
  81.   top.content.location.href = (srvwiz.ServiceState("TerminalServices") == 1) ? "ts.htm" : "ts2.htm";
  82. }
  83. function reskit()
  84. {
  85.   top.content.location.href = "reskit.htm";
  86. }
  87. function oth()
  88. {
  89.   top.content.location.href = "oth.htm";
  90. }
  91. /*close the open drop-down menu when a different menu item is clicked*/
  92. function MenuOnClick(elem)
  93. {
  94.   var SubMenus = new Array(4);
  95.   var i;
  96.   SubMenus[0] = document.all.n;
  97.   SubMenus[1] = document.all.w;
  98.   SubMenus[2] = document.all.as;
  99.   SubMenus[3] = document.all.a;
  100.   if ( elem == -1 ) { // clcked on a simple menu item
  101.     for ( i = 0; i <= 3; i++ ) { // collapse the expanded sub menu, if any
  102.       if ( SubMenus[i].style.display == '' ) {
  103.         SubMenus[i].style.display = 'none';
  104.       }
  105.     }
  106.   }
  107.   else if ( elem >= 0 && elem <= 3 ){ // clicked on a sub menu
  108.     for ( i = 0; i <= 3; i++ ) {
  109.       if ( elem == i ) { // toggle the clicked sub menu
  110.         if ( SubMenus[i].style.display == '' ) {
  111.           SubMenus[i].style.display = 'none';
  112.         } else {
  113.           SubMenus[i].style.display = '';
  114.         }
  115.       } else { // and collapse all others
  116.         if ( SubMenus[i].style.display == '' ) {
  117.           SubMenus[i].style.display = 'none';
  118.         }
  119.       }
  120.     }
  121.   }
  122.   else { 
  123.     // invalid argument
  124.   }
  125. }
  126. /*swap images to left of menu onmouseover*/
  127. function b_on(n)
  128. {
  129.   if (n==1)  { document["b1"].src = "mnu_hm2.gif";    }
  130.   if (n==2)  { document["b2"].src = "mnu_reg2.gif";   }
  131.   if (n==3)  { document["b3"].src = "mnu_ad2.gif";    }
  132.   if (n==4)  { document["b4"].src = "mnu_net2.gif";   }
  133.   if (n==5)  { document["b5"].src = "mnu_fl2.gif";    }
  134.   if (n==6)  { document["b6"].src = "mnu_prt2.gif";   }
  135.   if (n==7)  { document["b7"].src = "mnu_web2.gif";   }
  136.   if (n==8)  { document["b8"].src = "mnu_ap2.gif";    }
  137.   if (n==9)  { document["b9"].src = "mnu_adv2.gif";   }
  138.   if (n==10) { document["b10"].src = "mnu_fin2.gif";  }
  139. }
  140.    
  141. function b_off(n)
  142. {
  143.   if (n==1)  { document["b1"].src = "mnu_hm1.gif";    }
  144.   if (n==2)  { document["b2"].src = "mnu_reg1.gif";   }
  145.   if (n==3)  { document["b3"].src = "mnu_ad1.gif";    }
  146.   if (n==4)  { document["b4"].src = "mnu_net1.gif";   }
  147.   if (n==5)  { document["b5"].src = "mnu_fl1.gif";    }
  148.   if (n==6)  { document["b6"].src = "mnu_prt1.gif";   }
  149.   if (n==7)  { document["b7"].src = "mnu_web1.gif";   }
  150.   if (n==8)  { document["b8"].src = "mnu_ap1.gif";    }
  151.   if (n==9)  { document["b9"].src = "mnu_adv1.gif";   }
  152.   if (n==10) { document["b10"].src = "mnu_fin1.gif";  }
  153. }