peri: netscape problem mit abfragen und zuweisungen

Beitrag lesen

Ich habe an meiner abfrage gebastelt. Der ie nimmt sie an, der ns ( alle versionen) sträunben sich dagegen. ich weiss nicht weshalb.

kann bitte jemand über den code schaun?

var system= (navigator.appVersion.indexOf("Mac")==-1)?"PC":"MAC";
var browser=(navigator.appName.indexOf("Microsoft")==-1)?"NS":"IE";
var systembrowser=system+ browser;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ns7=document.getElementById&&!document.all

var skinpath='skin/{skinname}/';
alert (systembrowser);

switch (systembrowser)
 {
  case "PCIE":
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ie_pc.css'>");
  break;
  case "PCNS":
  // Browserbedingt umleiten
  if (ns4){
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ns_pc.css'>");
  }
  if (ns6){
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ns6_pc.css'>");
  }
  if (ns7){
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ns7_pc.css'>");
  }
    break;
  case "MACIE":
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ie_mac.css'>");
  break;
  case "MACNS":
  if (ns4){
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ns_mac.css'>");
  }
  if (ns6){
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ns6_mac.css'>");
  }
  if (ns7){
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ns7_mac.css'>");
  }
  break;
  default:
  document.write("<link rel=stylesheet type='text/css' href='"+skinpath+"ie_pc.css'>");
  break;
}

____________________________________________________________