// JavaScript Document
/* ======================================================================

	Function to produce popup window.
	Params: url = the URL of the page to pop up
			id = id of dynamic page if required
			window_width = width of window
			window_height = height of window
			window_options:
					basic = no options
					medium = resizable, scrollbars
					full = 	menubar,resizable,status bar,toolbar,
							location bar, scrollbars.
							
====================================================================== */

function genericpopup(url, id, window_width, window_height, window_options){

	// Set up the option type
	if(window_options=='basic'){
		w_options = "menubar=0,resizable=0,status=0,toolbar=0,location=0,scrollbars=0,";
	} 
	
	if(window_options=='medium'){
		// Give it the 'medium' options
		
		w_options = "resizable=0";
		//w_options = "menubar=0,resizable=1,status=0,toolbar=0,location=0,scrollbars=1,";
	}
	
	if(window_options=='full'){
		// Give it the 'full' options
		w_options = "menubar=1,resizable=1,status=1,toolbar=1,location=1,scrollbars=1,";
	}
	
	opts = "height=" + window_height.toString() + ",width=" + window_width.toString() + "," + window_options;
	window.open(url+"&pid="+id,'Window', opts);
	
}