	w_openwindow = null;
	function open_window(nurl,windowname,width,height, leftPos, topPos, newwindow)
	{
		if (typeof leftPos == 'undefined' || leftPos < 0) leftPos = (self.screen.width-width-25)/2;
		if (typeof topPos == 'undefined' || topPos < 0) topPos = (self.screen.height-height-25)/2;	
		if (typeof newwindow == 'undefined') newwindow = 0;

		if (newwindow == 1)
		 	window.open(nurl, windowname,'width='+width+',height='+height+',left='+leftPos+',top='+topPos+',directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
		else if (newwindow == 2)
			w_openwindow = window.open(nurl, windowname,'width='+width+',height='+height+',left='+leftPos+',top='+topPos+',directories=no,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes');
		else
			w_openwindow = window.open(nurl, windowname,'width='+width+',height='+height+',left='+leftPos+',top='+topPos+',directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
	}
	
	function focus_check()
	{	   
		// Proceed if window handler is not null
	 	if (w_openwindow != null) 
		{								
		 	if (!w_openwindow.closed) 
				w_openwindow.focus();	// if it's not closed, reset focus
			else
				w_openwindow = null; 	// if closed then set handler to null
		}
		
	}
		
	function confirmation(message)
	{
		if (confirm(message))
			return true;
		else
			return false;
	}

	function setClass(theid, name) {
		/* Create pointer to clicked object */
		td = document.getElementById(theid);
		td.className = name;
	}
	
	function setText(theid, text) {
		/* Create pointer to clicked object */
		td = document.getElementById(theid);
		td.innerHTML = text;
	}
	
	function displayHelp(id)
	{
		alert('Not yet implemented.');
		//open_window('index.php?action=help.frames.display&tpl=frame', 'HelpSystem', 700, 500);
	}	
