﻿// JScript File

function confirmDelete()
    {
       return confirm("Bạn có thật sự muốn xóa ?");
    }
    
    function collapse(aDiv)
    {
        try
        {
            if (aDiv.style.display == "none")
                aDiv.style.display = "block";
            else
                aDiv.style.display = "none";
        }
        catch(e)
        {
        }
    }
function togglediv(selectDiv,aDiv)
{ 
    try
    {
        if (aDiv.style.display == "none")
        {
            aDiv.style.display = "block";
            selectDiv.className = "moigioi_title_on";
            
        }
        else
        {
            aDiv.style.display = "none";
            selectDiv.className = "moigioi_title_off";
            
        }    
    }
    catch(e)
    {
    }
}
function toggledivCondition(aDiv1,aDiv2,aDiv3,collapseBox1,collapseBox2,collapseBox3,val)
{
    try
    {
        
        if(val=="1")
        {  
           
            if (collapseBox1 != null){
            
            collapseBox1.src =  "Images/arrow_right.gif";
            //alert(collapseBox1.src);
            }
            
             if (aDiv2 != null){
            aDiv2.style.display = "none";
            }

            if (aDiv3 != null){
            aDiv3.style.display = "none"; 
            }         
        }else if(val=="2")
        {
            if (collapseBox2 != null){
            collapseBox2.src =  "Images/arrow_right.gif";
            }
            if (aDiv1 != null){
            aDiv1.style.display = "none";
            }
             if (aDiv3 != null){
            aDiv3.style.display = "none";  
            }        

        }else if(val=="3")
        {
            if (collapseBox3 != null){
            collapseBox3.src =  "Images/arrow_right.gif";
            }
            if (aDiv1 != null){
            aDiv1.style.display = "none";
            }
             if (aDiv2 != null){
            aDiv2.style.display = "none"; 
            }         
        }        
    }
    catch(e)
    {
    }
}