window.onresize= correct;
window.onload= initcorrect;
mline1 = new Image(158,1);
mline2 = new Image(158,1);
mline1.src = "/images/menuline1.gif";
mline2.src = "/images/menuline2.gif";
mugol1 = new Image(158,1);
mugol2 = new Image(158,1);
mugol1.src = "/images/menuugol1.gif";
mugol2.src = "/images/menuugol2.gif";

function correct() {
	var w;
	if (elem.hasChildNodes(elemOld)) elem.removeChild(elemOld);
	w=( window.innerWidth ) ? window.innerWidth : document.body.clientWidth ;
	if (w<770) {
		document.resiser.width=130;
	} else	if (w<994) {
		document.resiser.width=w-640;
	} else {
		document.resiser.width=354;
	}
 if (w>860) elem.appendChild(elemOld);
}
function initcorrect () {
	elemOld=document.getElementById('ch');
	elem=elemOld.parentNode;
	correct();
}
function open_Picture(id, name, w, h, title) {
	vvv=open('',id+'pic', 'width='+w+',height='+h+', top=40, left=50, toolbar=0, location=0, directories=0, status=0,menuBar=0,scrollBars=0,resizable=1'); 
	vvv.document.write('<html><head><title>'+title+'</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>'); 
	vvv.document.write('<img border=0  ondblclick="window.close();" alt="Окно закрывается по двойному щелчку" src="'+name+'"  width='+w+' height='+h+'>');
	vvv.document.write('</body></html>'); 
	vvv.document.close(); 
	vvv.focus();
}

