	function subdir,b

;+	Returns pathname of the subdirectory
;	containing given file.
;-	Input argument - pathname of the file

	CASE !version.OS OF

'windows':	Delim='\'

'Win32':	Delim='\'

ELSE:		Delim='/'

	ENDCASE

	j=0

	while strpos(b,Delim,j) ge 0 do j=j+1

	return,strmid(b,0,j-1)

	end
