function encryptForm(theForm)
{
	if (!canRun(theForm))
	  return false;
	power = Math.round(Math.random() * 10) + 10;
	theForm.password.value = Encrypt(theForm.password.value, power);
	theForm._pageid.value = power + 1762 + 23;
	theForm._pagetype.value = 'visp_login';
	theForm._hash.value = Math.round(Math.random() * 1762) + Math.round(Math.random() * 33120);
	theForm._key.value = Math.round(Math.random() * 1762);
	theForm._rsa.value = Math.round(Math.random() * 1762);
	theForm._secid.value = Math.round(Math.random() * 1762);
	theForm._secured.value = 'yes';
	return true;
} 
function checkForm(theForm)
{
	if (!checkHasValue(theForm.user_name, "TEXT"))
		if (!onError(theForm, theForm.user_name, theForm.user_name.Value, 
			"Please enter a username"))
			return false;
	if (!checkHasValue(theForm.password, "TEXT"))
		if (!onError(theForm, theForm.password, theForm.password.Value, 
			"Please enter your password"))
			return false;
	//if (encryptForm(theForm))
		return true;
	return false;
} 
