browser = navigator.appName;
browserNum = parseInt(navigator.appVersion);

if ((browser == "Netscape") && (browserNum < 5))
{
layerRef = "document.layers['";
endLayerRef = "']";
style = "";
}
else if ((browser == "Netscape") && (browserNum >= 5))
{
layerRef = "document.getElementById('";
styleRef = ".style";
endLayerRef = "')";
}
else
{
layerRef = "document.all['";
endLayerRef = "']";
styleRef = ".style";
}

function hideLayer(layerName)
{
document.bgColor='#FFFFFF';
eval(layerRef + layerName + endLayerRef + styleRef + ".visibility = 'hidden'");

new Effect.Opacity('shadow', {to:0.0});
		$('shadow').style.display = 'none';

}

function maxHeight(elm) {
    htmlheight = document.body.parentNode.clientHeight;
		bodyheight = document.body.clientHeight;
		var height = htmlheight > bodyheight ? htmlheight : bodyheight;
		$(elm).style.height = height + 'px';
	}

function showLayer(layerName)
{
document.bgColor='#cccccc';
$(layerName).style.top=document.body.scrollTop+100;

var ie=document.all && !window.opera
var dom=document.getElementById
iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
objref=$(layerName)
var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset
var docwidth=(ie)? iebody.clientWidth : window.innerWidth
docheight=(ie)? iebody.clientHeight: window.innerHeight
var objwidth=objref.offsetWidth
objheight=objref.offsetHeight
objref.style.left=docwidth/2-objwidth/2+"px"
objref.style.top=scroll_top+docheight/3-objheight/3+"px"


eval(layerRef + layerName + endLayerRef + styleRef + ".visibility = 'visible'");
maxHeight('shadow');
var shadow = $('shadow');
		shadow.style.zIndex = 999;
		shadow.style.display = 'block';
	    new Effect.Opacity('shadow', {duration:0.5, from:0.0, to:0.2});


}

