﻿        function onClick(o){
            var name = o.id;
            var div = document.getElementById(name + "Div");
            if (div.style.display == 'none'){
                div.style.display = '';
                o.src = "Images/upArrow.png"
                return;
                }
            else{
                div.style.display = 'none';
                o.src = "Images/downArrow.png"
                return;
                }
        }
        
        function onLoad(){
            document.getElementById("upcomingEventsDiv").style.height = 0;
        }
        
        function onMouseIn(o){
        // Add 1 to the filename
        var src = o.src;
        var firstHalf = src.substring(0,src.lastIndexOf("."));
        var secondHalf = src.substring(src.lastIndexOf("."), src.length);
        var filename = firstHalf+ "1" + secondHalf;
        o.src = filename;
        }
        
        function onMouseOut(o){
        // Remove 1 from the filename
        var src = o.src;
        var firstHalf = src.substring(0,src.lastIndexOf(".")-1);
        var secondHalf = src.substring(src.lastIndexOf("."), src.length);
        var filename = firstHalf+ secondHalf;
        o.src = filename;
        }
        
        function redirect(o){
        if (o == "index"){location.href='index.html';}
        if (o == "events"){location.href='Events.html';}
        if (o == "joinus"){location.href='Joinus.html';}
        if (o == "news"){location.href='News.html';}
        if (o == "members"){location.href='Members.html';}
        if (o == "contactus"){location.href='Contactus.html';}
        }