!**********************************************
!***Various HardCopy and File Output Options***
!**********************************************
	SUBROUTINE OptimHist()
	USE WINTERACTER
	USE SHAREDVARS
	USE RESOURCE
	INTEGER IHIST
	CALL WDialogLoad(IDD_OPTIMHIST)
	CALL WGridClear(IDF_OPTIMHIST_GRID)
	DO IHIST=0,HISTITER
		CALL WGridPutCellINTEGER(IDF_OPTIMHIST_GRID,1,IHIST+1,IHIST)
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,2,IHIST+1,-HISTFUNC(IHIST))
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,3,IHIST+1,HISTPARM(IHIST,1))
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,4,IHIST+1,HISTDFUN(IHIST,1))
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,5,IHIST+1,HISTPARM(IHIST,2))
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,6,IHIST+1,HISTDFUN(IHIST,2))
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,7,IHIST+1,HISTPARM(IHIST,3))
		CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,8,IHIST+1,HISTDFUN(IHIST,3))
		IF(NPARM.EQ.4) THEN
			CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,9,IHIST,HISTDFUN(IHIST,4))
			CALL WGridPutCellDOUBLE(IDF_OPTIMHIST_GRID,10,IHIST,HISTDFUN(IHIST,4))
		ENDIF		
	ENDDO
	CALL WDialogShow(100,100,IDD_OPTIMHIST,MODAL)
	CALL WDialogUnload()
	CALL WDialogSelect(IDD_MAIN)
	RETURN
	END SUBROUTINE OPTIMHIST

