﻿// page functionality
function ContactValidate(evt) {
	if (document.getElementById(varPrefix + "txtName").value == "") {
		alert ("Please enter your Name.");
		document.getElementById(varPrefix + "txtName").focus();
		return CancelEvent(evt);
	}
	if (document.getElementById(varPrefix + "txtEmail").value == "") {
		alert ("Please enter your Email.");
		document.getElementById(varPrefix + "txtEmail").focus();
		return CancelEvent(evt);
	}
	if (document.getElementById(varPrefix + "txtComments").value == "") {
		alert ("Please enter your Comments.");
		document.getElementById(varPrefix + "txtComments").focus();
		return CancelEvent(evt);
	}
	return (true);
}

// page load functionality	
function ContactLoad() {
	var objEvents = new EventArray();
	objEvents.Add(new Event(varPrefix + "btnSubmit", "click", ContactValidate));
	objEvents.AttachEvents();
}
	
var varPrefix = "_ctl0_plcContentPlaceHolderBody_";
