<!--<?php
include_once PrintEot('left');print <<<EOT
-->
<h2>常用選項定制</h2>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="edit">
<table width="100%" cellspacing="0" cellpadding="0" align="center">
$editset
</table><br />
<center><input type="button" value="全 選" class="btn" onclick="CheckForm(this.form)"> <input type="submit" class="btn" value="提 交"></center>
</form>
<script language="JavaScript">
var allcheck = true;
var checkvar = {{$checkvar}}
function CheckForm(obj){
	if (obj.id) {
		if (checkvar['chk_'+obj.id]=='undefined') {
			return false;
		}
		var newobj = obj.getElementsByTagName('input');
		var len = newobj.length;
		var checkall = checkvar['chk_'+obj.id];
	} else {
		var newobj = obj.elements;
		var len = newobj.length-2;
		var checkall = allcheck;
	}
	for (var i=0;i<len;i++) {
		if (newobj[i].type=='checkbox') newobj[i].checked = checkall;
	}
	if (obj.id) {
		if (checkall==true) {
			checkvar['chk_'+obj.id] = false;
			allcheck = true;
		} else {
			checkvar['chk_'+obj.id] = true;
			allcheck = false;
		}
	} else {
		if (checkall==true) {
			for (i in checkvar) {
				checkvar[i] = false;
			}
			allcheck = false;
		} else {
			for (i in checkvar) {
				checkvar[i] = true;
			}
			allcheck = true;
		}
	}
}
</script>
<!--
EOT;
include_once PrintEot('adminbottom');
?>-->