function closeProject(idx, curopen, menuid)
{
	// If the project is currently open, then confirm that the user wants to save changes and close
	if(curopen)
	{
		// TODO: Confirm
		_e('destinput').value = 'closeproject';
		if(_e('design_form') != null)
			_e('design_form').submit();
		else if(_e('addphotos_form') != null)
			_e('addphotos_form').submit();
		else if(_e('updateform') != null)	// For finish page
		{
			buildImagePositions();
			_e('updateform').submit();
		}
	}
	// Otherwise, just make an ajax request to close the project and remove it from the menu
	else
	{
		var li = _e(menuid);
		li.parentNode.removeChild(li);
		ajax_get('closeproject?idx='+idx, null);
	}
}
