function refeshCaptcha(id)
{
	var e = document.getElementById(id);
	if(e)
	{
		var u = HOST + '/captcha.jpg?p=' + Math.random();
		e.src = u;
	}
}

function displayError(v, id)
{
	hideBlockUI();
	$('span.errMsg').hide();
	var spanId = (v==1) ? ('err_'+id) : ('exists_'+id);
	$('span#'+spanId).show();
	$('#'+id).select();
	$('#'+id).focus();
}

function hideBlockUI()
{
	$.unblockUI();
	$('embed').show();
}

function showWaiting()
{
	var html = '<div><img src="images/ajax-loader.gif" /></div>';
	$.blockUI
	({
		message : html ,
		css: 
		{
			border: 'none',
			cursor: 'pointer',
			top:  ($(window).height() - 400)/2 + 'px',
			left: ($(window).width() - 126)/2 + 'px',
			color : 'none'
		}
	});
}
