var dopost=new Object();
dopost.show=function(){
	//提交表表单，先判断验证再判断重复提交
//	if (Page_ValidationActive && !Page_IsValid){
//		return;
//	}
	dopost._disp();
};

dopost._disp=function(){
	if(typeof(dopost.div)!='undefined' && dopost.div.style.display=='none'){
		return;
	}
	
	var tiny=!(typeof(tinyMCEPopup)=='undefined');
	if(dopost.div!=undefined){
		dopost.div.style.display="block";
		dopost.div1.style.display="block";
		dopost._dispSel(false);
		return;
	}
	dopost.div = document.createElement("div");
	dopost.div.innerHTML = tiny?"<div align='center' style='color:#777;padding-top:26px'>正在提交数据...</div>":"<div align='center' style='color:#777;font-weight:bold;padding-top:45px'>正在提交数据，请稍等！</div>";
	with(dopost.div.style){
		background=tiny?"#eed url(../../../pic/processing.gif) no-repeat center 8px":"#eed url(pic/processing.gif) no-repeat center 20px";
		position="absolute";
		width=tiny?"240px":"300px";
		height=tiny?"50px":"80px";
		border="1px solid #ccc";
		top=document.body.clientHeight/2-30+"px";
		left=document.body.clientWidth/2-100+"px";
		zIndex=101;
	}
	if(tiny){
		document.forms[0].appendChild(dopost.div);
	}else{
		document.body.appendChild(dopost.div);
	}
	
	dopost.div1 = document.createElement("div");
	var w, h;
	with(document.body){
		if (scrollWidth<clientWidth){
			w = clientWidth;
		}else{
			w = scrollWidth;
		}
		if (scrollHeight<clientHeight){
			h = clientHeight;
		}else{
			h = scrollHeight;
		}
	}
	with(dopost.div1.style){
		background = "#ddd";
		position = "absolute";
		filter = "alpha(Opacity=40)";
		opacity="0.3";
		top = "0px";
		left = "0px";
		width = w+"px";
		height = h+"px";
		zIndex = 100;
	}
	if(tiny){
		document.forms[0].appendChild(dopost.div1);
	}else{
		document.body.appendChild(dopost.div1);
	}
	
	
	dopost.div1.focus();
//	dopost.div.ondblclick=function(){dopost.hide();};
	
	dopost._dispSel(false);
	document.body.style.cursor='wait';
};

dopost.hide=function(){
	if(dopost.div==undefined || dopost.div.style.display=="none"){
		return;
	}
	window.posting=false;
	dopost.div.style.display="none";
	dopost.div1.style.display="none";
	dopost._dispSel(true);
	document.body.style.cursor='';
};

dopost._dispSel=function(disp){
	var sels = document.getElementsByTagName("SELECT");
	for(var i=0; i<sels.length; i++){
		sels[i].style.visibility = disp?"visible":"hidden";
	}
};