// not animated collapse/expand
function togglePannelStatus(content)
{
    var expand = (content.style.display=="none");
    content.style.display = (expand ? "block" : "none");
    toggleChevronIcon(content);
}

// current animated collapsible panel content
var currentContent = null;



function togglePannelAnimatingStatus(interval,
    step, max_height, step_height)
{
    var step_height_abs = Math.abs(step_height);

    // schedule next animated collapse/expand event
    if (step_height_abs>=step && step_height_abs<=(max_height-step))
    {
        step_height += step;
        currentContent.style.height = Math.abs(step_height) + "px";
        setTimeout("togglePannelAnimatingStatus("
            + interval + "," + step
            + "," + max_height + "," + step_height + ")", interval);
    }
    // animated expand/collapse done
    else
    {
        if (step_height_abs<step)
            currentContent.style.display = "none";
        currentContent.style.height = "";
        currentContent = null;
    }
}



function toggleOneLoad() {

    content1 = document.getElementById("Div1");
    content1.style.height = "0px";

}

function toggleTwoLoad() {
       
    content1 = document.getElementById("Div1");
    content2 = document.getElementById("Div2");
    content1.style.height = "0px";
    content2.style.height = "0px";

}

function toggleThreeLoad() {

    content1 = document.getElementById("Div1");
    content2 = document.getElementById("Div2");
    content3 = document.getElementById("Div3");
    content1.style.height = "0px";
    content2.style.height = "0px";
    content3.style.height = "0px";

}
 
 function toggleOne(contentS,content1S) {

    content = document.getElementById(String(contentS));
    content1 = document.getElementById(String(content1S));
    
        var interval = 50;
        var step = 50;
        
    content1.style.visibility = "hidden";
    
    //if (currentContent == null) {
        currentContent = content;
        var expand = (content.style.display == "none");
        if (expand)
            content.style.display = "block";
        var max_height = content.offsetHeight;

        var step_height = step + (expand ? 0 : -max_height);

       

        // schedule first animated collapse/expand event
        content.style.height = Math.abs(step_height) + "px";
        setTimeout("togglePannelAnimatingStatus("
            + interval + "," + step
            + "," + max_height + "," + step_height + ")", interval);
            
		
    //}
           
}

function toggleTwo(contentS, content2S, content3S, content4S) {

        content = document.getElementById(String(contentS));
        content2 = document.getElementById(String(content2S));
        content3 = document.getElementById(String(content3S));
        content4 = document.getElementById(String(content4S));
        
        var interval = 50;
        var step = 50;
        
        content2.style.height = 0 + "px";
        content3.style.visibility = "hidden";
        content4.style.visibility = "visible";

    
    //if (currentContent == null) {
        currentContent = content;
        var expand = (content.style.display == "none");
        if (expand)
            content.style.display = "block";
        var max_height = content.offsetHeight;

        var step_height = step + (expand ? 0 : -max_height);
       

        // schedule first animated collapse/expand event
        content.style.height = Math.abs(step_height) + "px";
        setTimeout("togglePannelAnimatingStatus("
            + interval + "," + step
            + "," + max_height + "," + step_height + ")", interval);
            
		
   // }
           
}

function toggleThree(contentS, content2S, content3S,content4S,content5S,content6S) {

    content = document.getElementById(String(contentS));
    content2 = document.getElementById(String(content2S));
    content3 = document.getElementById(String(content3S));
    content4 = document.getElementById(String(content4S));
    content5 = document.getElementById(String(content5S));
    content6 = document.getElementById(String(content6S));
    
        var interval = 50;
        var step = 50;

    content2.style.height = 0 + "px";
    content3.style.height = 0 + "px";
    
    content4.style.visibility = "hidden";
    content5.style.visibility = "visible";
    content6.style.visibility = "visible";
    
    //if (currentContent == null) {
        currentContent = content;
        var expand = (content.style.display == "none");
        if (expand)
            content.style.display = "block";
        var max_height = content.offsetHeight;

        var step_height = step + (expand ? 0 : -max_height);

        // schedule first animated collapse/expand event
        content.style.height = Math.abs(step_height) + "px";
        setTimeout("togglePannelAnimatingStatus("
            + interval + "," + step
            + "," + max_height + "," + step_height + ")", interval);
    //}



}