var nScreenWidth  = screen.width;
var nScreenHeight = screen.availHeight;
var winTestVideo = null;

function GetCenterDialogParams(nWidth, nHeight)
{ 
	var strParams = "";
	if( nHeight == 0 )  // Allows for dialog to be aligned top.
		nHeight = screen.height;

	strParams += ",left=" + (nScreenWidth - nWidth)/2;
	strParams += ",top="  + (nScreenHeight - nHeight)/2;

	return strParams;
}

function OpenTestVideoWindow()
{
	var sURL = "http://www.familyvirtualvisits.com/fvvclient/testvideo.aspx";
	var intWidth   = 904;
	var intHeight  = 678;
	var strParams  = "width=" + intWidth + ",height=" + intHeight + ",menubar=0,scrollbars=auto,status=1,toolbar=0,location=0,resizable=1";
	strParams     += GetCenterDialogParams(intWidth, intHeight);

	// Open up the window
	if( winTestVideo == null || winTestVideo.closed )
		winTestVideo = window.open(sURL, "WIN_TESTVIDEO", strParams);
	else
		winTestVideo.focus();
}
