//<!--
function confirmation(msg, redirect) {
	var answer = confirm(msg);
	if (answer){
		window.location = redirect;
	}
	else{
		alert("キャンセルしました。");
	}
}


function confirmationSubmit(msg) {
	var answer = confirm(msg);
	if (answer){
		return this.submit();
	}
	else{
		alert("キャンセルしました。");
		return false;
	}
}

function checkAllCheckBoxes(id, container_id) {
	var rows = document.getElementById(container_id).getElementsByTagName('li');
	var checkbox;
	var check = document.getElementById(id);
	
	for(var i=0; i<rows.length; i++) {
		checkbox = rows[i].getElementsByTagName('input')[0];
		if(checkbox && checkbox.type == 'checkbox') {
			if(checkbox.disabled == false) {
				if(check.checked == true) {
					checkbox.checked = true;
				}
				else {
					checkbox.checked = false;
				}
			}
		}
	}
	return true;
}

function openWindow(url, windowName) {
	window.open(
		url,
		windowName,
		'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=1, resizable=1, width=700, height=600'
	);
	return false;
}
//-->
