// Solomon R. Guggenheim Museum
//
// JavaScript function to open a new small Window with given content
// Created on 2001-07-02 by Jan Schaumann <webmaster@guggenheim.org>

var myWin;
var myWin2;
// pops a small window with the given url
function popUp(URL) 
{
	var attr = "resizable=yes,height=400,width=600,location=yes,toolbar=yes,menubar=yes,personalbar=yes,scrollbars=yes,status=yes";

	if(myWin && !myWin.closed)
	{
		myWin.resizeTo(w,h);
		myWin.location = URL;
	}
	else
		myWin = eval(window.open(URL, "myWin", attr));
}

// pops a small window to display the given image
function popUpPic(pic, h, w, title)
{
	
	var URL = "/cgi-bin/popPic.pl?" + pic + "&" + title;
	myWin = window.open(URL, "myWin",
			"resizable=yes,height=" + h + ",width=" + w + ",scrollbars=no");
	myWin.resizeTo(w,h);
	void('');
	if (myWin2 && !myWin2.closed)
		myWin2.close();

}


function popUpFile(URL, h, w)
{
	myWin2 = window.open (URL, "myWin2",
	       "resizable=yes,height=" + h + ",width=" + w +
	       ",scrollbars=yes");
	void('');
	if (myWin && !myWin.closed)
		myWin.close();

}