/*
aphrodite@amxnetwork.com

ie && nn compatible vrs 4.0+ (excl 6)
pc && mac compatible
ver 0.1
*/


/* Declare the names of each of the pop windows we use as global variables
   so we can check if the window is already open i.e. so we can focus on it etc. - ED2 21/07/02 */
   
var data_processing = null;
var email = null;
var print = null;
var contacts = null;
var notes = null;
/* Variables for admin system windows, in a-z order - LC9 */
var edit = null;
var editContacts = null;
var editImage = null;
var editPub = null;
var editPubItem = null;
var newPub = null;
var newchoose = null;
var workflow_history = null;
var newsLinks = null;
var bioContacts = null;
var bioServInd = null;
var webStats = null;
/* Variables for GRaduate Recruitment - LC9 */
var data_processing_grad = null;
var links_disclaimer = null;
/* Variable for workflow userlist and page access windows - ED2 29/7/03 */
var workflow_userlist = null;
var workflow_pageusers = null;
var help_win = null;




function api_window_open(){

		var tmpStrParameters = "width=" + arguments[2] + ",height=" + arguments[3];
		if (arguments[4] != "") tmpStrParameters += ",left=" + arguments[8];
		if (arguments[5] != "") tmpStrParameters += ",top=" + arguments[6];
		if (arguments[6] != "") tmpStrParameters += ",scrollbars=" + arguments[5];
		if (arguments[7] != "") tmpStrParameters += ",location=" + arguments[7];
		if (arguments[8] != "") tmpStrParameters += ",resize=" + arguments[4];
		if (arguments[9] != "") tmpStrParameters += ",menubar=" + arguments[9];

/*		to be able to create and control windows by means of one id string:
		create a new variable - the name is same as the the id of the window.
		open a new window into this variable.
		the new window can be referenced easily by it's id.
		ie eval(varname).action();
*/


if (!eval(arguments[0]))
{
	/* If the window has not been opened then open it with the correct parameters - ED2 21/07/02 */
	eval(arguments[0] + " = window.open(arguments[1],arguments[0],tmpStrParameters)");	
}
else
{
	if (eval(arguments[0]).closed) 
	{
		/* If the window is has been closed then open it with the correct parameters - ED2 21/07/02 */
		eval(arguments[0] + " = window.open(arguments[1],arguments[0],tmpStrParameters)");	
	}
	else
	{ 
		/* If the window is open then reset it to the correct url/location and
		   focus it to the front of the screen - ED2 21/07/02 */	

		eval(arguments[0]).location = arguments[1];
		eval(arguments[0]).focus();
	}
}

}




