﻿// MORE INFO DIV ROUTINES

        function changeMoreInfoDiv(){
            if (moreInfoDiv){
                if (moreInfoDiv.style.display == "none"){
                    moreInfoDiv.style.display = "block";
                    //expandMoreInfoDiv(0);
                }
                else{
                    moreInfoDiv.style.display = "none";
                    //closeMoreInfoDiv(MoreInfoHeight);
                }
            }
        }
        
        function expandMoreInfoDiv(h){
            if (moreInfoDiv){
                moreInfoDiv.style.display = "block";
                moreInfoDiv.style.height = (h >= 0) ? h : 0 + "px";
                setOpacity(moreInfoDiv, 100 * h / MoreInfoHeight);
                if (h <= MoreInfoHeight && h >= 0){
                    var incr = MoreInfoHeightIncrement - (MoreInfoHeightIncrement * h / MoreInfoHeight);
                    if (incr < 1)
                        incr = 1;
                    else
                        if (incr > MoreInfoHeightIncrement)
                            incr = MoreInfoHeightIncrement;
                    setTimeout("expandMoreInfoDiv(" + (h + incr).toString() + ");", TimeoutValue);
                }
                else{
                        moreInfoDiv.style.height = MoreInfoHeight + "px";
                        setOpacity(div, 100);
                    }
            }
        }
        
        function closeMoreInfoDiv(h){
            if (moreInfoDiv){
                moreInfoDiv.style.display = "block";
                moreInfoDiv.style.height = (h >= 0) ? h : 0;
                setOpacity(moreInfoDiv, 100 * h / MoreInfoHeight);
                if (h <= MoreInfoHeight && h >= 0){
                    var incr = MoreInfoHeightIncrement - (MoreInfoHeightIncrement * h / MoreInfoHeight);
                    if (incr < 1)
                        incr = 1;
                    else
                        if (incr > MoreInfoHeightIncrement)
                            incr = MoreInfoHeightIncrement;                    
                    setTimeout("closeMoreInfoDiv(" + (h - incr).toString() + ");", TimeoutValue);
                }
                else{
                        moreInfoDiv.style.height = MoreInfoHeight;
                        setOpacity(moreInfoDiv, 0);
                        moreInfoDiv.style.display = "none";
                    }
            }
        }


