// JavaScript Document

var new_win = true;
var debug = false;

function doPopUp(page_href)
{

	// to allow user the option of disabling new window behavior
	if(new_win == true)
	{
		window_name = "acoma_gallery";
	}
	else
	{
	 window_name = "_self";
	}
	
	var width = "800";
	var height = "650";
	
	// make sure we don't open a window larger than the user's screen
	// provide a margin of 50px if it's close, so as not to disorient user
	if(screen.availWidth - width <= 50)
	{
		width = screen.availWidth - 50;
	}
	if(screen.availHeight - height <= 50)
	{
		height = screen.availHeight - 50;
	}
	
	if(debug)
	{
		alert("availWidth = " + screen.availWidth + "; availHeight = " + screen.availHeight + "; width = " + width + "; height = " + height);
		widthDiff = screen.availWidth - width;
		heightDiff = screen.availHeight - height;
		alert("widthDiff = " + widthDiff + "; heightDiff = " + heightDiff);
	}

 window.open(page_href,window_name,"menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=yes" + ",width=" + width + ",height=" + height);

}

function Gallery07(html_page)
{
	var base_dir = "/gallery/2007";
	var page_href = base_dir + "/" + html_page;
	
	doPopUp(page_href);
}

function Gallery08(html_page)
{
	var base_dir = "/gallery/2008";
	var page_href = base_dir + "/" + html_page;
	
	doPopUp(page_href);
}

function Gallery400Club(html_page)
{
	var base_dir = "/gallery/400club";
	var page_href = base_dir + "/" + html_page;
	
	doPopUp(page_href);
}