/**
* encrypts the login form using an challenge-and-response protocol
*/
function encryptlogin(form)
{
	var status=form.cryptedlogin.value;
	
	if(status=='true')
	{
		var authentificationcode = form.authentificationcode.value;
		var password = form.password.value;
		authentificationcode = MD5(MD5(authentificationcode)+MD5(password));
	
		form.password.value='';
		form.cryptedlogin.value='true';
		form.authentificationcode.value=authentificationcode;
	}
	return true;
}



/**
* activates or deactivates form encryption
*/
function activate_loginencryption(form)
{
	var status = form.cryptedlogin.value;

	// deactivate
	if(status=='true')
	{
		form.cryptedlogin.value='false';
		form.activateencryption.checked=false;
	}
	// activate
	else
	{
		form.cryptedlogin.value='true';
		form.activateencryption.checked=true;
	}
}