/**********************************************************************************************
*
*		Example HTML Hyperlink launching URL in a seperate window
*
*	blMenuBar		- If true, creates the menu at the top of the window.
*
*   blResizable	    - If true, allows a user to resize the window.
*
*	blToolBar		- If true, creates the standard browser toolbar, with buttons such as Back and Forward.
*
*	blScrollBars	- If true, creates horizontal and vertical scrollbars when the Document grows 
*					  larger than the window dimensions.
*   blStatusBar		- If true, creates the statusbar at the bottom of the window.
*	
**********************************************************************************************/
		//Make sure this include file is placed between <Head></Head> HTML tags 
		
		var TheWindow 							//global
		var WasTheWindowOpened
		var iWindowNumber = 0					//Number of windows opened
		TheWindow = new Array(25)				
		WasTheWindowOpened = new Array(25)
		window.onerror=null
	
		function Popup_Window(theURL, sWindowName, iwidth, iHeight, 
							   blMenuBar, blToolBar, blScrollBars, blStatusBar, 
		                       blResizable, iWindowNo)
	{
		var iTop
		var iLeft
		var scrollbars = ''
		var toolbar = ''
		var resizable  = ''
		var menubar  = ''
		var statusbar  = ''
		
		
		if(!TheWindow[iWindowNo] || TheWindow[iWindowNo].closed) {
			if (blScrollBars == true){
				scrollbars = 'scrollbars'
			}
			if (blToolBar == true){
				toolbar = 'toolbar'
			}
			if (blMenuBar == true){
				menubar = 'menubar'
			}
			if (blResizable == true){
				resizable = 'resizable'
			}
			if (blStatusBar == true){
				statusbar = 'status'
			}		
			
			iWindowNumber = iWindowNumber + 1;
			
			WasTheWindowOpened[iWindowNo] = true
					
						
			//Calulate Window Center
			
			iTop = (screen.height - iHeight) / 2
			iLeft = (screen.width - iwidth) / 2
								
			TheWindow[iWindowNo] = window.open(theURL, sWindowName,'width=' + iwidth + 
			',height=' + iHeight + ',top=' + iTop + ',left=' + iLeft +
			',' + scrollbars + ',' + toolbar + ',' + menubar
			+ ',' + resizable + ',' + statusbar);
		
			if (TheWindow[iWindowNo].opener == null) TheWindow[iWindowNo].opener = window;
			TheWindow[iWindowNo].focus();
			TheWindow[iWindowNo].opener.name = 'opener';
			
		} else {
			TheWindow[iWindowNo].focus()
		}
			
	}