function ShowDialog() {
var objDialog = document.createElement('div') ;
objDialog.id = "bgDialog";
var oS = objDialog.style;
oS.display = "block";
oS.top = "0px";
oS.left = "0px";
oS.margin = "0px";
oS.padding = "0px";
oS.width = window.screen.width + "px";
oS.height = window.screen.height+"px";
oS.position = "absolute";
oS.zIndex = "5";
oS.background = "#D8D8D8";
oS.border = "solid #000 1px";
oS.filter = "alpha(Opacity=80)";
objDialog.innerHTML = oS;
document.body.appendChild(objDialog);
document.getElementById("bgDialog").innerHTML = "";
var returnValue = window.showModalDialog('gridtree.aspx' , window, 'dialogWidth=400px;dialogHeight=410px;center=yes;resizable=no;help=no;status=no;location=no;scrolling=no');
// if (returnValue == 1) //判断子窗口返回的参数值, 如果为1则刷新父窗口
// {
// //window.location.reload();
// }
if (returnValue != null) {//不加此句就会将"undefined"赋值 到文本框中了
document.getElementById("TCK_T1_txtGrid").value = returnValue;//返回值
}
document.body.removeChild(document.getElementById("bgDialog"));//移除背景层
}