<!--
function openWin(url,winname,attributes)
{ window.open(url,winname,attributes); }

function getScreenWidth()
{
  if(self.screen) return screen.width;
	else if(self.java)
	{
	  var jat = java.awt.Toolkit.getDefaultToolkit();
		var res = jat.getScreenSize();
		return res.width;
	}
	return 640;
}

function getScreenHeight()
{
  if(self.screen) return screen.height;
	else if(self.java)
	{
	  var jat = java.awt.Toolkit.getDefaultToolkit();
		var res = jat.getScreenSize();
		return res.height;
	}
	return 480;
}

function popupCenter(url,name,features,width,height)
{
  var screenWidth = parseInt(getScreenWidth(),10);
	var screenHeight = parseInt(getScreenHeight(),10);
	var xpos = (screenWidth - parseInt(width,10)) / 2 ;
	var ypos = (screenHeight - parseInt(height,10)) / 2 ;
	var properties = features + ",screenX=" + xpos + ",screenY=" + ypos;
	properties = properties + ",left=" + xpos + ",top=" + ypos;
	window.open(url,name,properties);
	/*
	Example:
	<a href="javascript:;" onClick="popupCenter('calendar.jsp','calwin','resize=no,width=260,height=200',260,200);">
	<img src="calendar.gif" border="0">
	</a>
	*/
}

function popupWindow(url,name,features,width,height)
{
  var properties = "";
  var xpos = 0;
	var ypos = 0;
  var IE = document.all;
	var NS = document.layers;
  var screenWidth = parseInt(getScreenWidth(),10);
	var screenHeight = parseInt(getScreenHeight(),10);
	if(IE)
	{
	  xpos = event.clientX + document.body.scrollLeft;
		ypos = event.clientY + document.body.scrollTop;
	}
	else if(NS)
	{
	  xpos = (screenWidth - parseInt(width,10)) / 2 ;
		ypos = (screenHeight - parseInt(height,10)) / 2 ;
	}
	else
	{
	  xpos = 50;
		ypos = 50;
	}
  properties = features + ",screenX=" + xpos + ",screenY=" + ypos + ",left=" + xpos + ",top=" + ypos;
  window.open(url,name,properties);
	/*
	Example:
	<a href="javascript:;" onClick="popupWindow('calendar.jsp','calwin','resize=no,width=260,height=200',260,200);">
	<img src="calendar.gif" border="0">
	</a>
	*/
}
//-->
