var img_minus=new Image;
img_minus.src="../info/img/library/opendir.gif";

var img_plus=new Image;
img_plus.src="../info/img/library/dir.gif";

var img_show=new Image;
img_show.src="pictures/show.gif";

var img_hide=new Image;
img_hide.src="pictures/hide.gif";

IE=Check();

document.write ("<style>")

if (IE)
{
        document.write (".drop_down")
        document.write ("{")
        document.write ("visibility: hidden;")
        document.write ("display: none;")
        document.write ("padding-left: 20px;")
        document.write ("}")
}
else {
        document.write (".drop_down")
        document.write ("{")
        document.write ("visibility: visible;")
        document.write ("visibility: run-in;")
        document.write ("padding-left: 20px;")
        document.write ("}")
}

        document.write ("</style>")

function show(id,str,pic)
{

        if (!IE) return

        if ( pic == 1 )
        {
                img1=img_show
                img2=img_hide
        }
        else
        {
                img1=img_plus
                img2=img_minus
        }

        if (id.style.visibility=="visible")
        {
                id.style.visibility="hidden";
                id.style.display="none";
                document.images[str+"_img"].src=img1.src;
        }
        else
        {
                id.style.visibility="visible";
                id.style.display="block";
                document.images[str+"_img"].src=img2.src;
        }
}

function showSimple(id)
{
        if (id.style.visibility=="visible")
        {
                id.style.visibility="hidden";
                id.style.display="none";
        }
        else
        {
                id.style.visibility="visible";
                id.style.display="block";
        }

}

function open_new(FileName,Width,Height,Top,Left,NoRes,NoScr)
{

var str=""

        if ( Width > 0 )
        {
                str="width="+Width
        }
        if ( Height > 0 )
        {
                str+=str.length > 0 ? ",height="+Height:"height="+Height
        }
        if ( Top > 0 )
        {
                str+=str.length > 0 ? ",top="+Top:"top="+Top
        }
        if ( Left > 0 )
        {
                str+=str.length > 0 ? ",left="+Left:"left="+Left
        }
        //window.open(FileName,"s_win","width="+Width+",height="+200+",top="+Top+",left="+Left)
        if ( str.length <= 0 )
        {
                str="width="+screen.width-30+",height="+screen.height-30
        }
        if ( NoRes > 0 )
        {
                str+=str.length > 0 ? ",resizable=0":"resizable=0"
        }
        else {
                str+=str.length > 0 ? ",resizable=1":"resizable=1"
        }
        if ( NoScr > 0 )
        {
                str+=str.length > 0 ? ",scrollbars=0":"scrollbars=0"
        }
        else
        {
                str+=str.length > 0 ? ",scrollbars=1":"scrollbars=1"
        }
        //s_win = '';
        //if location.href="http://www.hydrosfera.ru/http://www.hydrosfera.ru" then
        window.open(FileName,"s_win",str).focus();


}

