Hi there!

I need a script that will redirect (as soon as the resolution is checked) if the screen resolution is higher or lower than 1024x768 to 2 different urls

I found this script, but I'm not able to get it working (and i've changed the values, but this is the script I found):


<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function redirectPage() {
var url640x480 = "indexlinks640.html";
var url800x600 = "indexlinks800.html";
var url1024x768 = "indexlinks1024.html";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}
// End -->
</script>