// stfc home page script
// Last updated 22 June 2010

// highlights

            var rootId = 1;
            var linkString;
            var scrollMe = true;
            
             
            function showHighLight(id)        
                {   
                 
                    document.getElementById("fsCaption").innerHTML = factSheetGubbins[id - 1][1];   
                                        
                    elId = "url(/images/factsheets/f" + factSheetGubbins[id - 1][0] + ".jpg)";  
                    document.getElementById("stfcFacts").style.backgroundImage = elId;   

                }
                
            function changeHighLight()
                {
                    if (scrollMe == true)
                    {
                        rootId = rootId + 1;
                        if (rootId > factSheetCount)
                            {rootId = 1;}
                        showHighLight(rootId);   
                    }
                }
            
            setInterval("changeHighLight()", 5000) // was 15000
            
            function showNews(id)
                {

                    for (i = 1; i < 5; i++)
                        {
                            elId = "n" + i;
                            {document.getElementById(elId).style.display = "none";}
                        } 
                    
                    if (id > 0)
                        {
                            elId = "n" + id; 
                            document.getElementById(elId).style.display = "block";                    
                        } 
               
                }
                
            function pauseScroller()
                {
                if (scrollMe == true)
                    {scrollMe = false;                    
                     document.getElementById("scrollControl").src = "/images/system2/parts/fsStartNav2.jpg"
                     document.getElementById("scrollControl").alt = "Resume scrolling";
                     document.getElementById("scrollControl").title = "Resume scrolling";}
                else
                    {scrollMe = true;
                     document.getElementById("scrollControl").src = "/images/system2/parts/fsPauseNav2.jpg"
                     document.getElementById("scrollControl").alt = "Pause scrolling";
                     document.getElementById("scrollControl").title = "Pause scrolling"}
                }
            
            

// end highlights

