
Event.observe(window, 'load', function()
    {
        $$('span.psuedoLink').each(function(e)
	    {
		    e.innerHTML = "[info]";
	    });
	});

function showPopup(url)
{
	var myHeight = document.viewport.getHeight();
	
	offset = getYOffset();
	
	var backing = document.createElement('div');
	var main = document.createElement('div');
	backing.setAttribute("class", "popupBackground");
	backing.setAttribute("onclick", "javascript:removePopup()");
	backing.setAttribute("id", "popupBackground");
	backing.setAttribute("style", "height: " + getDocHeight() + "px;");
	main.setAttribute("class", "popupPage");
	main.setAttribute("id", "popupPage");
	main.setAttribute("style", "top: " + ((myHeight / 4) + offset) + "px;");
	
	var container = document.getElementById("popupContainter");
	
	container.appendChild(backing);
	container.appendChild(main);
	
	new Ajax.Updater('popupPage', url, { parameters: {}});
}

function removePopup(item)
{
	var container = document.getElementById("popupContainter");
	container.removeChild(document.getElementById("popupBackground"));
	container.removeChild(document.getElementById("popupPage"));
}

function getDocHeight() 
{
    return Math.max(Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),Math.max(document.body.clientHeight, document.documentElement.clientHeight));
}

function getYOffset() 
{
	var yOffset = 0;
	if(typeof( window.pageYOffset ) == 'number') 
	{
		yOffset = window.pageYOffset;
	} 
	else if(document.body && ( document.body.scrollLeft || document.body.scrollTop)) 
	{
		yOffset = document.body.scrollTop;
	} 
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop)) 
	{
		yOffset = document.documentElement.scrollTop;
	}
	return yOffset;
}