window.onload=loginonload;

function loginonload(event){
	if($('newpass1')){  // the fields are only defined when filling in new user information
		$('newpass1').onblur=checkpass;
		$('newpass2').onblur=checkpass;
		var textfields=$$('.textfield');
		textfields.each(function(tf){
			tf.style.width="20em";});
	}
}

function checkpass(event){
	
	if($('newpass1').value.length> 0 && $('newpass2').value.length>0 && $('newpass2').value!=$('newpass1').value){
		alert('Passwords don\'t match');
	}
}