function ShowLay(name)
{
	var obj = document.getElementById(name);
	
	if (obj)
		obj.style.visibility = '';
		
}

function HideLay(name)
{
	var obj = document.getElementById(name);
	if (obj)
		obj.style.visibility = 'hidden';
		
}

function GetAbsPos(strCurr)
{
var elmCurr = document.getElementById(strCurr);
var intX = 0;
var intY = 0;
do 
{
intX += elmCurr.offsetLeft;
intY += elmCurr.offsetTop;
}
while ((elmCurr = elmCurr.offsetParent));

abspos = new Array();
abspos[0] = intX;
abspos[1] = intY;
return abspos;

}


function UpdatePos()
{
	pos = GetAbsPos('menu1');
	
	if (document.getElementById('lay1'))
	{
				document.getElementById('lay1').style.left = pos[0];
				document.getElementById('lay1').style.top = pos[1]+21;
				
				pos = GetAbsPos('menu2');
				document.getElementById('lay2').style.left = pos[0];
				document.getElementById('lay2').style.top = pos[1]+21;
				
				pos = GetAbsPos('menu3');
				document.getElementById('lay3').style.left = pos[0];
				document.getElementById('lay3').style.top = pos[1]+21;
				
				pos = GetAbsPos('menu4');
				document.getElementById('lay4').style.left = pos[0];
				document.getElementById('lay4').style.top = pos[1]+21;
				
				pos = GetAbsPos('menu5');
				document.getElementById('lay5').style.left = pos[0];
				document.getElementById('lay5').style.top = pos[1]+21;
				
				pos = GetAbsPos('menu6');
				document.getElementById('lay6').style.left = pos[0];
				document.getElementById('lay6').style.top = pos[1]+21;
		}
			
}


function openEvent(id)
{
	window.open('content/event_detail.php?id='+id,'eventWin','width=500,height=480,menubar=no,toolbar=no,statusbar=no,scrollbars=yes');
	
}

function goForm(id)
{
        window.open('https://www.thelegacycenter.com/content/subscribe.php?id='+id,'subs','width=865,height=700,scrollbars=yes,toolbar=yes,menubar=yes,status=yes,resizable=yes,location=yes');
}

