function FindDOM () {
	this._supportID = false;
	this._supportAll = false;
	this._supportLayer = false;
	this._supportDHTML = false;
	if (document.getElementById) {
		this._supportID = true;
		this._supportDHTML = true;
	} else {
		if (document.all) {
			this._supportAll = true;
			this._supportDHTML = true;
		} else {
			var sAppName = navigator.appName;
			var nAppVersion = parseInt (navigator.appVersion);
			if (sAppName.indexOf ('Netscape') != -1 && nAppVersion == 4) {
				this._supportLayer = true;
				this._supportDHTML = true;
			}
		}
	}
}

var oFindDOM = FindDOM.prototype;

oFindDOM.$init = function () {
	if (document.getElementById) {
		this._supportID = true;
		this._supportDHTML = true;
	} else {
		if (document.all) {
			this._supportAll = true;
			this._supportDHTML = true;
		} else {
			var sAppName = navigator.appName;
			var nAppVersion = parseInt (navigator.appVersion);
			if (sAppName.indexOf ('Netscape') != -1 && nAppVersion == 4) {
				this._supportLayer = true;
				this._supportDHTML = true;
			}
		}
	}
}

oFindDOM.$find = function (sSearch) {
	var oPath;
	if (this._supportAll) {
		oPath = document.all[sSearch];
	} else if (this._supportLayer) {
		oPath = document.layers[sSearch];
	}
	return oPath;
}

oFindDOM.find = function (sSearch, sType) {
	if (this._supportDHTML) {
		var oPath;
		switch (sType) {
		case 'id' :
			oPath = (this._supportID) ? document.getElementById (sSearch) : this.$find (sSearch);
			break;
		case 'name' :
			oPath = (this._supportID) ? document.getElementsByName (sSearch) : this.$find (sSearch);
			break;
		case 'tag' :
			oPath = (this._supportID) ? document.getElementsByTagName (sSearch) : this.$find (sSearch);
			break;
		}
		return oPath;
	} else {
		alert ('DHTML is not supported by this browser.');
	}
}

delete oFindDOM;