function ShowLoading(sender)
{
//	if($('LoadingMSG')!=null) Element.remove('LoadingMSG');
//	id = sender.id.replace(eval('/\\$/gi'), '_');
//	Prado.Element.Insert.after(id, "<img id=\"LoadingMSG\" style=position:absolute; src='/images/loading/c1-blue.gif'>");
	Element.show('LoadingMSG');
}
function HideLoading(sender)
{
	if($('LoadingMSG')!=null) 
		Element.hide('LoadingMSG');
}
function ShowMSG(sender, parameter, str)
{
	if(sender)
	{
		if(parameter != null && parameter.SuccessMSG != null) str = parameter.SuccessMSG;
		if($('MSG')) Element.remove('MSG');
		if(typeof str == 'undefined') 
		{
			//Element.remove('LoadingMSG');
			//Prado.Element.Insert.after(id, "<img id=\"MSG\" style=position:absolute; src=/images/tick-green.png >");
		}
		else
		{
			id = sender.id.replace(eval('/\\$/gi'), '_');
			Prado.Element.Insert.after(id, "<span class=\"message\" style=\"display:none;\" id=\"MSG\"></span>");
			Element.update('MSG', str);	Element.show('MSG');waitingMSG('HideMSG()');
		}
	}
	
}
function HideMSG(){	Element.update('MSG', '');Element.remove('MSG');}
function ShowErrorMSG(sender, parameter, str)
{
	doSomethin();
	document.body.scrollTop = 100;
	var e = sender.getHeaderData(Prado.CallbackRequest.ERROR_HEADER);
	if(e && e.type == 'ProjectException'){str = e.message ;}
	if($('ErrorMSG')) Element.remove('ErrorMSG');
	id = sender.id.replace(eval('/\\$/gi'), '_');
	Prado.Element.Insert.after(id, "<span class=\"error\" style=\"display:none;\" id=\"ErrorMSG\"></span>");
	Element.update('ErrorMSG', str);
	Element.show('ErrorMSG');
	Element.remove('LoadingMSG');
	waitingMSG('HideErrorMSG()');
}
function HideErrorMSG(){Element.update('ErrorMSG', '');Element.hide('ErrorMSG');}
//function ShowRequestMSG(){Element.show('RequestMSG');waitingMSG('HideRequestMSG()');}
//function HideRequestMSG(){Element.hide('RequestMSG');}
function doSomethin()
{
	//$('LoadingMSG').style.top = document.body.scrollTop;
	//$('ErrorMSG').style.top = document.body.scrollTop;
	//$('MSG').style.top = document.body.scrollTop;
}
//window.onscroll = doSomethin;