

/* This function will ple-load the thumbnail images for faster performance */

var usingInternetExplorer = document.all;        // Sets identifiier for Internet Explorer
var usingNetscape4x = document.layers;        // Sets identifier for Netscape 4.x
var textDisplay, targetImage, textTitle, textRetail, textClearance, textDescr;                                                     // All others will be handled by the else command
var myImages = new Array();        /* Array to store the thumbail images */

function preloadImages(){

        for ( i = 0 ; i < preloadImages.arguments.length ; i++ ){
                myImages[i] = new Image()
                myImages[i].src = preloadImages.arguments[i]
        }
};

/* NOTE:
        The preloadImages function requires the following call to be placed in the <head> of the document
             <script>preloadImages(pic1.src, pic2.src, pic3.src,...................., picN.src )</script>   */



/* This function will send thumbnail images to the main image, and associate a string of text with it */
function changeImage(toWhat,txt){
if ( usingInternetExplorer ){
        textDisplay  = document.all.displayText;
        targetImage = document.all.targetImage;
        } else {
           if ( usingNetscape4x ) {
                textDisplay = document.displayText;
                targetImage = document.targetImage;
           } else {
                  textDisplay = document.getElementById  ("displayText");
                  targetImage = document.getElementById ("targetImage");
        }
}
/* Update Picture's Caption (text designated with "id=description") */
        textDisplay.innerHTML   = txt
/* Send target thumbnail to the main image (designated with "id="targetImage") */
        targetImage.src = toWhat.src
};


/* CLEARANCE PAGE VERSION - This function will send thumbnail images to the main image, and associate a string of text with it */
function postDockInfo(pic, title, priceRetail, priceClearance, descr){
if ( usingInternetExplorer ){
        textTitle  = document.all.displayDockTitle;
		textRetail  = document.all.displayDockRetail;
		textClearance  = document.all.displayDockClearance;
		textDescr  = document.all.displayDockDescr;
        targetImage = document.all.targetDockImage;
        } else {
           if ( usingNetscape4x ) {
                textTitle = document.displayDockTitle;
				textRetail = document.displayDockRetail;
				textClearance = document.displayDockClearance;
				textDescr = document.displayDockDescr;
                targetImage = document.targetDockImage;
           } else {
                  textTitle = document.getElementById  ("displayDockTitle");
				  textRetail = document.getElementById  ("displayDockRetail");
				  textClearance = document.getElementById  ("displayDockClearance");
				  textDescr = document.getElementById  ("displayDockDescr");
                  targetImage = document.getElementById ("targetDockImage");
        }
}
/* Update Picture's Caption (text designated with "id=description") */
        textTitle.innerHTML = title
		textRetail.innerHTML = priceRetail
		textClearance.innerHTML = priceClearance
		textDescr.innerHTML = descr
/* Send target thumbnail to the main image (designated with "id="targetImage") */
        targetImage.src = pic.src
};

function postAccInfo(pic, title, priceRetail, priceClearance, descr){
if ( usingInternetExplorer ){
        textTitle  = document.all.displayAccTitle;
		textRetail  = document.all.displayAccRetail;
		textClearance  = document.all.displayAccClearance;
		textDescr  = document.all.displayAccDescr;
        targetImage = document.all.targetAccImage;
        } else {
           if ( usingNetscape4x ) {
                textTitle = document.displayAccTitle;
				textRetail = document.displayAccRetail;
				textClearance = document.displayAccClearance;
				textDescr = document.displayAccDescr;
                targetImage = document.targetAccImage;
           } else {
                  textTitle = document.getElementById  ("displayAccTitle");
				  textRetail = document.getElementById  ("displayAccRetail");
				  textClearance = document.getElementById  ("displayAccClearance");
				  textDescr = document.getElementById  ("displayAccDescr");
                  targetImage = document.getElementById ("targetAccImage");
        }
}
/* Update Picture's Caption (text designated with "id=description") */
        textTitle.innerHTML = title
		textRetail.innerHTML = priceRetail
		textClearance.innerHTML = priceClearance
		textDescr.innerHTML = descr
/* Send target thumbnail to the main image (designated with "id="targetImage") */
        targetImage.src = pic.src
};

