
window.onerror = null;
ok = document.images != null;

function SetImg(img,ref) {
	if (ok)	document.images[img].src = ref;
	return ok;
}

function w(pic) {
   var winwidth = screen.width;
   var winheight = screen.height;

	v=window.open ('', 'view','width='+winwidth+',height='+winheight+',fullscreen=yes,menubar=no,status=no,location=no,directories=no,scrolling=no,resizable=yes');
	with (v.document) {
		open ();
		write ('<html><head><title>изображение</title><meta http-equiv="imagetoolbar" content="no"></head><body style="background-color:#fff3d6;" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0><table width="100%" height="100%" cellpadding=0 cellspacing=0><td align="center"><a href="#" onClick="window.close()"><img src="'+pic+'" border=10 style="border-color:white;"></a></td></table></body></html>');
		close ();
	}
	v.focus();
	v.moveTo(0,0);
	return false;
}

