function toggleMLA(div_id) 
{
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) 
	{	
		el.style.display = 'block';
	}
	else 
	{
		el.style.display = 'none';
	}
}
function blanket_sizeMLA(popUpDivVar, blanketName, popupHeight) 
{
	if (typeof window.innerWidth != 'undefined') 
	{
		viewportheight = window.innerHeight;
	} 
	else 
	{
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) 
	{
		blanket_height = viewportheight;
	}
	else 
	{
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight)
		{
			blanket_height = document.body.parentNode.clientHeight;
		} 
		else 
		{
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
	
	var ScrollTop = document.body.scrollTop;

 

	if (ScrollTop == 0)

	{

    	if (window.pageYOffset)

        	ScrollTop = window.pageYOffset;

    	else

        	ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;

	}

	var blanket = document.getElementById( blanketName );
	blanket.style.height = blanket_height + 'px';
	var popUpDiv = document.getElementById(popUpDivVar);
//	popUpDiv_height = blanket_height/2-popupHeight/2;
	popUpDiv_height = ScrollTop + viewportheight/2;
	popUpDiv.style.top = popUpDiv_height + 'px';
}
function window_posMLA(popUpDivVar, popupWidth) 
{
	if (typeof window.innerWidth != 'undefined') 
	{
		viewportwidth = window.innerHeight;
	} 
	else 
	{
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) 
	{
		window_width = viewportwidth;
	} 
	else 
	{
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) 
		{
			window_width = document.body.parentNode.clientWidth;
		} 
		else 
		{
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width=window_width/2-popupWidth/2;
	popUpDiv.style.left = window_width + 'px';
}

function popupMLA(windowname, blanketName) 
{
	blanket_sizeMLA(windowname, blanketName, 300);
	window_posMLA(windowname, 650);
	toggleMLA(blanketName);
	toggleMLA(windowname);		
}