function authenticate() {
	document.forms['login'].hash.value = MD5(document.forms['login'].pass.value)
	document.forms['login'].pass.value = ''
	document.forms['login'].seed.value = String(Math.random())
	document.forms['login'].hash.value = MD5(document.forms['login'].hash.value + document.forms['login'].seed.value)
	document.forms['login'].submit()
}

function registreren() {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"
	var string_length = 8
	var randomstring = ''
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length)
		randomstring += chars.substring(rnum,rnum+1)
	}
	document.forms['register'].pass.value = randomstring
	document.forms['register'].hash.value = MD5(document.forms['register'].pass.value)
	document.forms['register'].pass.value = ''
	document.forms['register'].submit()
}

function refresh() {
	if (!(document.forms['wachtwoord'].newpass.value == '')){
		if (document.forms['wachtwoord'].newpass.value == document.forms['wachtwoord'].checkpass.value){
			document.forms['wachtwoord'].hash.value = MD5(document.forms['wachtwoord'].newpass.value)
			document.forms['wachtwoord'].newpass.value = ''
			document.forms['wachtwoord'].checkpass.value = ''
			document.forms['wachtwoord'].submit()
		}
	}
}


