I'm trying to write a piece of javascript to select a particular css file based on the browsers screen resolution. At the moment I've got this:

Code:
var ScrnSize;

ScrnSize = screen.width + "x" + screen.height;
  
switch(ScrnSize) {

case "800x600":   
	document.write('<link rel="stylesheet" type="text/css" href="style/lowres.css" />');
default:          
	document.write('<link rel="stylesheet" type="text/css" href="style/hires.css" />');
}
But it always seems to go to the default value no matter what. I'm a newb at javascript, so any help is appreciated