function setup() {
	var agree = document.querySelector('#agree');
	agree.checked = false;
	//対応状況をチェック
	if(window.addEventListener) {
		var fieldset = document.querySelector('#mainField');
		if(fieldset.disabled != undefined) {
			fieldset.disabled = true;
			agree.addEventListener('change', agreed, false);
		}
	}
}

function agreed(e) {
	var t = e.target;
	var fieldset = document.querySelector('#mainField');
	if(t.checked) {
		fieldset.disabled = false;
	} else {
		fieldset.disabled = true;
	}
}