Add E & D Trading to your favorite stores and receive our exclusive emails about new items and special promotions!
General Interest
ICT Model GP-58CR Thermal Printer
var numImgsLoaded = 0; function autoSizeImageForSlideshow(imageIndex, maxWidth, maxHeight) { var imageObj = aucpics[imageIndex]; if (imageObj.width == 0 || imageObj.height == 0) { setTimeout('autoSizeImageForSlideshow(' + imageIndex.toString() + ',' + maxWidth.toString() + ',' + maxHeight.toString() + ')', 200); return; } var aspectRatio = (1.0 * imageObj.width) / imageObj.height; var width = imageObj.width; var height = imageObj.height; if ((imageObj.width > maxWidth) || (imageObj.height > maxHeight)) { if (aspectRatio > 1.0) { aspectRatio = (1.0 * imageObj.height) / imageObj.width; width = maxWidth; height = Math.round(aspectRatio * maxHeight); } else { height = maxHeight; width = Math.round(aspectRatio * maxWidth); } } imageObj.resizedWidth = width; imageObj.resizedHeight = height; numImgsLoaded++; }
|