function PopWindow( w, h, url, event, position, windowName )
{
	var Props = "";
	if ( position=="center")
	{
		
     var wLeft = (screen.width - w) / 2;
     var wTop = (screen.height - h) / 2;
	  Props = "left=" + wLeft + ",top=" + wTop;
	}
	else
	{
		if( navigator.appName.indexOf( "Explorer") >= 0 ) 
		{	// Microsoft IE
			Props = Props+",left=" + (event.screenX-200);
			Props = Props+",top=" + (event.screenY+10);
		}
		else 
		{	// Netscape coordinates must be adjusted for scrolling
			Props = Props+",left="+ (event.screenX - pageXOffset + 5);
			Props = Props+",top="+  (event.screenY - pageYOffset + 5);
		}
	}
	Props+=
		",navigation=no,menubar=no,resizable=yes,toolbar=no," +
		"titlebar=no,scrollbars=yes,width=" + w +
		",height=" + h;
	var win;
	if (windowName)
		win = window.open(url, windowName, Props);
	else	
		win = window.open( url, "mywin", Props);
	win.focus();	// Make sure the windows comes up on top

	return true;
}
