//April 4, 2006



//*******************************************************************************'

//open a new window with options



function newWindow(page, name, options, w, h)

{

	switch(arguments.length)

	{

		case 5:

		//width and height are specified, so center

		

			var winLeft = (screen.width - w) / 2;

			var winTop = (screen.height - h) / 2;

			

			options = 'height=' + h + ',top=' + winTop + ',width=' + w + ',left=' + winLeft + ',' + options

		

		case 3:

		//width and height not specified



	}

	

	//open the window with options

	var newWindow = window.open(page, name, options);

			

	//focus the window

	if(parseInt(navigator.appVersion, 10) >= 4)

	{

		newWindow.window.focus();

	}

}



//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'

//syntax version



function newwindow(page, name, options, w, h)

{

	newWindow(page, name, options, w, h)

}



//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'

//syntax version



function NewWindow(page, name, options, w, h)

{

	newWindow(page, name, options, w, h)

}



// href="page.html" onclick="newWindow(this.href,'[window_name]','resizable=no,scrollbars=yes,width=600,height=470,top=0,left=0');"



// directories - boolean - Controls the standard browser directory buttons 

// location - boolean - Controls the Location entry field 

// menubar - boolean - Controls the menu at the top of the window 

// resizable - boolean - Controls the ability to resize the window 

// scrollbars - boolean - Controls the horizontal and vertical scrollbars 

// status - boolean - Controls the status bar at the bottom of the window 

// toolbar - boolean - Controls the standard browser toolbar 

// width - numeric - Specifies the width of the window in pixels 

// height - numeric - Specifies the height of the window in pixels 

// top - position of window from top left corner in pixels

// left - position of window from top left of corner in pixels

	

// MSIE4.0+ Value Description 

// fullscreen - boolean - Specifies whether to display the browser in a full-screen or normal window. 

// channelmode - boolean - Specifies whether to display the window in theater mode and show the channel band. 



// NN4.0+ Value Description 

// alwaysLowered - boolean - Creates a new window that floats below other windows, whether it is active or not.  

// alwaysRaised - boolean - Creates a new window that floats on top of other windows, whether it is active or not.  

// dependent - boolean - Creates a new window as a child of the current window, i.e., it closes when its parent window closes.  

// hotkeys - boolean - Enables or disables most hotkeys in new window that has no menu bar.  

// innerHeight - numeric - Specifies the height, in pixels, of the window's content area. Replaces height.  

// innerWidth - numeric - Specifies the width, in pixels, of the window's content area. Replaces width.  

// outerHeight - numeric - Specifies the vertical dimension, in pixels, of the outside boundary of the window.  

// screenX - numeric - Specifies the distance the new window is placed from the left side of the screen.  

// screenY - numeric - Specifies the distance the new window is placed from the top of the screen.  

// titlebar - boolean - Controls whether the windows has a title bar.  

// z-lock - boolean - Controls whether a window rises above other windows when activated.  



// <body onBlur="window.focus()">

// <body onBlur="setTimeout=('window.focus()',1000)">

// <body onBlur="window.close()">

