
	//Declare defaults
	var _scrollbars="no";
	var _statusbar="no";
	var _menubar="no";
	var _location="no";
	var _toolbar="no";
	//Declare default popup window dimensions
	var win_width=400;
	var win_height=500;

/*	//This is the default positioning of the popup window:
	//(currently in the middle of an 800x600 screen
	var howmuch_right=400-(win_width/2);
	var howmuch_down=300-(win_height/2);
*/

function get_location()
{
	//This is the positioning of the popup window:
	//(in the middle of an 800x600 screen)
	howmuch_right=400-(win_width/2);
	howmuch_down=300-(win_height/2);
	
	if(screen.width)
	//if we can get coords of screen
	{
		if(window.screenLeft && window.innerWidth)
		//if we can get browser coordinates, then
		//move the window to the center of the browser
		//instead of the screen center
		{
		howmuch_right=(window.innerWidth/2)+window.screenLeft;
		howmuch_down=(window.innerHeight/2)+window.screenTop;
		}
		else
		//we can't get the browser info so we'll just center
		//on the screen
		{
		howmuch_right=(screen.width/2)-(win_width/2);
		howmuch_down=(screen.height/2)-(win_height/2);
		}
	}
}			

	get_location();
	
		function popup_window(page)
		{
			popup=window.open(page,"popup","toolbar="+_toolbar+",location="+_location+",directories=no,status="+_statusbar+",menubar="+_menubar+",scrollbars="+_scrollbars+",resizable=yes,width="+win_width+",height="+win_height+",alwaysRaised,screenX="+howmuch_right+",screenY="+howmuch_down);

			//redundant, but just in case browser doesn't support screenX and screenY
			//properties above
			popup.moveTo(howmuch_right,howmuch_down);
			
			//Bring the window to the front (in case browser doesn't support alwaysRaised)
			popup.focus();
		}
		
		function popup_window(page,w,h)
		{
			win_width=w;
			win_height=h;
			get_location();
			
			popup=window.open(page,"popup","toolbar="+_toolbar+",location="+_location+",directories=no,status="+_statusbar+",menubar="+_menubar+",scrollbars="+_scrollbars+",resizable=yes,width="+win_width+",height="+win_height+",alwaysRaised,screenX="+howmuch_right+",screenY="+howmuch_down);

			//redundant, but just in case browser doesn't support screenX and screenY
			//properties above
			popup.moveTo(howmuch_right,howmuch_down);
			
			//Bring the window to the front (in case browser doesn't support alwaysRaised)
			popup.focus();
		}
		
		function popup_separate(page,name)
		{
			separate=window.open(page,name,"toolbar="+_toolbar+",location="+_location+",directories=no,status="+_statusbar+",menubar="+_menubar+",scrollbars="+_scrollbars+",resizable=yes,width="+win_width+",height="+win_height+",alwaysRaised,screenX="+howmuch_right+",screenY="+howmuch_down);

			//redundant, but just in case browser doesn't support screenX and screenY
			//properties above
			separate.moveTo(howmuch_right,howmuch_down);
			
			//Bring the window to the front (in case browser doesn't support alwaysRaised)
			separate.focus();
		}
