function popupWindow(url , w , h) {
 
	var wWidth = w;
	var wHeight = h;

	isSafari3 = false;
	if(window.devicePixelRatio) isSafari3 = true;

	if(isSafari3){			
		wWidth = wWidth + 0;
		wHeight = wHeight + 4;
	}
	

	var sb = 'no';
	if (wWidth > screen.width)
	{
		wWidth = screen.width - 100;
		sb = 'yes';
	}
	if (wHeight > screen.height)
	{
		wHeight = screen.height - 200;
		sb = 'yes';
	}



	var IE = navigator.userAgent.indexOf("MSIE") >= 0;
	if (IE){
		IE7 = navigator.userAgent.indexOf("MSIE 7.0") >= 0;
	  if(!IE7){
			window.open(url, "imgWin", 'width=' + wWidth + ',height=' + wHeight + ',resizable=no,scrollbars='+sb+',toolbar=no,menubar=no');
			return;
	  }
	}
	

	wnd=window.open("", "imgWin", 'width=' + wWidth + ',height=' + wHeight + ',resizable=no,scrollbars='+sb+',toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
	wnd.document.write('<html><head><title></title></head><body style="margin:0; padding:0;">');
	//wnd.document.write('<div align="center" style="width:100%">');
	wnd.document.write('<a href="javascript:window.close();"><img src="' + url + '" width="' + w + '" height="' + h + '" border="0" alt="" /></a><br />');	
	//wnd.document.write('</div>');
	wnd.document.write('</body></html>');
	wnd.document.close();
	wnd.focus();
}


	function submit_form(theform , val) {		
				
		 sr = eval("document."+theform);
		 if(val) sr.what.value = 'zakaz';
		 sr.submit();
	}

	function menu_div(x){
		if(document.getElementById('d'+x).style.display == "block")
			document.getElementById('d'+x).style.display = "none";
		else
			document.getElementById('d'+x).style.display = "block"
	}