Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.6 KiB

  1. <SCRIPT id="idScript1" name="idScript1" language=JScript>
  2. var szQS;
  3. var sIndex;
  4. var szURL;
  5. var bPassword = false;
  6. var bNoTicket = false;
  7. function StartRA()
  8. {
  9. try
  10. {
  11. RAServer.StartRA(szQS, "");
  12. }
  13. catch (e)
  14. {
  15. idNotIE.className = "DisplayNone";
  16. idNotXP.className = "DisplayNone";
  17. idDivJScriptAvailable.className = "DisplayNone";
  18. idDivJScriptNotAvailable.className = "DisplayNone";
  19. idDivError.className = "Display";
  20. }
  21. }
  22. function load()
  23. {
  24. var szFlag;
  25. var iOS;
  26. var bXP;
  27. var bIE;
  28. // NOTE: These are ASP variables that generate JScript code for use in the JScript layer.
  29. <% = codeFromASP_bXP %>
  30. // seperate line
  31. <% = codeFromASP_bIE %>
  32. // Check to see if we had an error from the ASP layer.
  33. // If the ASP env vars say that we are not XP, then fail out by changing the
  34. // styles of the divs
  35. if (bXP == 0)
  36. {
  37. idNotIE.className = "DisplayNone";
  38. idNotXP.className = "Display";
  39. idDivJScriptAvailable.className = "DisplayNone";
  40. idDivJScriptNotAvailable.className = "DisplayNone";
  41. idDivError.className = "DisplayNone";
  42. return;
  43. }
  44. // Check to see if we had an error from the ASP layer.
  45. // If the ASP env vars say that we are not IE, then fail out by changing the
  46. // styles of the divs
  47. if (bIE == 0)
  48. {
  49. idNotIE.className = "Display";
  50. idNotXP.className = "DisplayNone";
  51. idDivJScriptAvailable.className = "DisplayNone";
  52. idDivJScriptNotAvailable.className = "DisplayNone";
  53. idDivError.className = "DisplayNone";
  54. return;
  55. }
  56. idDivJScriptAvailable.className = "Display";
  57. idDivJScriptNotAvailable.className = "DisplayNone";
  58. idDivError.className = "DisplayNone";
  59. idNotIE.className = "DisplayNone";
  60. idNotXP.className = "DisplayNone";
  61. try
  62. {
  63. szURL = window.document.URL;
  64. sIndex = szURL.indexOf("#", 1);
  65. if (sIndex == -1) // No Ticket
  66. {
  67. idDivJScriptAvailable.className = "DisplayNone";
  68. idDivJScriptNotAvailable.className = "DisplayNone";
  69. idDivError.className = "Display";
  70. bNoTicket = true;
  71. }
  72. szQS = szURL.slice(sIndex + 1);
  73. // Take out the trailing charactor. "Z"
  74. szQS = szQS.slice(0,szQS.length-1);
  75. // Replace the .'s with +'s
  76. szQS = szQS.replace(/\./g, "+");;
  77. szFlag = szQS.substr(0,1);
  78. // Find out if this ticket uses a password
  79. if (0x1 & parseInt(szFlag, 10))
  80. {
  81. bPassword = true;
  82. }
  83. }
  84. catch (error)
  85. {
  86. // If anything here fails, goto the Error page.
  87. idDivJScriptAvailable.className = "DisplayNone";
  88. idDivJScriptNotAvailable.className = "DisplayNone";
  89. idDivError.className = "Display";
  90. }
  91. }
  92. </SCRIPT>