
		/* FUNCTIONS AND VARIABLES FOR ROTATING IMAGE IN SUBHEADER ********************************************************/


        function changeSubheadImage(imagePath) { 
        
            if (document.getElementById('rightInnerMiddleSubhead').style.backgroundImage != "url(" + imagePath + ")") {
        
                clearInterval(currentInterval);
                
                // set the global current Y value of the current pic
                tempPos = document.getElementById('rightInnerMiddleSubhead').style.backgroundPosition;
                tempPosArray = tempPos.split(" ");
                currentYValue = tempPosArray[0].substring(0,-2);
                
                // set the image to be changed to
                destinationImage = imagePath;
                
                nextMovement = 1;
                
                currentInterval = setInterval('moveImageOff()', 5);
            
            } // if
            
        } // function changeSubheadImage
        
        function moveImageOff() {
            document.getElementById('rightInnerMiddleSubhead').style.backgroundPosition = "28px " + (currentYValue-nextMovement) + "px";
            currentYValue = (currentYValue-nextMovement);
            nextMovement = nextMovement * 2;
            if (currentYValue < -75) {
                clearInterval(currentInterval);
                document.getElementById('rightInnerMiddleSubhead').style.backgroundPosition = "28px 150px";
                currentYValue = 150;
                document.getElementById('rightInnerMiddleSubhead').style.backgroundImage = "url(" + destinationImage + ")";
                nextMovement = 60;
                currentInterval = setInterval('moveImageOn()', 5);
            } // if
            
        } // function moveImageOff
            
        function moveImageOn() {
            
            document.getElementById('rightInnerMiddleSubhead').style.backgroundPosition = "28px " + ((currentYValue*1)-(nextMovement*1)) + "px";
            currentYValue = ((currentYValue*1)-(nextMovement*1));
            nextMovement = (nextMovement / 2) + (1*1);

            if (currentYValue <= 15) {
                clearInterval(currentInterval);
            } // if
            
        } // function moveImageOn
