
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function ChangeClass(objname, newclass)
    { 
        if (document.getElementById) 
        {
            document.getElementById(objname).className = newclass;
        }
    } 



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function HideShow(objname)
    { 
        if (parseInt(navigator.appVersion) >= 5 || navigator.appVersion.indexOf["MSIE 5"] != -1) 
        {
            if (document.getElementById(objname).style.display=="block") 
                document.getElementById(objname).style.display="none";
            else
                document.getElementById(objname).style.display="block";
        }
    } 



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function JustShow(objname) 
    { 
        if (parseInt(navigator.appVersion) >= 5 || navigator.appVersion.indexOf["MSIE 5"] != -1) 
        {
            document.getElementById(objname).style.display="block";
        }
    } 






    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function JustHide(objname) 
    { 
        if (parseInt(navigator.appVersion) >= 5 || navigator.appVersion.indexOf["MSIE 5"] != -1) 
        {
            document.getElementById(objname).style.display="none";
        }
    } 



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function imgToggle(imgName,strOnExt,strOffExt) {
        if (document.images) {
            if (strOnExt.length > 0)  
            {
                document[imgName].src = eval(imgName + strOnExt + ".src"); 
            } 
            else 
            {
                document[imgName].src = eval(imgName + strOffExt + ".src"); 
            }
        }
    }



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function containsDOM (container, containee) {
        var isParent = false;
        do {
            if ((isParent = container == containee))
            break;
            containee = containee.parentNode;
        }
        while (containee != null);
        return isParent;
    }



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function checkMouseEnter (element, evt) {
        if (element.contains && evt.fromElement) {
            return !element.contains(evt.fromElement);
        }
        else if (evt.relatedTarget) {
            return !containsDOM(element, evt.relatedTarget);
        }
    }



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function checkMouseLeave (element, evt) {
        if (element.contains && evt.toElement) {
            return !element.contains(evt.toElement);
        }
        else if (evt.relatedTarget) {
            return !containsDOM(element, evt.relatedTarget);
        }
    }



    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



    function toggleMenu(Menu) {
        JustHide("divRestaurantMenu");
        JustHide("divStoreMenu");
        JustHide("divServiceMenu");
        JustHide("divCommunityMenu");
        JustHide("divParkMenu");
        if (Menu) {
                JustShow(Menu);
        }
    }
    
    
    function ClickDogGalleryList(listObj){
        if(!(listObj.options[listObj.selectedIndex].value == '')){
            window.location.href = listObj.options[listObj.selectedIndex].value;
        }
    }



    // from http://www.dynamic-tools.net/toolbox/isMouseLeaveOrEnter/
    // this function determines whether the event is the equivalent of the microsoft 
    // mouseleave or mouseenter events. 
    function isMouseLeaveOrEnter(e, handler) 
    { 
        if (e.type != 'mouseout' && e.type != 'mouseover') return false; 
        var reltg = e.relatedTarget ? e.relatedTarget : 
        e.type == 'mouseout' ? e.toElement : e.fromElement; 
        while (reltg && reltg != handler) reltg = reltg.parentNode; 
        return (reltg != handler); 
    }
    
    
    function popBubble() {
        // placeholder; this is over-ridden within the MeetTheDogs page.  There, it will populate the speech bubble with dog info
    }

    function setOnState(id, imgSrc) {
        var element = document.getElementById(id);
        element.src = imgSrc;
        element.onmouseover = null;
        element.onmouseout = null;
    }
