Source code of Windows XP (NT5)
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.

84 lines
1.6 KiB

  1. // BUGBUG - This file is obsolete.
  2. var SLASH = "/"
  3. var DBLSLASH = "\\"
  4. //open
  5. var POP = true;
  6. //browser style
  7. var TDIR = 0
  8. var TFILE = 1
  9. //system font size
  10. var SMALL = 0
  11. var LARGE = 1
  12. function BrowserObj(pathCntrl,open,browsertype,sysfontsize)
  13. {
  14. this.browsertype = browsertype;
  15. this.sysfontsize = sysfontsize;
  16. this.currentFile = "";
  17. if (pathCntrl != null)
  18. {
  19. this.currentPath = pathCntrl.value;
  20. this.lastpath = pathCntrl.value;
  21. this.pathCntrl = pathCntrl;
  22. }
  23. else
  24. {
  25. this.currentPath = "";
  26. this.lastPath = "";
  27. }
  28. this.BrowserObjSetPath = BrowserObjSetPath;
  29. this.BrowserObjOpen = BrowserObjOpen;
  30. if (open)
  31. {
  32. BrowserObjOpen();
  33. }
  34. }
  35. function BrowserObjPop(title, width, height, filename)
  36. {
  37. thefile=(filename + ".asp");
  38. thefile="JSBrowser/JSBrwPop.asp?pg="+thefile+"&jsfontsize="+JSBrowser.sysfontsize;
  39. var browser = navigator.appName;
  40. popbox=window.open(thefile,title,"resizable=yes,toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  41. popbox.opener = self;
  42. }
  43. function BrowserObjOpen()
  44. {
  45. BrowserObjPop('Browser',525,300,'JSBrowser');
  46. }
  47. function BrowserObjSetPath()
  48. {
  49. if (JSBrowser.browsertype == TDIR)
  50. {
  51. JSBrowser.pathCntrl.value = JSBrowser.currentPath;
  52. }
  53. else
  54. {
  55. currentPath = JSBrowser.currentPath;
  56. if (currentPath.lastIndexOf(DBLSLASH) == currentPath.length-1)
  57. {
  58. JSBrowser.pathCntrl.value = currentPath + JSBrowser.currentFile;
  59. }
  60. else
  61. {
  62. JSBrowser.pathCntrl.value = currentPath + DBLSLASH + JSBrowser.currentFile;
  63. }
  64. }
  65. JSBrowser.pathCntrl.focus();
  66. JSBrowser.pathCntrl.blur();
  67. }