var strType;
var strPhoto;
var exDB = new Array();
myImg = new Image();
myImg.src = "../images/but2.gif";
photoPath = "photos/";
cols = 7;
winW = 450;
winH = 450;
function ShowPhoto(strType,strPhoto){
	pstL = screen.availWidth - winW;
	pstT = screen.height - screen.availHeight;
	stOp = "status=1, scrollbars=1";
	stOp+= ", width="  + winW;
	stOp+= ", height=" + winH;
//	stOp+= ", left="   + pstL;
//	stOp+= ", top="    + pstT;
	var PhotoWin = window.open("", "PhotoWindow", stOp);
	PhotoWin.focus();
	with(PhotoWin.document){
		open("text/html");
		PhotoWin.status = "開いています";
		write("<HEAD>");
		write("<TITLE>" + strType + "</TITLE>");
		write("<LINK REL='StyleSheet' TYPE='text/css' HREF='list_style.css'>");
		write("</HEAD>");
		write("<BODY>");
		write("<DIV><B>" + strType + "</B></DIV>");
		write("<HR NOSHADE><CENTER><IMG SRC='" + photoPath + strPhoto + "' WIDTH='380'>");
		write("</CENTER><HR NOSHADE>");
		write("<A HREF='javascript:close()' TITLE='このウィンドウを閉じます'>");
		write("<IMG BORDER='0' SRC='../images/back.gif' WIDTH='20' HEIGHT='20'>");
		write("<B> 閉じる</B></A>");
		write("</BODY>");
		close();
	}
	PhotoWin.status = "ページが表示されました";
}
function PrintData(){
	i = 0;
	with(document){
		write("<TR CLASS='aichigreen'>");
		for( j=i; j<=i+5; j++ )	write("<TH>" + exDB[j] + "</TH>");
		write("<TH>" + exDB[i+6] + "</TH>");
		write("</TR>");
		i+=cols;
		while( exDB[i] != "end" ){
			write("<TR CLASS='lightgray'>");
			for( j=i; j<=i+1; j++ ) write("<TD>" + exDB[j] + "</TD>");
			if (exDB[i+2]!=""){
				docwr = '<TD><INPUT TYPE="button" VALUE="写真" onClick="ShowPhoto(';
				docwr += "'" + exDB[i+1] + "','" + exDB[i+2] + "'";
				docwr += ')"></TD>';
				write(docwr);
			}
			else {
				write("<TD>　</TD>");
			}
			for( j=i+3; j<=i+5; j++ ) write("<TD>" + exDB[j] + "</TD>");
			write("<TD ALIGN='left'>" + exDB[i+6] + "</TD>");
			write("</TR>");
			i+=cols;
		}
	}
}