function Open_ImgSubWindow(features,img) {
	var Window;
	var IMGSIZE = features;
	var widthX,heightY;
	var error = 0;
	var WWidth = window.screen.width;
	var WHeight = window.screen.height;
	var winX;
	var winY

	if (navigator.appVersion.indexOf("Win")!=-1){ //WINの時
		if ((navigator.appName == "Microsoft Internet Explorer")&&(parseInt(navigator.appVersion.substring(22,26))>=4.0)) {
			widthX = 0;
			heightY = 0;
		}
		else if ((navigator.appName == "Netscape")&&(parseInt(navigator.appVersion.substring(0,3))>=4.0)) {
			widthX = 0;
			heightY = 0;
		} else {
			widthX = 0;
			heightY = 0;
			error = 1;
		}
	}
	else if(navigator.appVersion.indexOf("Mac")!=-1) { //MACの時
		if ((navigator.appName == "Microsoft Internet Explorer")&&(parseInt(navigator.appVersion.substring(22,26))>=4.0)) {
			widthX = 16;
			heightY = 14;
		}
		else if ((navigator.appName == "Microsoft Internet Explorer")&&(parseInt(navigator.appVersion.substring(22,26))>=5.0)){
			widthX = 16;
			heightY = 16;
		}
		else if ((navigator.appName == "Netscape")&&(parseInt(navigator.appVersion.substring(0,3))>=4.0)){
			widthX = 0;
			heightY = 0;
		} else {
			widthX = 0;
			heightY = 0;
			error = 1;
		}
	}
	else{
		widthX = 0;
		heightY = 0;
		error = 1;
	}
	if((widthX!=0)||(heightY!=0)) {
		pro = features.split(",");
		wid = pro[0].substring("6");
		hei = pro[1].substring("7");
		wid -= widthX;
		hei -= heightY;
		winX = (WWidth - wid)/2;
		winY = (WHeight - hei)/2;
		pw = "width="+wid;
		ph = "height="+hei;
		myarr = new Array(pw,ph);
		arr = pro.slice(2);
		proarray = myarr.concat(arr);
		features = proarray.join(",");
	} else {
		pro = features.split(",");
		wid = pro[0].substring("6");
		hei = pro[1].substring("7");
		winX = (WWidth - wid)/2;
		winY = (WHeight - hei)/2;
	}
	if (error) {
	Window = window.open('','','WIDTH=500,HEIGHT=500');
	Window.document.write("<HTML><HEAD><TITLE><<< ERROR! >>></TITLE>");
	Window.document.write("</HEAD><BODY BGCOLOR=#FFF333 LEFTMARGIN=5 TOPMARGIN=5 MARGINWIDTH=5 MARGINHEIGHT=5>");
	Window.document.write("このページは、Windows版およびMacintosh版の<BR>");
	Window.document.write("Netscape Navigator Ver4.0以上、または<BR>");
	Window.document.write("Microsoft Internet Explorer Ver4.0以上のブラウザを推奨しております。<BR>");
	Window.document.write("尚、\"Java Script\" をonの状態にしてご覧下さい。<BR>");
	Window.document.write("<A HREF='JavaScript:window.close()'>CLOSE</A>");
	Window.document.write("</BODY></HTML>");
	Window.document.close();

	} else {
	Window = window.open("","",features);
	Window.moveTo(winX,winY);
	Window.document.write("<HTML><HEAD><TITLE>IMAGE</TITLE>");
	Window.document.write("<STYLE><!--");
	Window.document.write("BODY { margin: 0}");
	Window.document.write("--></STYLE>");
	Window.document.write("</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0>");
	Window.document.write("<A HREF='JavaScript:window.close()'>");
	Window.document.write("<IMG SRC=" + img + " BORDER=0>");
	Window.document.write("</A>");
	Window.document.write("</BODY></HTML>");
	Window.document.close();
	}
}

