function popup_window(url,ww,wh) {
	w = ww || 500;
	h = wh || 400; 
	var dwin = window.open(url,'dwin','width='+w+',height='+h+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
	dwin.focus();
}
function popup_image(isrc,ititle) {
	popup_image_window=window.open('','popup_image','width=800,height=600,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=no,scrolling=no');
	popup_image_window.document.open();
	popup_image_window.document.write(	'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'
							+'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">\n'
							+'<head>\n'
							+'<title>'+((ititle=="") ? '&laquo;Новодел&raquo;' : ititle+'')+'</title>\n'
							+'<script type=\"text/javascript\">\n'
							+'	var isDOM=document.getElementById?true:false;\n'
							+'	var isOpera=isOpera5=window.opera && isDOM;\n'
							+'	var isMSIE=isIE=document.all && document.all.item && !isOpera;\n'
							+'	function matchSize(obj) {\n'
							+'		if (!isMSIE) {\n'
							+'			var dw = self.outerWidth - self.innerWidth;\n'
							+'			var dh = self.outerHeight - self.innerHeight;\n'
							+'			self.resizeTo(obj.width+dw,obj.height+dh);\n'
							+'		} else {\n'
							+'			if (document.documentElement && document.documentElement.clientHeight) {\n'
							+'				var w = document.documentElement.clientWidth;\n'
							+'				var h = document.documentElement.clientHeight;\n'
							+'			} else if (document.body) {\n'
							+'				var w = document.body.clientWidth;\n'
							+'				var h = document.body.clientHeight;\n'
							+'			}\n'						
							+'			var dw = obj.width - w;\n'
							+'			var dh = obj.height - h;\n'
							+'			window.resizeBy(dw, dh);\n'
							+'		}\n'
							+'		self.focus();\n'
							+'		return;\n'
							+'	}'
							+'</script>'
							+'</head>\n'
							+'<body style="overflow: hidden; margin: 0px; padding: 0px;">\n'
							+'<a href="javascript:void(0);" onclick="window.close(); return false;" title="Кликните, чтобы закрыть окно">'
							+'<img src="'+isrc+'" border="0" onload="matchSize(this);" alt="Кликните, чтобы закрыть окно" /></a>\n'
							+'</body>\n'
							+'</html>');
	popup_image_window.document.close();
}