function chpw()
{
	var is_complete = $('theform').getElements().all(
			function (element)
			{
				if (element.value != '')
				{
					return true;
				}
				else
				{
					return false;
				}
			});

	if (is_complete)
	{	
		var success = function (t)
		{
			if (t.responseText == 'ok')
			{
				$('form_area').update('Password Changed');
			}
			else
			{
				$('chpw_status').update('Server said: ' + t.responseText);
			}
		}

		$('chpw_status').update('<img src="loadsmall.gif" alt="x" />Attempting to change password...');

		var params = $('theform').serialize();

		new Ajax.Request('chpw.pl', {method:"post", onSuccess:success, parameters:params});
	}
	else
	{
		alert('Please complete the form!');
	}

}
