this.contentarea = new contentarea();

function contentarea()
{

    var current = null;

    function toggleLearnMoreFunction(element)
    {
        var learnmore = element.parentNode.parentNode.getElementsByTagName("div")[1];
        
        if (current != null)
        {
            current.id = "fadeout";
            fadeOutFunction(1, .1);
        }
        
        if (current != learnmore)
        {    
            current = learnmore;
            learnmore.style.display = "block";
            fadeInFunction(0, .1);
        }
        else
            current = null;
    }
    
    function fadeInFunction(value, increment)
    {
        if (value < 1)
        {
            value += increment;
            current.style.opacity = value;
            current.style.filter = "alpha(opacity=" + (value * 100) + ")";
            window.setTimeout("contentarea.fadeIn(" + value + ", " + increment + ")", 50);            
        }
    }
    
    function fadeOutFunction(value, increment)
    {
        var element = document.getElementById("fadeout");
        value -= increment;
        element.style.opacity = value;
        element.style.filter = "alpha(opacity=" + (value * 100) + ")";
            
        if (value > 0)
        {
            window.setTimeout("contentarea.fadeOut(" + value + ", " + increment + ")", 50);
        }
        else
        {
            element.id = "";
            element.style.display = "none";

        }
    }
    
    this.fadeIn = fadeInFunction;
    this.fadeOut = fadeOutFunction;
    this.toggleLearnMore = toggleLearnMoreFunction;

}
