// Script to open windows for Admin Toolbox 2.
// Last updated May 30, 2003.

var vvhqWin = null;
var bigWin = null;
var stdWin = null;

var vvhqconfig = "resizable=1,scrollbars=yes,menubar=no,toolbar=yes,status=no,width=590,height=480,top=20, left=20";
var bigconfig = "resizable=1,scrollbars=yes,menubar=no,status=no,width=600,height=500,top=20, left=20";
var stdconfig = "resizable=1,scrollbars=yes,menubar=no,status=no,width=500,height=320,top=20, left=20";

function openWin(type, content_url)
{
	thiswin = eval(type + "Win");

	// if the window is already open, change its document to content_url and bring it into focus.
	if((thiswin != null) && (thiswin.closed == false))
	{
		thiswin.focus();
		thiswin.location = content_url;
	}
	// else open the window and load content_url.
	else
	{
		thisconfig = eval(type + "config");
		eval(type + "Win" + "=window.open('" + content_url + "','',config='" + thisconfig + "')");
	}
}

function closeWin()
{
	var windowArray = new Array(vvhqWin,stdWin,bigWin);
	for (i = 0; i < windowArray.length; i++)
	{
		if (windowArray[i] != null)
		{
			if (!windowArray[i].closed)
			{(windowArray[i]).close();}
			windowArray[i] = null;
		}
	}
}