var remote;
function managerStart(url, callback_id)  {
	w = "840";
	h = "800";
	/*
	if(remote != null)
	{
		if(!remote.closed)
		{
			if(!confirm("There is already a manager open.  Proceeding will close it."))
			{
				return false;			
			}
		}
	}
	*/
	s = "scrollbars,menubar=no,resizable,location=no,status,width=" + w + ",height=" + h + ",top=0,left=100";
	remote = window.open("", 'fileManager', s);
	if (remote != null)
	{
		if (remote.opener == null) 
		{
			remote.opener = self;
		}
		
		if(callback_id == '')
		{
			remote.location.href = url;
		}
		else
		{
			remote.location.href = url+'?callback='+callback_id;
		}
		
		remote.focus();
	}
	return false;
}

function closeAndCallback(callback, url) {
	if(window.opener.document.getElementById("req_message") == null)
	{
		alert("Oops! I can't find my parent window : "+callback+"_id");
		return;
	}
	window.opener.document.getElementById("req_message").value += ('\n'+url);
	
	window.opener.focus(); //return to the window with form
	window.close();		   //close the file manager for this item.
}
