<?php
//
// BBWA
// largeview.php
// 画像を実物大で表示する
// Teppei KAKU <teppei@sat.co.jp>
//

include("variables.php");

if (isset($_GET['img'])) {
  $imgUrl = $picUrl . $_GET['img'];
  $imgSize = getimagesize($dirName . $_GET['img']);
}
?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>BBWA : LargeView</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">


<?php

echo <<<EOD
<link rel="stylesheet" type="text/css" href="Themes/${theme}.css">
<script language="JavaScript">
<!--
var oWidth = ${imgSize[0]};
var oHeight = ${imgSize[1]};
var width = oWidth;
var height = oHeight;

sWidth = Math.min(oWidth + 60, screen.width * 0.9);
sHeight = Math.min(oHeight + 90, screen.height * 0.9);
window.resizeTo(sWidth, sHeight);

function imgZoomOut() {
  nWidth = width * 0.75;
  nHeight = height * 0.75;
  document.getElementById('imgId').style.width = nWidth;
  document.getElementById('imgId').style.height = nHeight;

  wWidth = Math.min(nWidth + 60, screen.width * 0.9);
  wHeight = Math.min(nHeight + 90, screen.height * 0.9);
  window.resizeTo(wWidth, wHeight);

  document.getElementById('zoomIn').style.display = 'inline';

  width = nWidth;
  height = nHeight;
}

function imgZoomIn() {
  document.getElementById('imgId').style.width = oWidth;
  document.getElementById('imgId').style.height = oHeight;

  wWidth = Math.min(oWidth + 60, screen.width * 0.9);
  wHeight = Math.min(oHeight + 90, screen.height * 0.9);
  window.resizeTo(wWidth, wHeight);

  document.getElementById('zoomIn').style.display = 'none';

  width = oWidth;
  height = oHeight;
}
// -->
EOD;

?>


</script>
</head>
<body class="top">
<table border="0" width="100%" class="top"
  cellspacing="0" cellpadding="0">
<tr><td nowrap>
<a href="JavaScript:window.close()">
<img src="Icons/icon_close.png" border="0" align="absmiddle">閉じる</a>
&nbsp;&nbsp;
<a href="JavaScript:opener.focus()">
<img src="Icons/icon_main.png" border="0" align="absmiddle">メインへ</a>
&nbsp;&nbsp;
<a href="JavaScript:imgZoomOut()">
<img src="Icons/icon_zoomout.png" border="0" align="absmiddle">小さく</a>
&nbsp;&nbsp;
<span id="zoomIn" style="display:none;">
<a href="JavaScript:imgZoomIn()">
<img src="Icons/icon_zoomin.png" border="0" align="absmiddle">実物大</a>
</span>
</td></tr></table>
<table border="0" align="center" style="margin:5px;">
<tr><td class="photoframe">


<?php
print("<img id=\"imgId\" src=\"${imgUrl}\" ${imgSize[3]} border=\"0\">");
?>


</a>
</td></tr>
</table>
</body>
</html>
