function isValidLoginInfo(id,password)
	{
	if (window.XMLHttpRequest)
		xmlhttp = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

	xmlhttp.open('GET', '/ValidateLoginInfo.asp?id='+ id +'&password='+ encodeURIComponent(password), false);
	xmlhttp.send('');

	if (xmlhttp.status == 200)
		return xmlhttp.responseText.indexOf('true') > -1;
	else
		return true; //(Don't call the info invalid if there is a technical problem)
	}

function checkLoginForm()
	{
	var id = document.Login.EmailOrID.value;
	var password = document.Login.Password.value;
	var errors = "";

	if ((id == "") && (password == ""))
		errors = errors + "\nPlease enter your email address or Viewer ID and password to login.";
	else if (id == "")
		errors = errors + "\nPlease enter your email address or Viewer ID to login.";
	else if (password == "")
		errors = errors + "\nPlease enter your password to login.";
	else if (!isValidLoginInfo(id,password))
		errors = errors + "\nThe login info you have entered was not found in our database.";

	if (errors != "")
		{
		alert(errors);
		return false;
		}
	else
		return true;
	}
