// Declare a global to keep track of the window
var artPopWindow;
var gridPopWindow;
var pressPopWindow;

function artPopper(url,size)
{
	// Format the extras and add position
	//stuff = size_and_extras + ', top=' + top.ypos + ', left=' + top.xpos; 
	stuff = size+', scrollbars=no, location=no, status=no';	
	name = 'artPopWindow';
	
	// See if the window is closed
	if(!artPopWindow || artPopWindow.closed)
	{
		artPopWindow = window.open(url,"name",stuff);
	}
	// If not close and remake, in case its a new qmark
	else
	{	
		artPopWindow.close();
		artPopWindow = window.open(url,"name",stuff);
	}
	
}

function gridPopper(url)
{
	// Format the extras and add position
	//stuff = size_and_extras + ', top=' + top.ypos + ', left=' + top.xpos; 
	stuff = 'width=740, height=450, scrollbars=yes, location=no, status=no';	
	name = 'gridImgPop';
	
	gridPopWinow = window.open(url,"name",stuff);
	
}

function pressPopper(url)
{
	// Format the extras and add position
	//stuff = size_and_extras + ', top=' + top.ypos + ', left=' + top.xpos; 
	stuff = 'width=550, height=700, scrollbars=yes, location=no, status=no';	
	name = 'pressPopWindow';
	url='/gallery/press_popups/'+url;
	
	// See if the window is closed
	if(!pressPopWindow || pressPopWindow.closed)
	{
		pressPopWindow = window.open(url,"name",stuff);
	}
	// If not close and remake, in case its a new qmark
	else
	{	
		pressPopWindow.close();
		pressPopWindow = window.open(url,"name",stuff);
	}
	
}