/***************************************************************

 * FILENAME: 		generalFunctions.js

 * AUTHOR:			Philip Yan

 * CREATION DATE:	9.7.2001

 * DESCRIPTION:		General JavaScript functions

 ***************************************************************/


function openWindow(url) {

	window.open(url, "newwin", "width=425,height=500");

}


function openNewWindow(page,name,width,height,top,left,propSet) {


	var windowProps = new Array (8);


	windowProps[0] = "resizable=yes";

	windowProps[1] = "scrollbars=yes";

	windowProps[2] = "titlebar=yes";

	windowProps[3] = "toolbar=yes";

	windowProps[4] = "menubar=yes";

	windowProps[5] = "location=yes";

	windowProps[6] = "status=yes";

	windowProps[7] = "directories=yes";


	

	var myProps = "";

	var mySize = "";


	

	if (propSet == 'one') {

		 myProps = ',' + windowProps[0] + ',' + windowProps[1];

	} else if (propSet == "full") {

		myProps = ',' + windowProps.join(",");

	} else {

		myProps = "";

	}	

	if ((width > 50)||(height > 50)) {

		var mySize = 'width=' + width + ',' + 'height=' + height + ',' + 'top=' + top + ',' + 'left=' + left;

	}

	

	var myString = mySize + myProps;

	window.open(page,name,myString);


}
