
      
      function setUpRollovers() {
        if (!document.getElementsByTagName ||
            !document.getElementById)
            return;
        
        //get all list items that will contain links 
        var all_links = document.getElementsByTagName('a');

        for( var i = 0; i < all_links.length; i++ ) {
        
          var theLink = all_links[i];
         
          if ( theLink.className &&     (' ' + theLink.className + ' ' ).indexOf(' accordion ') != -1  )  {
            
                 fs_addEvent(theLink,'mouseover',mouseover,false);
                 fs_addEvent(theLink,'mouseout',mouseout,false);
                 fs_addEvent(theLink,'click',accordionClicker,false);
                  
                  
                   
          }  
          else if ( theLink.className &&    (' ' + theLink.className + ' ' ).indexOf(' accordion_home ') != -1 )
          {
                            
                  fs_addEvent(theLink,'mouseover',mouseover,false);
              fs_addEvent(theLink,'mouseout',mouseout,false);
                 
                 /*
                 //the only child of the a tag will be an image
                        var Tag = theLink.firstChild;
                        //look for an img src of 'somthing.ext' and replace the img src attribute with 'something_on.ext'
                         //modified - Josh Tischer
                        // had to swap out a .png for _on.jpg
                         //- IE uses the fixpng.js file to change the .png file to a background image in a style of a SPAN tag
                          
                        if(   Tag.nodeName   == "IMG" &&  Tag.src.indexOf('_on.jpg') = -1 )
                        {
                         Tag.src =  Tag.src.replace(/(\.[^.]+)$/,'_on.jpg');
                        }
                        else if(   Tag.nodeName   == "SPAN" &&  Tag.style.cssText.indexOf('_on.jpg') = -1)
                        {
                             
                            Tag.style.cssText = Tag.style.cssText.replace(".png", "_on.jpg");
                        }
                        */
                        
         }
              
          
        
        }//var i = 0; i < all_links.length; i++
        
      }//eof
      
     
        
    
      function mouseovera(e) {
       ex16.seekTo(1);
        
         
 
      }//oef
      
       function mouseouta(e) {
     ex16.seekTo(0);
       
        
      }//oef
    
    
      function mouseover(e) {
      /* alert("Bez matiw");*/
        var target = findTarget(e,'a');
          //alert(target);
        if(!target) return;

        //the only child of the a tag will be an image
        var Tag = target.firstChild;
 
 
        //look for an img src of 'somthing.ext' and replace the img src attribute with 'something_on.ext'
         /*modified - Josh Tischer
         had to swap out a .png for _on.jpg
         - IE uses the fixpng.js file to change the .png file to a background image in a style of a SPAN tag
         */
        if(   Tag.nodeName   == "IMG" )
        {
        if(!window.ie6){
         Tag.src =  Tag.src.replace(/(\.[^.]+)$/,'_on.jpg');
         }
        }
        else if(   Tag.nodeName   == "SPAN" )
        {

            Tag.style.cssText = Tag.style.cssText.replace(".png", "_on.jpg");
        }
         accordionClicker(e);
         
 
      }//oef
      
       function mouseout(e) {
       
        var target = findTarget(e,'a');
        if(!target) return;
        
        //the only child of the a tag will be an image
        var  Tag = target.childNodes[0];
        
        //look for an img src of 'somthing_on.ext' and replace the img src attribute with 'something.ext'
 
         /*modified - Josh Tischer
         had to swap out a .png for _on.jpg
         - IE uses the fixpng.js file to change the .png file to a background image in a style of a SPAN tag
         */
        if(   Tag.nodeName   == "IMG" )
        {
            if(!window.ie6){
                Tag.src = Tag.src.replace(/_on(\.[^.]+)$/,'.png');
            }
        }
        else if(   Tag.nodeName   == "SPAN" )
        {
             
            Tag.style.cssText = Tag.style.cssText.replace("_on.jpg", ".png");
        }
        
        
        
      }//oef
    
    
       function clicker(e) {
       
        var target = findTarget(e,'a');
        if(!target) return;
        
        //the only child of the a tag will be an image
        var imgTag = target.childNodes[0];
        
        //look for an img src of 'somthing_on.ext' and replace the img src attribute with 'something.ext'
        imgTag.src = imgTag.src.replace(/_over(\.[^.]+)$/,'$1');
        
      }//oef
      
      

        //on click event for the left navigation shows and hides acordian menu
      function accordionClicker(e) {
       
           var numAccordMenus = 3;
        var target = findTarget(e,'a');
        var found ="";
        //this variable is used to hide all of the menus but the current one.
        //if you want to allow all of the accordion menus to show at the same time
        //set this var to false
        var  hideAccordionMenus = true; 
        
          //alert(target);
        if(!target) return;
 
          
        if(target.className == 'accordion_home' )
        {    target.className = "accordion"; }
        else
        {target.className = "accordion_home"; }
        // get the element that contains the navigation to show
        var parent = document.getElementById(  "sub"+target.id.replace("main","") );
         var mainNav = document.getElementById('nav');
         
                //look for sub nodes
               if( parent && parent.className.toLowerCase().indexOf('left_nav') >=0 &&
                    parent.childNodes &&
                 parent.childNodes.length >= 1 ) 
                { 
                    if( hideAccordionMenus )
                    {
                                 
                        
                        //loop through all of the menus nodes 
                                    for( var k = 0; k < mainNav.childNodes.length; k++ )
                                    {     
                                    curNode = mainNav.childNodes[k];
                                                //find the first list item to look in
                                                  if(curNode.nodeName == "LI")
                                                 {    //next check if it has a link 
                                                     if(curNode.firstChild.nodeName.toLowerCase() == 'a')
                                                     {
                                                         //reset all of the main navs class's back to accordion except the 
                                                         //one being clicked on
                                                        if( curNode.firstChild.id.toLowerCase().indexOf('main') != -1 &&
                                                            curNode.firstChild.id.toLowerCase() != target.id.toLowerCase() &&                                     
                                                            curNode.firstChild.className == 'accordion_home' )
                                                        {    curNode.firstChild.className = "accordion"; }
                                                        /*else if(curNode.childNodes[k].className == 'accordion' )
                                                        {curNode.childNodes[k].className = "accordion_home"; }*/
                                                     }
                                                 
                                                 }
                                     
                                     
                                    }// childnodes loop
                         
                        
                            //get the parent which should be the node that holds the entire menu
                            menu = parent.parentNode;
                            //loop through all of the menus child nodes
                            for(var z =0; z< menu.childNodes.length;z++)
                            {    
                                 curNode= menu.childNodes[z];
                                 
                                  
                                // check to see if the child is a div, if so then check its class then compare
                                // to make sure its not the Current NODE - The current one being clicked on
                                if( curNode.nodeName.toLowerCase() =='div' && 
                                    curNode.id.toLowerCase().indexOf('sub') != -1 &&
                                    parent.id.toLowerCase() != curNode.id.toLowerCase())
                                {    
                                 
                                  
                                 
                                    //loop through all of the menus nodes 
                                    for( var k = 0; k < curNode.childNodes.length; k++ )
                                    {    
                                        
                                        //find the main category Link tag
                                        if(curNode.childNodes[k].nodeName.toLowerCase() == 'a')
                                        {
                                                if(curNode.childNodes[k].className == 'accordion_home' )
                                                {    curNode.childNodes[k].className = "accordion"; break;}
                                                /*else if(curNode.childNodes[k].className == 'accordion' )
                                                {curNode.childNodes[k].className = "accordion_home"; }*/
                                        }
                                    
                                        //find the UL element 
                                        if(   curNode.childNodes[k].nodeName.toLowerCase() == 'ul')
                                        {
                                             
                                            found = curNode.childNodes[k];
                                             //hide menus other than the current one
                                            found.style.display = "none"; 
                                            found.style.visibility = 'hidden';
                                            found.style.left="-1000px";
                                             
                                             
                                        }// end if UL
                                    }// childnodes loop
                                     
                                }// if node is DIV and index of sub
                                 
                            }//end childnodes menu loop
                    }// Hide Accordion Menus
                    
                    
                 //look for sub nodes that contain UL and change their style so the sub menu displays
                 for(var k = 0; k< parent.childNodes.length; k++)
                 {
                     if( parent.childNodes[k].nodeName.toLowerCase() == 'ul')
                    {
                         
                        found = parent.childNodes[k];
                         found.style.display = "block";
                        found.style.visibility = "visible";
                        found.style.left="0px"; 
                        break;
                        
                         
                          
                        
                        
                    }
                 }
            }//if(parent.childNodes &&
         
          
      }//oef
      
       
      // load the rollovers event handler
      fs_addEvent(window,'load',setUpRollovers,false);