function toggleDiv(divid)
{
	if(document.getElementById(divid).style.display == 'none')
	{
		document.getElementById(divid).style.display = 'block';
		
		var sMinus = 'shrink.gif';			
		var id = divid.replace('Div','Img');
		
		setimage(id, sMinus)
	}
	else
	{
		document.getElementById(divid).style.display = 'none';
		
		var sPlus  = 'expand.gif';
		var id = divid.replace('Div','Img');
		
		setimage(id, sPlus)
	}
}

function expandAll() 
{
    if (typeof divId_List != "undefined") 
    {
        for (i in divId_List) {
            if (divId_List[i] != 0) {
                document.getElementById('Div' + divId_List[i]).style.display = "block";

                var sMinus = 'shrink.gif';
                var id = 'Img' + divId_List[i];

                setimage(id, sMinus);
            }
        }
    }
}

function shrinkAll() 
{
    if (typeof divId_List != "undefined") 
    {
        for (i in divId_List) {
            if (divId_List[i] != 0) {
                if (document.getElementById('Div' + divId_List[i]) != null) {
                    document.getElementById('Div' + divId_List[i]).style.display = "none";

                    var sPlus = 'expand.gif';
                    var id = 'Img' + divId_List[i];

                    setimage(id, sPlus)
                }                
            }
        } 
    }	
} 

function changeimage(id, sMinus, sPlus)
{
    var img = document.getElementById(id);
    if (img!=null)
    {
        var bExpand = img.src.indexOf(sPlus) >= 0;
	    if (!bExpand)
		    img.src = 'Images/' + sPlus;
	    else
		    img.src = 'Images/' + sMinus;
    }
}

function setimage(id, sImage)
{
    var img = document.getElementById(id);
    if (img!=null)
    {
        img.src = 'Images/' + sImage;
    }
}
