function checkAll(allChecked, list) {
	if (allChecked.checked == true)
		for (i = 0; i < list.length; i++)
			list[i].checked = true;
			
	else for (i = 0; i < list.length; i++)
			list[i].checked = false;
}

function reload(form) {
	form.submit();
}

function popitup(url) {
	popitupwithsizes(url, 800, 700);
}

function switchMenu(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

function confirm_delete(url) {
	var choice = confirm("Are you sure?  If you delete this item, you will not be able to recover it.");
	if (choice)
		window.location=url;
}

function confirm_form() {
	var agree = confirm("Are you sure?  If you delete these items, you will not be able to recover them.");
	if (agree)
		return true;
	else return false;
}
