function resizeImages(maxwidth, maxheight) {
	for (var i = 0; i < document.images.length; i++) {
		if (document.images[i].name = "resizable")
		{
		    widthratio = 1
		    heightratio = 1
		    if (document.images[i].width > maxwidth) {
			    widthratio = maxwidth / document.images[i].width
		    }
		    if (document.images[i].height > maxheight) {
			    heightratio = maxheight / document.images[i].height
		    }
		    if (widthratio < heightratio) {
			    ratio = widthratio
		    } else {
			    ratio = heightratio
		    }
		    document.images[i].width *= ratio
        }
	}
}

function resizeMe(theImage, maxwidth, maxheight)
{
    widthratio = 1;
    heightratio = 1;
    if (theImage.width > maxwidth) {
	    widthratio = maxwidth / theImage.width;
    }
    if (theImage.height > maxheight) {
	    heightratio = maxheight / theImage.height;
    }
    if (widthratio < heightratio) {
	    ratio = widthratio;
    } else {
	    ratio = heightratio;
    }
    theImage.width *= ratio;
}
