//random main image for SML Gateway
            currentIndx=0;
            //all the images and their urls 
            //this is the only section that needs to be modified-Add image names here
            imgArray = new Array()
            imgArray[0] = ['/images/section_images/mainphoto1.jpg'];
            imgArray[1] = ['/images/section_images/mainphoto2.jpg'];
            imgArray[2] = ['/images/section_images/mainphoto3.jpg'];
            imgArray[3] = ['/images/section_images/mainphoto4.jpg'];
            imgArray[4] = ['/images/section_images/mainphoto5.jpg'];
            imgArray[5] = ['/images/section_images/mainphoto6.jpg'];
            imgArray[6] = ['/images/section_images/mainphoto7.jpg'];
            imgArray[7] = ['/images/section_images/mainphoto8.jpg'];
            imgArray[8] = ['/images/section_images/mainphoto9.jpg'];
            imgArray[9] = ['/images/section_images/mainphoto10.jpg'];
            imgArray[10] = ['/images/section_images/mainphoto11.jpg'];
            imgArray[11] = ['/images/section_images/mainphoto12.jpg'];
            //randomly select the order of the 
            var imgOrderArray = new Array();
            while (imgOrderArray.length != imgArray.length) {
                intSeed = (Math.round(Math.random()*(imgArray.length-1)));
                blnFound = false;
                for (i=0; i<imgOrderArray.length; i++) {
                    if (imgOrderArray[i] == intSeed) {
                        i = imgOrderArray.length;
                        blnFound = true;}
                }if (!blnFound) imgOrderArray[imgOrderArray.length] = intSeed;}
            //load the images into the arrays
            var MyImages = new Array();
            var counter = 0;
            for (i=0; i<imgOrderArray.length; i++) {
                    MyImages[counter] = imgArray[imgOrderArray[i]][0];
                    //Links[counter] = imgArray[imgOrderArray[i]][1];
                    blnLeft = true;
                    counter++;} 
            //preload images
            imagesPreloaded = new Array();
            for (var i = 0; i < MyImages.length ; i++) {
                imagesPreloaded[i] = new Image(180,145)
                imagesPreloaded[i].src=MyImages[i]}
            function init(){
            document.theImage.src=imagesPreloaded[0].src;}







