Resize Image by Resolution

Home

Resize an image for different screen resolutions.

<script type="text/javascript" language="JavaScript1.2">
<!--
var resWidth = window.screen.width;
if(resWidth > 1024) {
  image1_width = 440;
}
else if(resWidth == 1024) {
  image1_width = 380;
}
else if(resWidth == 800) {
  image1_width = 320;
}
else if(resWidth < 800) {
  image1_width = 260;
}
else {
  image1_width = 260;
}
var image1 = '<img src="logo.gif" width="' + image1_width + '">';
document.write(image1);
// -->
</script>