function setSearchArea(form, id) {
    form.searchArea[id - 1].checked = true;
}

function confirmDelete(address, name) {
	agree = confirm("Haluatko varmasti poistaa " + name + "?");
	if (agree){
		location.href = address;
	}
}

function confirmPublicDelete(address, description) {
	agree = confirm(description);
	if (agree){
		location.href = address;
	}
}

function confirmDeleteSubmit(form, name) {
	agree = confirm("Haluatko varmasti poistaa " + name + "?");
	if (agree){
		form.submit();
	}
}

function confirmLostPassword(address, name) {
	agree = confirm("Haluatko varmasti lähettää salasanan käyttäjälle " + name + "?");
	if (agree){
		location.href = address;
	}
}

function printCourse() {
	window.print();
}

function confirmExportCourses(address, number){
	agree = confirm("Haluatko varmasti ladata " +number+ " kurssia Excel-tiedostoksi?");
	if(agree){
		location.href = address;
	}
}