Browser.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. if (typeof window.RadControlsNamespace == "undefined")
  2. {
  3. window.RadControlsNamespace = {};
  4. }
  5. if (
  6. typeof(window.RadControlsNamespace.Browser) == "undefined" ||
  7. typeof(window.RadControlsNamespace.Browser.Version) == null ||
  8. window.RadControlsNamespace.Browser.Version < 1
  9. )
  10. {
  11. window.RadControlsNamespace.Browser = {
  12. Version : 1
  13. };
  14. window.RadControlsNamespace.Browser.ParseBrowserInfo = function ()
  15. {
  16. this.IsMacIE = (navigator.appName == "Microsoft Internet Explorer") &&
  17. ((navigator.userAgent.toLowerCase().indexOf("mac") != -1) ||
  18. (navigator.appVersion.toLowerCase().indexOf("mac") != -1));
  19. this.IsSafari = (navigator.userAgent.toLowerCase().indexOf("safari") != -1);
  20. this.IsSafari3 = (this.IsSafari && navigator.userAgent.toLowerCase().indexOf("ersion/3.") != -1);
  21. this.IsMozilla = window.netscape && !window.opera;
  22. this.IsFirefox = window.netscape && !window.opera;
  23. this.IsNetscape = /Netscape/.test(navigator.userAgent);
  24. this.IsOpera = window.opera;
  25. this.IsOpera9 = window.opera && (parseInt(window.opera.version()) > 8);
  26. this.IsIE = !this.IsMacIE && !this.IsMozilla && !this.IsOpera && !this.IsSafari;
  27. this.IsIE7 = /MSIE 7/.test(navigator.appVersion);
  28. this.StandardsMode = this.IsSafari || this.IsOpera9 || this.IsMozilla || document.compatMode == "CSS1Compat";
  29. this.IsMac = /Mac/.test(navigator.userAgent);
  30. }
  31. RadControlsNamespace.Browser.ParseBrowserInfo();
  32. }
  33. //BEGIN_ATLAS_NOTIFY
  34. if (typeof(Sys) != "undefined")
  35. {
  36. if (Sys.Application != null && Sys.Application.notifyScriptLoaded != null)
  37. {
  38. Sys.Application.notifyScriptLoaded();
  39. }
  40. }
  41. //END_ATLAS_NOTIFY