function DialogShow(showdata,ow,oh){
	createHtmlTagID('hidden');
	ScreenConvert(); 
	selectShow(true);
	var objDialog = gid("DialogMove");
	//这里是弹窗出现的位置，ow,oh用于适当调节窗口位置。
	t_DiglogX =document.documentElement.scrollLeft+(document.documentElement.clientWidth-ow)/2-100;
	t_DiglogY =document.documentElement.scrollTop+(document.documentElement.clientHeight-oh)/2-100;

	var oS = objDialog.style;
	
	oS.display = "block";	
	oS.top = t_DiglogY + "px";
	oS.left = t_DiglogX + "px";
	//oS.width = w + "px"; oS.height = h + "px";  //这两行放到CSS中，以避免被AJAX执行速超过。

	objDialog.innerHTML = showdata;
}


function gid(id){
	return document.getElementById?document.getElementById(id):null;
}

function gname(name){
	return document.getElementsByTagName?document.getElementsByTagName(name):new Array()
}

function ScreenConvert(){
	var objScreen = gid("ScreenOver");
	objScreen.style.display = "block";
	var oS = objScreen.style
	if (document.documentElement.scrollHeight) {
	   var wh = document.documentElement.scrollHeight + "px";
	   var ww = document.documentElement.scrollWidth + "px";
	}else if (window.innerHeight){
	   var wh = window.innerHeight + "px";
	   var ww = document.innerWidth + "px";
	}else{
	   var wh = "100%";
	   var ww = "100%";
	}

	oS.width = ww;
	oS.height = wh;
}

function DialogHide(){
	var objDialog=document.getElementById("DialogMove").style.display="none";
	var objScreen=document.getElementById("ScreenOver").style.display="none";

	selectShow(false);
	createHtmlTagID('auto');
}
function selectShow(showState){
	var allselect = gname("select");
	for (var i=0; i<allselect.length; i++){
		allselect[i].disabled = showState;
		if(showState)
			allselect[i].style.backgroundColor = '#cccccc';
		else
			allselect[i].style.backgroundColor = '#ffffff';
	}
}
//创建<HTML>标签ID值： id="divWindowSH",调用时要传入参数：'hidden'或'auto'
function createHtmlTagID(HtmlShowValue){
	var HtmlIdValue = '';
	var htmlTag = gname("html");
	for(i=0;i<htmlTag.length;i++){
		if(htmlTag[i].id == ""){
			htmlTag[i].id = 'divWindowSH';
		}
		HtmlIdValue = htmlTag[i].id;
	}
	document.getElementById(HtmlIdValue).style.overflow= HtmlShowValue;
}
