// This function takes a variable number of parameters, each of which is a file name of an
// image.  It loads these images into an array to be displayed as needed.  If the array is
// loaded in the correct manner (top to bottom and within top to bottom, left to right) then
// the image will dsplay in a pleasing fashion.

function preloadImages() {

    if (document.images) {
       var imgFiles = preloadImages.arguments;
       var preloadArray = new Array();

       for (var i=0; i < imgFiles.length; i++) {
            preloadArray[i] = new Image;
            preloadArray[i].src = imgFiles[i];
       }
    }
}

// This function loads a file image into a named slot.  If the the slot name does not exist,
// this does nothing.

function loadImage(slotName, imgFile) {
    var theImage = locateImage(slotName);
    if (theImage) { theImage.src = imgFile; }
}

// This function locates the "window coordinates" of a slot if the slot is uniquely named.
// It return the coordinates if they exist or else an indication that the function failed.

function locateImage(slotName) {
    var coordinates = false;
    if (document.images) { coordinates = document.images[slotName]; }
    if (coordinates) { return coordinates; }
    return (false);
}

// These window pop-ups are for the chart boxes on the ORGANIZATION\index.htm page

function pop_up_mission() { var Miss = window.open("mission.htm", "miss_box", "width=800, height=250, left=100, top=100") }

function pop_up_ed_drew() { var Drew = window.open("ed_drew.htm", "drew_box", "width=800, height=700, left=100, top=100") }

function pop_up_taxstat() { var TaxS = window.open("taxstat.htm", "taxs_box", "width=800, height=250, left=100, top=100") }

function pop_up_charter() { var Chtr = window.open("charter.htm", "chtr_box", "width=800, height=500, left=100, top=100") }

function pop_up_staffpg() { var Staf = window.open("staff.htm",   "staf_box", "width=800, height=500, left=700  top=100") }

// These window pop-ups are for the large and small logo on the HUB.HTM page

function largelogo() {var Large = window.open('utilities/largelogo.htm', 'LL_box', 'width=500, height=490, left=600, top=280')}

function smalllogo()   {var Small = window.open('utilities/smalllogo.htm', 'SL_box', 'width=500, height=225, left=600, top=280')}

function sherlock(lvl) {var Sleuth= window.open(lvl+'search/search.htm',   'SH_box', 'width=500, height=225, left=600, top=380')}

// This window pop up displays the forms PDFs list

function pdf_forms() { var Pdfs = window.open("../utilities/pdfforms.htm", "pdfs_box", "width=800, height=500, left=100, top=100") }

// This window pop-up loads the Clear Sky Clock

function ClearSky()    {var CSC   = window.open('weather.htm', 'CSCbox', 'width=700, height=500, left=140, top=140')}

