// GSRPOP Window Opening Script
// Version 1.2 2009-05-06 - Customized for KyleighsLaw.org Website
// greg@gsrhost.net
function gsrpop(url, width, height, toolsInd, wname)
{
	var options = "width=" + width + ",height=" + height + ",top=" + ((screen.height - height) / 4).toString() + ",left=" + ((screen.width - width) / 2).toString();

	switch (toolsInd)
	{
		case 1:
			options += ",menubar=no,toolbar=no,status=no,resizable=no,location=no,scrollbars=yes";
			break;
		case 2:
			options += ",menubar=no,toolbar=no,status=no,resizable=no,location=yes,scrollbars=yes";
			break;
		case 3:
			options += ",menubar=no,toolbar=no,status=no,resizable=no,location=no,scrollbars=yes";
			break;
		case 4:
			options += ",menubar=yes,toolbar=yes,status=yes,resizable=yes,location=yes,scrollbars=yes";
			break;			
		default:
			//do nothing
			break;
	}

	if (!wname)
	{
		wname = "default_popup_window";
	}

	popupWindow = window.open(url, wname, options);

	if (popupWindow)
	{
		popupWindow.focus();
	}
}

//<a href="javascript:gsrpop('http://target.url.com', 540, 525, 1, 'window_name')">Example Link</a>