function placeFocus(form){
	form.Name.focus();
}

function validateForm(form) { 
	if (isNotEmpty(form.Name) && isNotEmpty(form.Email) && isNotEmpty(form.Comments))
	  {
		
	
		
	} else {
		highLightErrors(form);
		alert("Please fill in all required fields denoted by *");
		return false;
	}	
}


function isNotEmpty(elem) {
	var str = elem.value;
	if ( str ==  null  ||  str.length == 0)  {
		elem.focus();
		return false;
	} else { 
		return true;
	}
}

function highLightErrors(form) {
	if(!isNotEmpty(form.Name)) { 
		changeColor("txtName");
	}
	if(!isNotEmpty(form.Email)) { 
		changeColor("txtEmail");
	}
	if(!isNotEmpty(form.Comments)) { 
		changeColor("txtComments");
	}
		
}

function changeColor(elemID){

	var elem = document.getElementById(elemID);
	elem.style.color = "#ff0000";
	
}

function restoreColor(elemID){

	var elem = document.getElementById(elemID);
	elem.style.color = "#000000";
	
}