function
MessageBox(
	strText,
	strType,
	strYes,
	strNo  // "Ok" / "Warnning" / "Error" / "YesNo"
) {
	this.m_oUtils  = new Utils();
	this.m_strText = (strText) ? strText : "";
	this.m_strYes = strYes;
	this.m_strNo = strNo;
	this.m_imageIcon = new Image();
	this.m_strPath;
	this.show = MessageBox_show;

	if ( strType == "OK" ) {
		this.m_imageIcon.src = "/PMP4/Client/images/Ok1.gif";
		this.m_strPath = "/PMP4/Client/Common/Tools/MessageBox/MessageBox.htm";
	}
	else if ( strType == "Warnning" ) {
		this.m_imageIcon.src = "/PMP4/Client/images/Warning1.gif";
		this.m_strPath = "/PMP4/Client/Common/Tools/MessageBox/MessageBox.htm";
	}
	else if ( strType == "Error" ) {
		this.m_imageIcon.src = "/PMP4/Client/images/XWarning1.gif";
		this.m_strPath = "/PMP4/Client/Common/Tools/MessageBox/MessageBox.htm";
	}
	else if ( strType == "YesNo" ) {
		this.m_imageIcon.src = "/PMP4/Client/images/AreYouSure.gif";
		this.m_strPath = "/PMP4/Client/Common/Tools/MessageBox/YesNo.htm";
	}
	else {
		this.m_imageIcon.src = "/PMP4/Client/images/Warning1.gif";
		this.m_strPath = "/PMP4/Client/Common/Tools/MessageBox/MessageBox.htm";
	}
}

function
MessageBox_show(width, height)
{
	var arr = new Array();
	arr["Icon"] = this.m_imageIcon;
	arr["Text"] = this.m_strText;
	arr["Yes"] = this.m_strYes;
	arr["No"] = this.m_strNo;

	var nDialogWidth = (this.m_strText) ? this.m_strText.length * 12 : 460;
	var nDialogHeight = 10;
	if ((typeof width == typeof undefined) && (typeof height == typeof undefined))
	{
		nDialogWidth = parseInt(nDialogWidth);
		if ( nDialogWidth > 460 ) {
			nDialogWidth = 460;
		}
		if (nDialogWidth < 140) {
			nDialogWidth = 240;
		}
	}
	else
	{
		nDialogWidth = width;
		nDialogHeight = height;
	}

	var strDialogParams = "status:no; help:no; resizable:no; dialogHeight:" + nDialogHeight + "; dialogWidth:" +
		nDialogWidth + "px;"
	var fDialogResult = this.m_oUtils.openDialog(
		this.m_strPath,
		arr,
		strDialogParams
	);

	return fDialogResult;
}
