//////////////////////////////////////////////////////////////////////////
// Открывает/закрывает все сообщение
// todo: 1 - expand, 0 - collapse;
function openAll( todo)
{
    if( todo)
    {
        stylename="block";
        imname="i/i_close.gif";
    }
    else
    {
        stylename="none";
        imname="i/i_open.gif";
    }
    divColl = document.getElementsByTagName("div");
    for (i = 0; i < divColl.length; i++) 
    {
        if (divColl[i].className == "child") 
        {
            id = divColl[i].id;
            el = id.substring(0, id.length-5);
            whichIm = document.getElementById(el+"Img");
            divColl[i].style.display = stylename;
            whichIm.src = imname;
		}
    }
}
//////////////////////////////////////////////////////////////////////////
function expandIt(el) 
{ 
	whichEl = document.getElementById(el + "Child");
	whichIm = document.getElementById(el + "Img");
    if (whichEl.style.display == "none" || whichEl.style.display=="") 
    {
		whichEl.style.display = "block";
		whichIm.src = "i/i_close.gif";
    }
    else 
    {
		whichEl.style.display = "none";
		whichIm.src = "i/i_open.gif";
    }
    event.cancelBubble = true;
}

function expandIt2(el) 
{ 
	whichEl = document.getElementById(el + "Child");
//	whichIm = document.getElementById(el + "Img");
    if (whichEl.style.display == "none" || whichEl.style.display=="") 
    {
		whichEl.style.display = "block";
//		whichIm.src = "/i/i_close.gif";
    }
    else 
    {
		whichEl.style.display = "none";
//		whichIm.src = "/i/i_open.gif";
    }
//    event.cancelBubble = true;
}
//////////////////////////////////////////////////////////////////////////
with (document) 
{
	var bV = parseInt(navigator.appVersion);
	var hide = ( (bV >= 4) 
				&& (navigator.appName.indexOf('Netscape') == -1)
				&& (navigator.userAgent.indexOf('Opera') == -1)) ? true: false;
	write("<STYLE TYPE='text/css'>");
	if (hide)
    {
		write(".parent {text-decoration: none; position: relative;}");
		write(".child {text-decoration: none; display: none;}");
		write(".imag {cursor: hand;}");
	}
	write("</STYLE>");
}
