function display_menu (id)  {
    if (id!='') {
        hidden_menu (1);
        document.getElementById('alpha_black2').style.display='block';
        document.getElementById(name_str + id).style.display='block';
        current_id = id;
    }
}
            
function hidden_menu (id) {
    if (current_id>0) {
        document.getElementById('alpha_black2').style.display='none';
        document.getElementById(name_str + current_id).style.display='none';
    }
    if  (id!=1 && start_id!='') {
        document.getElementById('alpha_black2').style.display='block';
        document.getElementById(name_str + start_id).style.display='block';
        current_id = start_id;
    }
}

function popUp(imgPath,imgWeight,imgHeight){
	imgW=imgWeight;
	imgH=imgHeight;
	myFotWin=open("","","height="+imgH+",width="+imgW+",top=50,left=50,toolbar=no,status=yes,menubar=no,resizable=yes,scrollbars=no");
	myFotWin.document.open();
	myFotWin.document.write("<html><head><title>:: Images </title>");
	myFotWin.document.write("<style>a{text-decoration:none; font:bold 11px Verdana,Arial,sans-serif; color:#999999; display:block; text-align:center;} a:hover {text-decoration:underline;}</style>");
	myFotWin.document.write("<script>function getImgSize() {");
	myFotWin.document.write("var a,b; a=document.images['myImg'].width;");
	myFotWin.document.write("b=document.images['myImg'].height; b=b+70; self.resizeTo(a,b);};");
	myFotWin.document.write("</script></head>");
	myFotWin.document.write("<body leftMargin='0' topMargin='0' marginheight='0' marginwidth='0' align=center>");
	myFotWin.document.write('<img src="' + imgPath + '" border=0 name="myImg" align=center onload="getImgSize();"><br>');
	myFotWin.document.write("<a href='javascript:close();' title='закрыть окно'>");
	myFotWin.document.write("<div width=100%>Закрыть окно</div></a>");
	myFotWin.document.write("</body></html>");
	myFotWin.document.close();
}

function checkPoleSearch(form){
	if (form.q.value=='Поиск') {form.q.value='';} 
	else if (form.q.value=='') {form.q.value='Поиск';}
}