function backopen (img,x,y,bgc,flag) {
	var new1,win1p,win1;

	if (win1p=="on") {
	if (new1.closed) {} else {new1.close();}
	}

	win1p = "on";
	if (bgc=="0") { bgcol = "#000000"; }
	if (bgc=="F") { bgcol = "#FFFFFF"; }

	if (flag!="adult"){
		new1=window.open("", "newwin", "resizable=0,width="+x+",height="+y+"");
		new1.document.clear();
		new1.document.write("<html><body oncontextmenu=\"return false\" style=\"background-color: "+bgcol+"\"><img src="+img+">");
		new1.document.write("<\/body><\/html>");
		new1.document.close();
	}

	else {
		files="./cgviewer.cgi?id="+img+"&bgc="+bgc;
		new1=window.open("files", "newwin", "resizable=0,width="+x+",height="+y+"");
		new1.document.clear();
		new1.document.write("<html><body oncontextmenu=\"return false\" onLoad=location.href=\""+files+"\">");
		new1.document.write("<\/body><\/html>");
		new1.document.close();
	}

}



function chkboxctrl() {
	for (i=3; i<99; i++) {
		if(document.forms[0].elements[i].value == '投票'){break;}
		else {
			if(document.forms[0].elements[i].checked == false){
				document.forms[0].elements[i].click();
			}
		}
	}
}

