// JavaScript functions

function popUp(URL, w, h, s) 
{
	day = new Date();
	id = day.getTime();
	t = (screen.height - h) / 2;
	l = (screen.width  - w) / 2;
		
	if (URL.indexOf("?") != -1) URL += "&";
	else URL += "?";
	
	URL += "FormId=";
	URL += id;
		
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=" + s + ",location=0,statusbar=0,menubar=0,resizable=1,width=" + w + ",height=" + h + ",left = " + l + ",top = " + t + "');");
}

function logoutIfClosed()
{
    if (window.event.clientX < 0 && window.event.clientY < 0)
    {
        popUp('Logout.aspx', 1, 1, 0);
    }    
}


