Carga hoja de estilo por resolucion

Oscar
07 de Enero del 2004
Se me ha ocurrido hacer esto para cargar una hoja de estilo en funcion de la resolucion de pantalla del usuario. Que os parece?? Dará algún fallo??

<html><head>

<link rel="STYLESHEET" TYPE="text/css" id="carga_estilo">

<script>
var e640 ="640.css";
var e800="800.css";
var e1024="1024.css";
var variable;
if ((screen.width == 640) && (screen.height == 480))
variable=e640;
else if ((screen.width == 800) && (screen.height == 600))
variable=e800;
else
variable=e1024;

document.all("carga_estilo").href=variable;
</script>
</head><body></body></html>

Gracias
Un saludo