
function check_account(x) {
	var notice = $('error_div');
	notice.update('<img src="indicator.gif">&nbsp;Validating account number...');
	new Effect.SlideDown('error_div', {duration: .15});
	var ajax = new Ajax.Request('check_account.php',
	  {
	    method:'post', parameters: { account : x },
	    onSuccess: function(transport) {
		    var notice = $('error_div');
		    if (transport.responseText.match('ok')) {
		      notice.update('We have validated your account number.').setStyle({ background: '#dfd' });
				document.frm.submit.disabled = false;
		    } else {
				notice.update('Sorry, we could not locate your account number. Please check your account number and retry.').setStyle({ background: '#fdd' });
				document.frm.submit.disabled = true;
				document.frm.account_number.focus();
				document.frm.account_number.select();
		  }
		}
	  });
}
