<!--
//displays form contents in alert box
function submitForm() {
	alert("Thank you " + document.contact.name.value + 
		"\n\nFor your comment:\n" + document.contact.comments.value);
	return false;
}

//validate form
function validate_email(field,alerttxt)
{
	with (field)
	{
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) 
  		{alert(alerttxt);return false}
		else {return true;}
	}
}

function validate_required(field,alerttxt)
{
	with (field)
	{
	if (value==null||value=="")
  		{alert(alerttxt);return false}
	else {return true;}
	}
}


function validate_form(thisform)
{
	with (thisform)
	{
		if (validate_email(email,"Not a valid e-mail address!")==false)
  			{email.focus();return false}
		if (validate_required(name,"Please provide your name")==false)
  			{name.focus();return false}
		if (validate_required(question,"You did not ask a question!")==false)
  			{question.focus();return false}  
	}
	return submitForm()
}

// popup window
function popUp(URL) {
	eval("page = window.open(URL, 'newPage', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=no,width=500,height=620,left = 100,top = 100');");
}
// -->
