

// pop up

//----------------------------------------------------------
	// Name		: popwin
	// Purpose	: Create Popup Window
	//----------------------------------------------------------
	//
	function popwin(url, name, width, height, location, menubar, status, toolbar)
	{
		if (name == null)
		{
			name = "stdWin";
		}
		if (width == null)
		{
			width = 550;
		}
		if (height == null)
		{
			height = 500;
		}
		if (location == null)
		{
			location = "no"
		}
		if (menubar == null)
		{
			menubar = "yes"
		}
		if (status == null)
		{
			status = "yes"
		}
		if (toolbar == null)
		{
			toolbar = "yes"
		}

		popup = window.open(url, name, 'width=' + width + ',height=' + height + ',location=' + location + ',menubar=' + menubar + ',status=' + status + ',toolbar=' + toolbar +',scrollbars=yes,resizable=yes,screenx=0,screeny=0,left=0,top=0');
		if (window.focus) setTimeout("popup.focus()",100);
	}

function openThis(page){
	var myWidth = 400; var _width = 0; var centered_width = 0; _width = screen.availWidth;
	var myHeight = 460; var _height = 0; var centered_height = 0; _height = screen.availHeight;
	if (_width>myWidth) centered_width = (_width-myWidth)/2;
	if (_height>myHeight) centered_height = (_height-myHeight)/2;
	viewer = window.open(page,"viewer","top="+centered_height+",left="+centered_width+",status=yes,scrollbars=yes,menubar=no,resizable=yes,width="+myWidth+",height="+myHeight);
	viewer.focus();
}

function openThis2(page){
	var myWidth = 400; var _width = 0; var centered_width = 0; _width = screen.availWidth;
	var myHeight = 460; var _height = 0; var centered_height = 0; _height = screen.availHeight;
	if (_width>myWidth) centered_width = (_width-myWidth)/2;
	if (_height>myHeight) centered_height = (_height-myHeight)/2;
	viewer = window.open(page,"viewer","top=0,left=0,status=yes,scrollbars=yes,menubar=no,resizable=yes,width="+myWidth+",height="+myHeight);
	viewer.focus();
}
