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.

75 lines
1.4 KiB

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