Hey,

I'm trying to write a stylesheet switcher. What should happen in this switcher is that, on page load, it will detect whether you are using Internet Explorer or another browser, and then it will load the appropriate stylesheet.

This is what i've got so far:

PHP Code:
//Stylesheet Switcher

if (navigator.appName Microsoft Internet Explorer) {
document.write("styleIE.css")
}
else {
document.write("style.css")

i'm not sure how to tell it to put "style.css" or "styleIE.css" in the appropriate location, which would be in the header like so:
Code:
<link rel="stylesheet" type="text/css" href="*correctstylesheetname*">
and then i'm guessing the code to execute the script would be

Code:
<body onload="styleswitcher.js">
can somebody check my work and offer assistance where necessary?

Thanks!