function openWindow(theURL,winName,width,height)
{
	popup = window.open(theURL, winName, 'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no,toolbar=no,location=no,directories=no,status=yes');
	popup.focus();
	moveToCenter(popup, width, height);
}

function moveToCenter(wind, winX, winY)
{
	screenWidth = screen.availWidth;
	screenHeight = screen.availHeight;
	finalX = (screenWidth / 2) - (winX/2);
	finalY = (screenHeight / 2) - (winY/2);
	wind.moveTo(finalX, finalY);
	wind.focus();
}
