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.

100 lines
2.9 KiB

  1. // LocStudio
  2. // following string variables need to be localized:
  3. var L_Refresh_Text = "Refresh";
  4. function InsertReloadHREF(sTitle){
  5. // assuming that this error page is called with a parametrized URL:
  6. // res://browselc.dll/mb404.htm#http://www..windowsmedia/com
  7. thisURL = document.location.href;
  8. //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
  9. //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
  10. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
  11. startXBarURL = thisURL.indexOf("#", 1) + 1;
  12. var xBarURL = "";
  13. if (startXBarURL > 0)
  14. {
  15. xBarURL = thisURL.substring(startXBarURL, thisURL.length);
  16. // Security precaution: filter out illegal chars from "xBarURL"
  17. forbiddenChars = new RegExp("[<>\'\"]", "g"); // Global search/replace
  18. xBarURL = xBarURL.replace(forbiddenChars, "");
  19. }
  20. if (xBarURL.length > 0)
  21. {
  22. document.write('<a href="' + xBarURL + '">' + sTitle + "</a>");
  23. }
  24. else
  25. {
  26. document.write('<a href="javascript:document.location.reload();">' + sTitle + "</a>");
  27. }
  28. }
  29. function IncludeCSS()
  30. {
  31. var cssFile;
  32. if (window.screen.colorDepth <= 8) {
  33. cssFile = "mediabar256.css";
  34. }
  35. else {
  36. cssFile = "mediabar.css";
  37. }
  38. document.write("<link rel='stylesheet' type='text/css' href='" + cssFile + "'>");
  39. }
  40. function ShowHideShellLinks()
  41. {
  42. var bHaveMyMusic = false;
  43. var bHaveMyVideo = false;
  44. var appVersion = window.clientInformation.appVersion;
  45. var versionInfo = appVersion.split(";");
  46. if (versionInfo.length < 3) {
  47. return; // bad version string, bail out w/o enabling shell links
  48. }
  49. var winVer = versionInfo[2];
  50. // test for Win NT
  51. var winNT = "Windows NT";
  52. var offsNum = winVer.indexOf(winNT);
  53. if (offsNum > 0)
  54. {
  55. // what NT version?
  56. numVer = parseFloat(winVer.substring(offsNum + winNT.length));
  57. ntMajor = Math.floor(numVer);
  58. ntMinor = Math.round((numVer - ntMajor) * 10);
  59. if (ntMajor >= 5)
  60. {
  61. if (ntMinor >= 1)
  62. {
  63. // only XP or newer knows My Music / My Video
  64. bHaveMyMusic = true;
  65. bHaveMyVideo = true;
  66. }
  67. }
  68. }
  69. else
  70. {
  71. if (versionInfo.length > 3)
  72. {
  73. // test for Win ME
  74. var win9X = versionInfo[3];
  75. if (win9X.indexOf("4.90") > 0)
  76. {
  77. // only ME knows My Music / My Video
  78. bHaveMyMusic = true;
  79. bHaveMyVideo = true;
  80. }
  81. }
  82. }
  83. if (bHaveMyMusic) {
  84. divMyMusic.style.display="";
  85. }
  86. if (bHaveMyVideo) {
  87. divMyVideo.style.display="";
  88. }
  89. }