// 新規ウィンドウ（商品）
function openWindow(imgNum) {
	zwin = window.open("", "zoom", "scrollbars=no,resizable=no,width=500,height=500");
	zwin.document.open();
	zwin.document.write(
		"<html>\n",
		"<head>\n",
		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n",
		"<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\n",
		"<title>" + imgNum + "<\/title>\n",
		"<\/head>\n",
		"<body style=\"margin:0; padding:10px; text-align:center\">\n",
		"<p style=\"margin:0; padding:0\">\n",
		"<img src=\"img/" + imgNum + ".jpg\" alt=\"" + imgNum + "\" />\n",
		"<\/p>\n",
		"<\/body>\n",
		"<\/html>"
	);
	zwin.document.close();
	zwin.focus();
}


// 新規ウィンドウ（画像）
function openImg(imgPath, w, h) {
	zwin = window.open("", "zoom", "scrollbars=yes,resizable=no,width="+w+",height="+h);
	zwin.document.open();
	zwin.document.write(
		"<html>\n",
		"<head>\n",
		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n",
		"<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\n",
		"<title>" + imgPath + "<\/title>\n",
		"<\/head>\n",
		"<body style=\"margin:0; padding:0px; text-align:center\">\n",
		"<p style=\"margin:0; padding:0\">\n",
		"<img src=\"img/" + imgPath + "\" alt=\"" + imgPath + "\" />\n",
		"<\/p>\n",
		"<\/body>\n",
		"<\/html>"
	);
	zwin.document.close();
	zwin.focus();
}


// カタログ
function MM_openBrWindow(theURL,winName,popupwidth,popupheight) { //v2.0
  if (navigator.userAgent.indexOf('Safari') >= 0) {
    window.open(theURL,winName,'width=' + (popupwidth + 1) + ',height=' + (popupheight + 1));
  } else {
    window.open(theURL,winName,'width=' + popupwidth + ',height=' + popupheight);
  }
}
