﻿<!--
    //get the image width from the image specified.
    function getImageWidth(imageFileName) {
        //preloadImages("'" + imageFileName + "'");
        var widthImage = new Image();
        widthImage.src = "/images/products/normal/" + imageFileName;
        
        //return the width.
        return widthImage.width;
    }
    
    //get the image height from the image specified.
    function getImageHeight(imageFileName) {
        //load the image...
        //preloadImages("'" + imageFileName + "'");
        var heightImage = new Image();
        heightImage.src = "/images/products/normal/" + imageFileName;
        
        //return the height.
        return heightImage.height;
    }
    
    //preloads all the normal images for that page.
    function preloadImages(imageArray) {
        //declare all local variables...
        var imageNames = new Array(imageArray);
        var images = new Array();
        
        //now loop through the images list so we can preload.
        for (var i = 0; imageNames.length; i++) {
            images[i] = new Image();
            images[i].src = "/images/products/normal/" + imageNames[i];
        }
    }
//>