//Note:These scripts are used to determine whether a pop-up blocker enabled on the system.
//Author: G. Klok

function sessionAcceptsPopups(sessionFieldName, formName)
{
	var screenWidth, screenHeight;
	screenWidth = screen.width - 102;
	screenHeight = screen.height - 102;
	windowObject = window.open('http://www.parcelplatform.com','PARCEL','width=101,height=101,alwaysLowered=yes,left='+screenWidth+',top='+screenHeight);
    if (windowObject == null)
    {
        alert (	"A pop-up blocker was detected.\n" +
        		"Some features of PARCEL may not be fully functional without pop-ups enabled.\n" +
        		"Add PARCEL to your allow list without your pop-up blocker to work around this issue.");
        setSessionPopupField (sessionFieldName, formName, 'false');
    }
    else
    {
		windowObject.close();
        setSessionPopupField (sessionFieldName, formName, 'true');
    }
}

function setSessionPopupField (sessionFieldName, formName, popupsAccepted)  
{   

	if (formName != '')  
	{ 
		var thisform = document.forms[formName];
	} 
	else 
	{ 
		var thisform = document.forms[0];  
	} 
	
	thisform[sessionFieldName].value = popupsAccepted;   
} 