var system = new ___fnSystem;

// ----------------------------------------------------------------------- 系统
function ___fnSystem() {
	// 成员
	this.web			= new ___fnSystemWeb;
	this.resources		= new ___fnSystemResources;
	
	
	// 方法
	this.showAlert		= ___fnSystemShowAlert;
	this.closeAlert		= ___fnSystemCloseAlert;
}


// ----------------------------------------------------------------------- Web
function ___fnSystemWeb() {
	// 成员
	this.forms			= new ___fnSystemWebForms;
	
	// 方法
	this.closeWindow	= ___fnSystemWebCloseWindow;
}


// ----------------------------------------------------------------------- Web Forms
function ___fnSystemWebForms() {
	// 集合
	this.items = new ActiveXObject("Scripting.Dictionary");
	
	// 成员
	this.TreeView	= null;
	this.DataGrid	= null;
	this.TaskBar	= null;
	this.Calendar	= null;
	
}


function ___fnSystemWebCloseWindow() {
	window.close();
}


// ----------------------------------------------------------------------- Resources
function ___fnSystemResources() {
	// 成员
	this.Directory	= null;
	this.Resource	= null;
	this.geography	= null;
}



// ----------------------------------------------------------------------- Util Functions
function ___fnSystemShowAlert(___content, ___width, ___height) {
	try {
		if (___content != null && ___content != "undefined") {
			___fnSystemCloseAlert();
			var ___buf = "<table id=\"tblAlert\" width=\"" + ___width + "\" height=\"" + ___height + "\" class=\"clsAlertTbl\""
				+ " style=\"position:absolute;left:" + (document.body.clientWidth / 2 - ___width / 2) + ";top:" + (document.body.clientHeight / 2 - ___height - 50) + "\">"
				+ "<tr><td>&nbsp;" + ___content + "</td></tr></table>";
			document.body.insertAdjacentHTML("beforeEnd", ___buf);
		}
	} catch (e) {
		e.description += " - ___fnSystemShowAlert()";
		throw e;	
	}
}


function ___fnSystemCloseAlert() {
	try {
		var ___a = document.all("tblAlert");
		if (___a != null) {
			___a.outerHTML = "";
		}
	} catch (e) {
		e.description += " - ___fnSystemCloseAlert()";
		throw e;	
	}	
}