function showKnown(){
    try{
	el = document.getElementById('known');
        el.style.display = "block";
   }
    catch (error){
//        alert(error.message);
    }
    finally{
        return false;
    }
}

function hideKnown(){
    try{
	el = document.getElementById('known');
        el.style.display = "none";
   }
    catch (error){
//        alert(error.message);
    }
    finally{
        return false;
    }
}


function showHide(id, id2){
    try{
	el = document.getElementById(id);
        el.style.display = el.style.display == "none" ? "block" : "none";

	el2 = document.getElementById(id2);
        el2.className = el2.className== "filter_btn expanded" ? "filter_btn collapsed" : "filter_btn expanded";

    }
    catch (error){
        alert('11');
    }
    finally{
        /* Это чтоб страница не дёргалась - отменяем стандартное поведение ссылки с href="#" */
        return false;
    }
}

function ImgShw(ID, width, height){

//width = 900;
//height = 600;
var scroll = "no";
var top=0, left=0;
if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
width = Math.min(width, screen.width-10);
height = Math.min(height, screen.height-28);


var wnd = window.open("#","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);

wnd.document.write("<html><head>\n");
wnd.document.write("<"+"script language='JavaScript'>\n");
wnd.document.write("<!--\n");
wnd.document.write("function KeyPress()\n");
wnd.document.write("{\n");
wnd.document.write("	if(window.event.keyCode == 27)\n");
wnd.document.write("		window.close();\n");
wnd.document.write("}\n");
wnd.document.write("//-->\n");
wnd.document.write("</"+"script>\n");
wnd.document.write("<title>Просмотр изображения</title></head>\n");
wnd.document.write("<body style='text-align: center' topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">\n");
wnd.document.write("<img src=\"img.phtml?image="+ID+"&w="+width+"&h="+height+"\" border=\"0\">");
wnd.document.write("</body>");
wnd.document.write("</html>\n");

}

