/*
	Created by Dan Narsavage to contain commonly used javascript functions
	April 7, 2004
*/

var sizedWin=0;
var queryWin=0;
function openQueryWindow(URLStr)
{
	self.window.name = 'mainWindow';
	LeftPosition=(screen.width)?(screen.width-700)/2:100;
	TopPosition=(screen.height)?(screen.height-500)/2-150:100;
	if ((queryWin) && (!queryWin.closed)) queryWin.close();
	queryWin = open(URLStr, 'SearchWindow', 'toolbar=yes, location=yes, directories=no, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, top=' + TopPosition + ', left=' + LeftPosition + ', width=700, height=550');
	queryWin.focus();
	queryWin.opener.name = 'mainWindow';
//	alert(queryWin.opener.name);
}

function openSizedWindow(URLStr, width, height)
{
	LeftPosition=(screen.width)?(screen.width-width)/2:100;
	TopPosition=(screen.height)?(screen.height-height)/2-150:100;
	if ((sizedWin) && (!sizedWin.closed)) sizedWin.close();
	sizedWin = open(URLStr, 'SizedWindow', 'toolbar=yes, location=yes, directories=no, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, top=' + TopPosition + ', left=' + LeftPosition + ', width='+width+', height='+height+'');
	sizedWin.focus();
}

