function fRegisterLayer(nID) {
	eval("oLayer"+nID+" = new oLayer("+nID+");");
}

function oLayer(nID) {
	this.nID = nID;
	this.sLayerID = "layer"+this.nID;

	var d = document;
	this.oDIV = oBrowser.DOM ? d.getElementById(this.sLayerID) : oBrowser.IE ? d.all[this.sLayerID] : d.layers[this.sLayerID];

	if (this.nID == 1) {
		this.fShowDIV();
		oNowShowingLayer = this;
	} else {
		this.fHideDIV();
	}
}


oLayer.prototype.fShowLayer = function() {
	if (window.oNowShowingLayer) {
		oNowShowingLayer.fHideLayer();
	}
	this.fShowDIV();
	oNowShowingLayer = this;
}

oLayer.prototype.fHideLayer = function() {
	this.fHideDIV();
}


oLayer.prototype.fShowDIV = function() {
	//this.oDIV.style.visibility = "visible";
	this.oDIV.style.display = 'block';
}

oLayer.prototype.fHideDIV = function() {
	//this.oDIV.style.visibility = "hidden";
	this.oDIV.style.display = 'none';
}




function fPopup(sID, x, y, sURL) {

	scrollbars = "yes";
	toolbar = "no";
	resizeable = "yes";

	if (!x) {
		x = 342;
	}
	if (!y) {
		y = 394;
	}
	if (!sURL) {
		sURL = "popup/"+sID+".html";
		scrollbars = "no";
	}

	window.status="launching pop-up window";
	this.popupWindow = window.open(sURL, sID, 'width='+x+',height='+y+',resizable='+resizeable+',scrollbars='+scrollbars+', toolbar='+toolbar);
	if (this.popupWindow) {
		this.popupWindow.focus();
		window.status="done";
	} else {
		window.status="popup blocked";
	}
}




