/*****************************************************************************/
/*                                                                           */
/* File Name: open_window.js                                                 */
/* Page Version: 1.0                                                         */
/* Creation Date: 9/1/2002                                                   */
/* Created By: Joshua Wolfe <jwolfe@wolfecomputers.com>                      */
/*                                                                           */
/*****************************************************************************/
/*                                                                           */
/* This script is used to open a new pop-up window. The only varibles        */
/* required to pass to this script is the URL of the page you want to load   */
/* in the pop-up window, and the size of the pop-up window. This script      */
/* should be called from the <head> section of the the page.                 */
/* <SCRIPT language="JavaScript" src="open_window.js"></SCRIPT>              */
/*                                                                           */
/*****************************************************************************/
/*                                                                           */
/* This script may only be used with permission from WolfeComputers.com!     */
/*                                                                           */
/*****************************************************************************/

function open_window(url,width,height,resizable,scrollbars) {

	//Set the yes and no varibles
	var yes	= 1;
	var no = 0;

	//The following varibles set the new windows features
	var menubar = no;
	var locationbar = no;
	var directories = no;
	var statusbar = no;
	var toolbar = no;
	var titlebar = resizable;

	//Centers the new window in the center of the screen
	var top = (screen.height - height) /2;
	var left = (screen.width - width) /2;

	//Sets the popup parameters
	str = "width=" + width + ", height=" + height + ",top=" + top + ",left=" + left + ",";
	str += "menubar=" + menubar + ",";
	str += "scrollbars=" + scrollbars + ",";
	str += "location=" + locationbar + ",";
	str += "directories=" + directories + ",";
	str += "resizable=" + resizable + ",";
	str += "status=" + statusbar + ",";
	str += "toolbar=" + toolbar + ",";
	str += "titlebar=" + titlebar;

	//Opens the popup window
	window.open( url, 'popup', str );

}