Hi,

I am using javascript to check the screen resolution and if a certain condition is met i want it to pull a particular css file. however it doesnt seem to be working, i am completely new to javascript an idiot really please if help.

Code:
<script type="text/javascript">
<!--

var width = screen.width; 
var height = screen.height;

if ((width==800) && (height==600)){document.write('<link rel="stylesheet" type="text/css" href="/includes/800x600.css" />'); } 
if ((width=1024) && (height==768)){document.write('<link rel="stylesheet" type="text/css" href="../includes/1024x768.css" />'); } 
if ((width==1920) && (height==1080)){document.write('<link rel="stylesheet" type="text/css" href="../includes/1920x1080.css" />'); } 
if ((width==1280) && (height==768)){document.write('<link rel="stylesheet" type="text/css" href="../includes/1280x768.css" />'); } 
if ((width==1440) && (height==900)){document.write('<link rel="stylesheet" type="text/css" href="../includes/1440x900.css" />'); } 
--></script>