// this will open a new window, submit the poll form, and send the results to the popup window
function pollSubPop (earl, name, widgets, specialsURL) 
{
	host = location.hostname;
	if (host.indexOf('homepage') != -1) 
	{
		var url = 'http://www.lawschool.cornell.edu/library' + earl;
	}
	else
	{
		var url = earl;
	}
	popupWin = window.open(url, name, widgets);
	popupWin.opener.top.name = "opener";
	popupWin.focus();
}

// this is for opening pop-up windows
function openWindow (earl,name,widgets) 
{
	host = location.hostname;
	if (host.indexOf('homepage') != -1) 
	{
		var url = 'http://www.lawschool.cornell.edu/library' + earl;
	}
	else
	{
		var url = earl;
	}
	popupWin = window.open (url,name,widgets);
	popupWin.opener.top.name="opener";
	popupWin.focus();
}

// sk
// This allows you to redirect the main browser window to a new URL when launching a popup
function jumpLink( earl, name, widgets, specialsURL ) 
{
	host = location.hostname;
	if ( host.indexOf( 'homepage' ) != -1 ) 
	{
		var url = 'http://www.lawschool.cornell.edu/library' + earl;
	}
	else
	{
		var url = earl;
	}
	popupWin = window.open( url, name, widgets );
	if (specialsURL)
	{
		popupWin.opener.location = specialsURL;
	}
	popupWin.opener.top.name = "opener";
	popupWin.focus();
}

function closeWindow () 
{
	parent.close ();
}

function goTW()
{
	var URL = document.pathfinder.site.options[document.pathfinder.site.selectedIndex].value;
	window.location.href = URL;
}
