vorrei che se la risoluzione è superiore a 1024 mi carica elena_1024 e se sotto mi carica elena_800. Dove sbaglio?


var s_width ='';
var s_height ='';
s_width=screen.width
s_height=screen.height

if (s_width < "1024"){
location.href="elena_1024.html";
}
if (s_width > "1024"){
location.href="elena_800.html";
}