function requestLogin()
{
	var sID		= document.getElementById("txtLoginId").value;
	var sPass	= document.getElementById("txtLoginPassword").value;
	location.href = "getLoginData.php?id=" + sID + "&pass=" + sPass ;
}


function Form_Validator(theForm)
{
//	alert("validating");

	// check if firstName field is blank
	if (theForm.formFirstName.value == "")
	{
		alert("Please enter a valid First Name");
		theForm.formFirstName.focus();
		return (false);
	}
	// check if familyName field is blank
	if (theForm.formFamilyName.value == "")
	{
		alert("Please enter a valid Family Name");
		theForm.formFamilyName.focus();
		return (false);
	}
	// check if Organisation field is blank
	if (theForm.formOrganisation.value == "")
	{
		alert("Please enter a valid Organisation");
		theForm.formOrganisation.focus();
		return (false);
	}
	// check if Position field is blank
	if (theForm.formPosition.value == "")
	{
		alert("Please enter a valid Position");
		theForm.formPosition.focus();
		return (false);
	}
	// check if email field is blank
	if (theForm.formEmail.value == "")
	{
		alert("Please enter a valid email");
		theForm.formEmail.focus();
		return (false);
	}

	// test if valid email address, must have @ and .
	var checkEmail = "@.";
	var checkStr = theForm.formEmail.value;
	var EmailValid = false;
	var EmailAt = false;
	var EmailPeriod = false;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkEmail.length;  j++)
		{
			if (ch == checkEmail.charAt(j) && ch == "@")
			EmailAt = true;
			if (ch == checkEmail.charAt(j) && ch == ".")
			EmailPeriod = true;
			if (EmailAt && EmailPeriod)
				break;
			if (j == checkEmail.length)
				break;
		}
		// if both the @ and . were in the string
		if (EmailAt && EmailPeriod)
		{
			EmailValid = true
			break;
		}
	}
	if (!EmailValid)
	{
		alert("The \"email\" field does not appear to have a correct email address");
		theForm.formEmail.focus();
		return (false);
	}

	return (true);
}

function MyAlert()
{
	alert("Hello");
}
