
var infowin = null;

function newPopWin(url,w,h)
{
  infowin = window.open("","","toolbar=yes,location=yes,scrollbars=yes,resizable=yes,top=20,left=20,width=" + w + ",height=" + h);
  if (infowin != null)
  {
    infowin.location.href = url;
// is the window.focus method supported by this verison of javascript
// if so, then do it.
    if (window.focus)
    {
       infowin.focus();
    }
  }
// return true;
}

function closePopWin()
{
  if (infowin != null && infowin.open) infowin.close();
// return true;
}                                           

var NewWindow;
function ProfilePop(username) {
	NewWindow = window.open("https://gremlin.bc.edu/faculty/profile.page/FACPROF_ITEMID="+username,"popupwin","width=680,height=450,left=0,top=50,resizable=yes,scrollbars=1,toolbar=1,location=0,favorites=0, status=1, bookmarks=1");
}
// this function tests to see if the new window is open and if it is it brings it to the front

function test_for_newwindow() {
	if (!NewWindow || NewWindow.closed) return;
	else 
		NewWindow.focus();
}

