function checkPassword( count ) {
	check1 = $('#Passwd'+count);

	if ( count == 1)
		check2 = $('#Passwd2');
	else
		check2 = $('#Passwd1');

	if ( check2.attr('value') != '' && check1.attr('value')!=check2.attr('value') ) {
		check1.attr('value', '');
		check1.css('background', jQuery.formErrorBg);
		check2.attr('value', '');
		check2.css('background', jQuery.formErrorBg);
		
		bmAlert('A két megadott jelszó nem egyezik!', 'error');
	}
}

function checkUserName( input ) {
	userName = $(input).attr('value');
	
	$.post(document.URL, {ajaxFunction: 'checkUserName', ajaxFile: 'regisztracio/ajax.php', userName: userName},
		function( data ) {
			if ( data == 'false' ) {
				$(input).css('background', jQuery.formErrorBg);
				$(input).attr('value', '');
				bmAlert("Az e-mail (<i>"+userName+"</i>) cím már regisztrálva van oldalunk.", 'error');
			}
		}
	);
}
