
	function showError(txt) {
		$("#error p").html(txt)
		$("#error").show()
		$("body").prepend("<div id='shadow'></div>")
		height =  $("div[align='center']").height()
		if (height < $("body").height())height = $("body").height()
		$("#shadow").css({"height":height})		
		window.scrollTo(0,0)

		return false;
	}

	function showNotice(txt) {
		$("#notice p").html(txt);
		$("#notice").show();
		$("body").prepend("<div id='shadow'></div>");
		height =  $("div[align='center']").height();
		if (height < $("body").height())height = $("body").height();
		$("#shadow").css({"height":height});
		window.scrollTo(0,0);

		return false;
	}

	function showLoader() {
		$("body").prepend("<div id='shadow'></div>")
		height =  $("div[align='center']").height()
		if (height < $("body").height())height = $("body").height()
		$("#shadow").css({"height":height})		
		window.scrollTo(0,0)
		$("#loader").animate({ "opacity": "toggle"}, "slow")
		return false;
	}

	function showLoader(message) {
		$("body").prepend("<div id='shadow'></div>");
		height =  $("div[align='center']").height();
		if (height < $("body").height())height = $("body").height();
		$("#shadow").css({"height":height});
		window.scrollTo(0,0);
		$("#loader").animate({ "opacity": "toggle"}, "slow");
		if (message)
			$("#loader .message").text(message).show();
		
		return false;
	}

	function hideLoader(message) {
		$("#shadow").hide();
		$("#loader").hide();
		$("#loader .message").text('');
	}

	$(document).ready(function() {
		$("body").append("<div id='error'><div class='top'><a onclick=\"$('#error').hide();$('#shadow').hide();return false\"></a></div><div class='content'><div><h1>Ошибка!</h1><p></p></div></div></div>")
		$("body").append("<div id='notice'><div class='top'><a onclick=\"$('#notice').hide();$('#shadow').hide();return false\"></a></div><div class='content'><div><h1>Сообщение</h1><p></p></div></div></div>")
		$("body").append("<div id='loader'><div class='content'><div><img src='img/loader.gif'><span class='message'></span></div></div></div>")
	});
