//javascript JsLayer class
// created by Filippo di Pisa
// 15 Feb 2007
//How to use
//include this library into the html file
//	request.stContent.stConfig.lstJavaScriptFiles = listAppend(request.stContent.stConfig.lstJavaScriptFiles,'/_hbi/_lib/JsLayer.js');
//Example:
//var myLayer = new JsLayer(document.getElementById('layer'));
//myLayer.display();

function JsLayer(div)
{
	this.__layer = div;
	this.display = display;
	this.close = close;
	
}


//hide or disply a layer
function display()
{
	this.__layer.style.display = this.__layer.style.display == 'inline'? 'none':'inline';
	
	// Hide select boxes as they will 'peek' through the overlay in IE
		selects = document.getElementsByTagName("select");
        for (i = 0; i != selects.length; i++) {
                selects[i].style.visibility = 'hidden';
        }
}

function close()
{
	this.__layer.style.display = this.__layer.style.display == 'inline'? 'none':'inline';
	
	// Show select boxes
		selects = document.getElementsByTagName("select");
        for (i = 0; i != selects.length; i++) {
                selects[i].style.visibility = 'visible';
        }
}

