function checkForm(pForm) {
	for (var ii=0; ii<pForm.length; ii++) {
		var ffield = pForm[ii];
		if (ffield.mandatory && ffield.value.length <=0) {
			alert(ffield.errormsg);
			ffield.focus();
			return false;
		}
	}
	return true;
}

function switchDiv(id) {
	pElement = document.getElementById(id);
	if (pElement!=null) {
		if (pElement.style.display == "none") 
			pElement.style.display = "block";
		else
			pElement.style.display = "none";
	}
}

function showNotes() {
	switchDiv('divNoteShow');
	switchDiv('divNote');
}