function UpdateCount( txtQuestionID, txtNumCharsLeftID )
{
	var txtQuestion;
	var txtNumCharsLeft;
	
	eval( "txtQuestion = document.forms[0]." + txtQuestionID + ";" );
	eval( "txtNumCharsLeft = document.forms[0]." + txtNumCharsLeftID + ";" );
	
	asciiCode = ( navigator.appName.indexOf( 'Explorer' ) > 0 ? event.keyCode : event.which );
	
	newCharCount = txtQuestion.value.length + ( asciiCode == 8 ? -1 : 1 );
	
	if( newCharCount > 2000 )
	{
		txtNumCharsLeft.value = 0;
		return false;
	}
	
	txtNumCharsLeft.value = ( newCharCount < 0 ? 2000 : 2000 - newCharCount );
	return true;
}

function ValidateForm( txtQuestionID,
					   txtFirstNameID,
					   txtLastNameID,
					   txtCityID,
					   txtStateID,
					   txtCountryID,
					   txtEmailID )
{
	var txtQuestion;
	var txtFirstName;
	var txtLastName;
	var txtCity;
	var txtState;
	var txtCountry;
	var txtEmail;
		
	eval( "txtQuestion = document.forms[0]." + txtQuestionID + ";" );
	eval( "txtFirstName = document.forms[0]." + txtFirstNameID + ";" );
	eval( "txtLastName = document.forms[0]." + txtLastNameID + ";" );
	eval( "txtCity = document.forms[0]." + txtCityID + ";" );
	eval( "txtState = document.forms[0]." + txtStateID + ";" );
	eval( "txtCountry = document.forms[0]." + txtCountryID + ";" );
	eval( "txtEmail = document.forms[0]." + txtEmailID + ";" );
	
	if( txtQuestion.value.length == 0 )
	{
		alert( "Please enter a question." );
		txtQuestion.focus();
		return false;
	}
	
	if( txtFirstName.value.length == 0 )
	{
		alert( "Please enter your first name." );
		txtFirstName.focus();
		return false;
	}
	
	if( txtLastName.value.length == 0 )
	{
		alert( "Please enter your last name." );
		txtLastName.focus();
		return false;
	}
	
	if( txtCity.value.length == 0 )
	{
		alert( "Please enter which city you are from." );
		txtCity.focus();
		return false;
	}
	
	if( txtState.value.length == 0 )
	{
		alert( "Please enter which state you are from." );
		txtState.focus();
		return false;
	}
	
	if( txtCountry.value.length == 0 )
	{
		alert( "Please enter which country you are from." );
		txtCountry.focus();
		return false;
	}
	
	if( txtEmail.value.length == 0 )
	{
		alert( "Please enter your E-mail address." );
		txtEmail.focus();
		return false;
	}
	
	var emailRE = /\s*\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*\s*/;
	
	if( !emailRE.test( txtEmail.value ) )
	{
		alert( "Please enter a valid E-mail address." );
		txtEmail.focus();
		return false;
	}
}
