<!--
//alert("hello from formValidate");

function validate(form)
{
	//alert("validate");
	
	var msg = "Please fill in the required information (indicated \nby * ) so we can process your suggestion.";
	var eventname = document.forms[0].Event_name.value;
	var city = document.forms[0].City.value;
	//var venue = document.forms[0].Venue.value;
	var datestart = document.forms[0].Start_date.value;
	var name = document.forms[0].Contact_name.value;
	//var phone = document.forms[0].Contact_phone.value;
	
	var email = document.forms[0].email.value;
	
	//alert("email is "+email);
	
	// check also for any space characters that may be input
	if (email =="" || email == null || eventname ==""|| eventname == null
		|| name == "" || name == null || datestart =="" || datestart == null
		|| city ==""|| city == null) {
  		alert (msg);
  		return false;
  	} else return true;
	
}

function allowReset() {
  return window.confirm("Go ahead and clear this form?");
}	

/*
//number formatter
function format(expr,decplaces) {
	var str = "" + Math.round(eval(expr) * Math.pow(10,decplaces))
	while (str.length <= decplaces) {
		str = "0" + str
	}
	var decpoint = str.length - decplaces
	return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length);
}
function dollarize (expr) {
	return format(expr,2)
}

function formFilled() {
	//check for order numbers
	//name = form["Contact_name"].value;
	//email = form["email"].value;
	//city = form["City"].value;
	//start = form["Start_date"].value;
	
	//if ((t2+t3+t4+t5)<1) {
	//alert("You haven't told us how many tour packages you want.")
	//return false
	//}
	//check for address data
	if (isEmpty(form["Contact_name"].value) || isEmpty(form["email"].value) ||
		isEmpty(form["City"].value) ||
		isEmpty(form["Event_name"].value)) {
		alert("Please fill in the required information so we can process your suggestion.")
		return false
	}
	//if (isEmpty(form["txtEmail"].value)) {
	//	alert("Please include your email address in case we need to contact you about your order.")
	//	return false
	//}
	return true
}


function testNum(inputVal) {
	strInput = inputVal.toString()
	for (var i = 0; i < strInput.length; i++) {
		var oneChar = strInput.charAt(i)
		if (oneChar < "0" || oneChar > "9") {
			alert("Please use numbers in these first five fields.")
			return false
		}
	}
	return true
}


function isEmpty(inputVal) {
	strInput = inputVal.toString()
	if (strInput == null || strInput == "") {
		return true
	}
	return false
}
*/
//-->
