function checkForm() {
	name = document.getElementById("name").value;
  	email = document.getElementById("email").value;
  	comment = document.getElementById("comment").value;
  
  	if (name == "") {
  		hideAllErrors();
		document.getElementById("nameError").style.display = "inline";
		document.getElementById("name").select();
		document.getElementById("name").focus();
  		return false;
  	} else if (email == "") {
		hideAllErrors();
		document.getElementById("emailError").style.display = "inline";
		document.getElementById("email").select();
		document.getElementById("email").focus();
  		return false;
  	} else if (comment == "") {
		hideAllErrors();
		document.getElementById("commentError").style.display = "inline";
		document.getElementById("comment").select();
		document.getElementById("comment").focus();
  	return false;
  	}
  	return true;
}
 
function hideAllErrors() {
	document.getElementById("nameError").style.display = "none"
	document.getElementById("emailError").style.display = "none"
	document.getElementById("commentError").style.display = "none"
}
function SelectAllUsr(field){
	var list=document.getElementsByName(field);
	for (i = 0; i < list.length; i++)
		list[i].checked = true ;
}

function ClearAllUsr(field){
	var list=document.getElementsByName(field);
	for (i = 0; i < list.length; i++)
		list[i].checked = false ;
}
function actionSelect(field,na){
	var list=document.getElementsByName(field);
	var found=false;
	for (i=0;i< list.length; i++){
		if(list[i].checked == true) {
			found=true;
			break;
		}
	}	
	if (found == true) {
		document.usradmin.action = na;   
		return true;
	}else{
		return false;
	}
}

