function ShowDialog(_URL,_Width,_Height)
{
	var _ReturnVal;
	_ReturnVal = window.showModalDialog(_URL,"","dialogHeight:" + _Width + "px;dialogWidth:" + _Height + "px;status:no;scroll:no");
	return _ReturnVal;
}

function WindowReLoad()
{
	window.location= "/Common/Redirect.asp?_toURL=" + window.location;
}

function ShowDialogAndReLoad(_URL,_Width,_Height)
{
	ShowDialog(_URL,_Width,_Height);
	WindowReLoad();
}

function xFillOptions(_FileName,_Obj,_Default,_FirstVal)
{
	var isAll = 1;
	var isFirst = 0;
	if(_FirstVal == "") isAll = 0;
	DelOptions(_Obj,isAll);
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async="false";
	xmlDoc.load(_FileName);
	var xmlObj=xmlDoc.documentElement;
	var _Text = "";
	var _Value = "";
	var oOption = document.createElement("OPTION");
	try
	{
		if(_Default != "")
		{
			oOption = document.createElement("OPTION");
			oOption.text = _Default;
			oOption.value = "";
			_Obj.add(oOption);
			isFirst = 1;
		}
		for(j=0;j < xmlObj.childNodes(0).childNodes.length;j++)
		{
			_Text = xmlObj.childNodes(0).childNodes(j).getAttribute("vText");
			_Value = xmlObj.childNodes(0).childNodes(j).getAttribute("vValue");

			oOption = document.createElement("OPTION");
			oOption.text = _Text;
			oOption.value = _Value;
			_Obj.add(oOption);
			if(_FirstVal == _Value)
			{
				_Obj.options[j+isFirst].selected = true;
			}
		}
	}
	catch(e)
	{
		alert("³õÊ¼»¯´íÎó!");
	}
}

function DelOptions(Obj,isAll)
{
	while(Obj.length > isAll)
	{
		Obj.remove(isAll);
	}
}

function ConfirmToURL(ConfirmStr,_URL,_TargetForm)
{
	var vConfirm = confirm(ConfirmStr);
	if(vConfirm == true)
	{
		window.location = _URL;
	}
}