// JavaScript Document
function popup(url, width, height, toolsInd, wname)
{
	var w = screen.width;
	var h = screen.height;
	var leftPos = 0;
	var topPos = 0;
	if(w != null && h != null)
	{
		leftPos = (w-width)/2;
		topPos = (h-height)/2;
	}
	var options = "width=" + width + ",height=" + height + ",top=" + topPos + ",left=" + leftPos;
	var moreOptions = "";
	var windowName = wname;
	if (windowName == "")
		windowName = "Presentation";
	switch (toolsInd)
	{
		case 0 : moreOptions = ""; break;
		case 1 : moreOptions = ",toolbar=no,status=no,resizable=no,scrollbars=no"; break;
		case 2 : moreOptions = ",menubar=yes,toolbar=yes,status=yes,resizable=yes,location=yes,scrollbars=yes"; break;
		default : moreOptions = ""; break;
	}			
	options += moreOptions;
	popupWindow = window.open(url, windowName, options);
	popupWindow.focus();
}