home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2003 June (Bonus) / Services_2003.bin / services_2003 / library / script / browserSwitchPrePages.js < prev    next >
Encoding:
Text File  |  2003-02-27  |  1.3 KB  |  56 lines

  1. // There are 3 browserswitch js-files, which need to be kept consistent:
  2. // /sample/library/script/browserSwitch.js
  3. // /sample/library/script/browserSwitchPrePages.js
  4. // /sample/library/script/browserSwitchStartPage.js
  5. // 
  6. // Differences:
  7. // 1st) They differ in the redirect-paths: only "browserSwitchStartPage.js" needs to be modified
  8. // 2nd) "browserSwitchStartPage.js" has no function browserdetect()
  9.  
  10.  
  11. // Browserswitch: IE < 5 / NS < 6
  12. if (!document.getElementById && !document.all)
  13. {
  14.     window.location="services_2003/browser.htm";
  15. }
  16.  
  17.  
  18. //  Useage of IE4 (compatible installation):
  19. if (  navigator.appVersion.indexOf('MSIE 4')!=-1  && navigator.appVersion.indexOf('compatible;')!=-1 ) 
  20.     window.location="services_2003/browser.htm";  
  21. }
  22.  
  23. //Schlieâ–€t Opera aus
  24. if (navigator.appName == "Opera") 
  25.     window.location="services_2003/browser.htm";
  26. }
  27.  
  28.  
  29.  
  30. //This function is only called by intro.htm
  31. function browserdetect(){
  32.     var Schalter = 0;
  33.     // Browserswitch: IE < 5 / NS < 6
  34.     if (!document.getElementById && !document.all)
  35.     {
  36.         var Schalter = 1; 
  37.     }
  38.     
  39.     //  Useage of IE4 (compatible installation):
  40.     if (navigator.appVersion.indexOf('MSIE 4')!=-1  && navigator.appVersion.indexOf('compatible;')!=-1 ) 
  41.     { 
  42.         var Schalter = 1; 
  43.     }
  44.     
  45.     if (navigator.appName == "Opera") 
  46.     { 
  47.         var Schalter = 1; 
  48.     }
  49.     
  50.     return Schalter;
  51. }
  52.  
  53.  
  54.