
var lastopened
function getYear()
{
    document.write(new Date().getYear());
}



function show(lid) {
var aElement = document.getElementById(lid)		
if (lastopened) {
	lastopened.close();
}

var left = (document.parentWindow.screen.width / 2) - 130;
var top = (document.parentWindow.screen.height / 2 ) - 75;
MyWnd = window.open('#', '_new', "left=" + left + ", top=" + top + ", width=260,height=150,resizable=yes,menubar=no,titlebar=yes,toolbar=no,scrollbars=auto,location=no,status=no");
MyWnd.document.writeln("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"/css/default.css\" /></head>");
MyWnd.document.writeln("<body style=\"padding: 20px;\"/>");
MyWnd.document.writeln(document.getElementById(lid).innerHTML);
MyWnd.document.writeln("</body></html>")			
MyWnd.focus();		
lastopened = MyWnd	
}



function showLayer(object) {
	if (lastopened != null) {
		hideLayer(lastopened)
	}
	document.getElementById(object).style.visibility = 'visible';
    document.getElementById(object).style.display = 'inline';		

	document.getElementById(object).style.left = event.clientX + document.body.scrollLeft + 10;
	document.getElementById(object).style.top = event.clientY + document.body.scrollTop;						
	lastopened = object
}

function tryHide(object) {
	setTimeout('hideLayer(\'' + object + '\');', 5000);
}

function hideLayer(object) {
    document.getElementById(object).style.visibility = 'hidden';
    document.getElementById(object).style.display = 'inline';
}


