Hope somebody can help with the follwing:

I am trying to use the script below to detect whether the user is: a) using a Mac
b) if he is using a PC whether he is using IE or netscape.

This is so that I can implement different style sheets for NS/IE on PC and a different style sheet for mac.

But it doesnt work - it is not even picking up my style sheets for the PC versions. All the paths are correct so it is not that.

Hers's the script:

if (navigator.appVersion.indexOf("Mac") != -1){
document.write('<link rel="stylesheet" type="text/css" href="/bustrav/scripts/style_mac.css">')
}
if (navigator.appVersion.indexOf("Win") != -1)&& (navigator.appName=="Microsoft Internet Explorer"){
document.write('<link rel="stylesheet" type="text/css" href="/bustrav/scripts/style_ie.css">')
}
else {
document.write('<link rel="stylesheet" type="text/css" href="/bustrav/scripts/style_ns.css">')
}


If anyone could shed any light on this for me I'd be really grateful!

Thanks

Lisa