function enlarge(w,h,file){
     bigfoto=window.open("", "", "toolbar=no, scrollbars=no, width="+w+", height="+h+", top=0, left=0");
     bigfoto.location.href="/bigphoto.php?src="+file+"&w="+w+"&h="+h;
    }

function enlarge1(w,h,imgurl){
     bigfoto=window.open("", "", "toolbar=no, scrollbars=yes, top=0, left=0");
     bigfoto.document.open();
     bigfoto.document.write("<HTML> <HEAD> <TITLE> Новозыбков </TITLE>");
     bigfoto.document.write("<STYLE TYPE='text/css'>");
     bigfoto.document.write("BODY {margin-left: 0; border-left:0; padding-left:0;}");
     bigfoto.document.write("BODY {margin-right: 0; border-right:0; padding-right:0;}");
     bigfoto.document.write("BODY {margin-top: 0; border-top:0; padding-top:0;}");
     bigfoto.document.write("</STYLE>");
     bigfoto.document.write("</HEAD> <BODY>");
     bigfoto.document.write("<IMG SRC='"+imgurl+"' ALT='' WIDTH="+w+" HEIGHT="+h+">");
      bigfoto.document.write("<DIV STYLE='display: none'>");
     bigfoto.document.write('<a href="http://top100.rambler.ru/top100/"><img src="http://counter.rambler.ru/top100.cnt?451328" alt="" width=1 height=1 border=0></a>');
     bigfoto.document.write('<a href="http://www.bryansk.net.ru/brate/" target="_blank"><img src="http://www.bryansk.net.ru/counter.php?id=136&type=8"  border="0" width="88" height="31"></a>');
      bigfoto.document.write("</DIV>");
     bigfoto.document.write("</BODY></HTML>");
    }

function toggle(razdel){
       //if (nap == 1) { 
       //e=razdel
       //e.style.display == "none" ? e.style.display="block" :
        //        e.style.display="none"
      // }
		ee=document.getElementById(razdel);
		ee.style.display == "none" ? ee.style.display = "block" :
			ee.style.display = "none"
      }    

function menufunc(a, b, c){
	if ("item_"+selecteditem0 != "item_"+a) {
		var item = document.getElementById("item_"+a);
		var submenu = document.getElementById("menu_"+a);
		var subitem = document.getElementById("item_"+a+"_"+b);
		var subsubmenu = document.getElementById("menu_"+a+"_"+b);
		var subsubitem = document.getElementById("item_"+a+"_"+b+"_"+c);
		if (selecteditem0 != null) {
			var olditem = document.getElementById("item_"+selecteditem0);
			var oldsubmenu = document.getElementById("menu_"+selecteditem0);
			olditem.className = "menuitem_0";
			if (oldsubmenu != null) {
				oldsubmenu.style.display="none";
				if (selecteditem1 != null) {
					var oldsubitem = document.getElementById("item_"+selecteditem0+"_"+selecteditem1);
					var oldsubsubmenu = document.getElementById("menu_"+selecteditem0+"_"+selecteditem1);
					oldsubitem.className = "menuitem_1";
					if (oldsubsubmenu != null) {
						oldsubsubmenu.style.display = "none";
						if (selecteditem2 != null) {
							var oldsubsubitem = document.getElementById("item_"+selecteditem0+"_"+selecteditem1+"_"+selecteditem2);
							oldsubsubitem.className="menuitem_2";
							}
						}	
					}
				}	
			}
		item.className = "menuitem_0_active";
		if (submenu != null) {
			submenu.style.display = "block";
			if (subitem != null) {
				subitem.className = "menuitem_1_active";
				if (subsubmenu != null) {
					subsubmenu.style.display="block";
					if (subsubitem != null) {
						subsubitem.className = "menuitem_2_active";
						}
					}
				}
			}
		selecteditem0 = a;
		selecteditem1 = b;
		selecteditem2 = c;
		}
	else {
		var subitem = document.getElementById("item_"+a+"_"+b);
		var subsubmenu = document.getElementById("menu_"+a+"_"+b);
		var subsubitem = document.getElementById("item_"+a+"_"+b+"_"+c);
		if (selecteditem1 != null) {
					var oldsubitem = document.getElementById("item_"+selecteditem0+"_"+selecteditem1);
					var oldsubsubmenu = document.getElementById("menu_"+selecteditem0+"_"+selecteditem1);
					oldsubitem.className = "menuitem_1";
					if (oldsubsubmenu != null) {
						oldsubsubmenu.style.display = "none";
						if (selecteditem2 != null) {
							var oldsubsubitem = document.getElementById("item_"+selecteditem0+"_"+selecteditem1+"_"+selecteditem2);
							oldsubsubitem.className="menuitem_2";
							}
						}	
					}
		subitem.className = "menuitem_1_active";
		if (subsubmenu != null) {
					subsubmenu.style.display="block";
					}
		selecteditem0 = a;
		selecteditem1 = b;
		selecteditem2 = c;
		}
			
	}
		
	


	/* if (n==0) {
			m=n+1;
			var item = document.getElementById("menu"+n+"_"+razdel);
			var submenustring = document.getElementById("menu"+m+"_"+razdel);
			if (selecteditem0 != null) {
				var olditem0 = document.getElementById(selecteditem0);
				olditem0.className="menuitem_0";
				var oldsubmenustring = document.getElementById(selecteditem0)
				}
			selecteditem0 = item.id;
			if (selecteditem1 != null) {
				var olditem1 = document.getElementById(selecteditem1);
				olditem1.className="menuitem_1";
				}
			if (selecteditem2 != null) {
				var olditem2 = document.getElementById(selecteditem2);
				olditem2.className="menuitem_2";
				}
			item.className="menuitem_"+n+"_selected";
			if (submenustring != null) {
				submenustring.style.display = "block"
				}
				
		}	
	  }    
*/
	  
function comm(n) {
       e=n;
       e.style.display == "none" ? e.style.display="block" :
                e.style.display="none"
       ee=n.id+"l";
       document.all[ee].style.display == "none" ? document.all[ee].style.display="block" :
               document.all[ee].style.display="none"
    }

function comm1(n) {
       ee=document.getElementById(n+"l");
       ee.style.display == "none" ? ee.style.display="block" :
               ee.style.display="none"
    }
function wili(ob)
{ 
	e=document.getElementById(ob);
	e.style.color="white";
}


