var YzSubmitingMask=
{
	initialized : false,
	create : function()
	{
		if(this.initialized)return;
		Yz.util.importStyleSheet(document,"__YzSubmitingMask.css",true);
		var div=document.createElement("div");
			div.className="YzSubmitingMask";
			div.style.display="none";
			div.style.backgroundColor='transparent';
			div.style.zIndex=30000;
			div.style.left='0px';
			div.style.top='0px';
			div.style.position='absolute';
			div.innerHTML='';
			div.id=Yz.util.newGuid();
			document.body.appendChild(div);
		this.domId=div.id;
		this.initialized=true;
	},
	show : function(txt)
	{
		this.create();
		
		if(typeof txt=='undefined')txt='Submitting, please wait...';
		
		var div=document.getElementById(this.domId);
		var ow=document.documentElement.clientWidth;
		var oh=Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight,document.documentElement.offsetHeight);
			div.style.width=ow+"px";
			div.style.height=oh+"px";
			div.style.display="";
		
		if(div.innerHTML=='')
		{
			div.innerHTML='<div class="submitingBar"><div class="sbMid"><div class="sbSinner">'+txt+'</div></div></div>';
		}
		else
		{
			div.firstChild.firstChild.firstChild.innerHTML=txt;
		}
		div.firstChild.style.zIndex=div.style.zIndex+1;
		div.firstChild.style.left=(ow-div.firstChild.offsetWidth)/2+'px';
		div.firstChild.style.top=(oh-div.firstChild.offsetHeight)/2+'px';
	},
	setText : function(txt)
	{
		if(this.initialized==false)return;
		var div=document.getElementById(this.domId);
		div.firstChild.firstChild.firstChild.innerHTML=txt;
	},
	hide : function()
	{
		document.getElementById(this.domId).style.display="none";
	}
}
if(typeof Yz!="undefined")Yz.submitingMask=YzSubmitingMask;