Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<script language="JavaScript" type="text/JavaScript">
function show_pic(picname,x,y,px,py) {
win=window.open("", 'picture','menubar=0,location=0,status=0,toolbar=0,scrollbars=0,resizable=0,height=' + y + ',width=' + x );
win.document.writeln("<body bgcolor=#ffffff topMargin='0' leftMargin='0' rightMargin='0'><center><table cellPadding=0 cellSpacing=0 width=100% height=100%><tr width=100% height=100%><td width=100% height=100% align=center valign=middle><a href='javascript:window.close()'><img src='" + picname + "' width=" + px +" height=" + py +" border=0 alt='Закрыть окно'></a></td></tr></table></body>");
}
</script>
<a href="javascript:show_pic('agents/003.jpg',800,600,800,600)"><img class="bord" src="agents/small/003.jpg" width="196" height="106" alt="Увеличить"></a>
function img_resize($src, $dest, $width, $height, $rgb=0xFFFFFF, $quality=100)
{
if (!file_exists($src)) return false;
$size = getimagesize($src);
if ($size === false) return false;
$format = strtolower(substr($size['mime'], strpos($size['mime'], '/')+1));
$icfunc = "imagecreatefrom".$format;
if (!function_exists($icfunc)) return false;
$x_ratio = $width / $size[0];
$y_ratio = $height / $size[1];
$ratio = min($x_ratio, $y_ratio);
$use_x_ratio = ($x_ratio == $ratio);
$new_width = $use_x_ratio ? $width : floor($size[0] * $ratio);
$new_height = !$use_x_ratio ? $height : floor($size[1] * $ratio);
$new_left = $use_x_ratio ? 0 : floor(($width - $new_width) / 2);
$new_top = !$use_x_ratio ? 0 : floor(($height - $new_height) / 2);
$isrc = $icfunc($src);
$idest = imagecreatetruecolor($width, $height);
imagefill($idest, 0, 0, $rgb);
imagecopyresampled($idest, $isrc, $new_left, $new_top, 0, 0, $new_width, $new_height, $size[0], $size[1]);
$icfunc($idest, $dest, $quality);
imagedestroy($isrc);
imagedestroy($idest);
return true;
}