' shade recessions identified by NBER
' 9/19/2000 h
'
' g1: name of graph object to add shades
' f : scalar for frequency (f=4 for quarterly and f=12 for monthly)

subroutine shadeUSRecessions(graph g1, scalar f)

	if (f = 12) then
		g1.draw(shade,bottom) 1857:06 1858:12
		g1.draw(shade,bottom) 1860:10 1861:06
		g1.draw(shade,bottom) 1865:04 1867:12
		g1.draw(shade,bottom) 1869:06 1870:12
		g1.draw(shade,bottom) 1873:10 1879:03
		g1.draw(shade,bottom) 1882:03 1885:05
		g1.draw(shade,bottom) 1887:03 1888:04
		g1.draw(shade,bottom) 1890:07 1891:05
		g1.draw(shade,bottom) 1893:01 1894:06
		g1.draw(shade,bottom) 1895:12 1897:06
		g1.draw(shade,bottom) 1899:06 1900:12
		g1.draw(shade,bottom) 1902:09 1904:08
		g1.draw(shade,bottom) 1907:05 1908:06
		g1.draw(shade,bottom) 1910:01 1912:01
		g1.draw(shade,bottom) 1913:01 1914:12
		g1.draw(shade,bottom) 1918:08 1919:03
		g1.draw(shade,bottom) 1920:01 1921:07
		g1.draw(shade,bottom) 1923:05 1924:07
		g1.draw(shade,bottom) 1926:10 1927:11
		g1.draw(shade,bottom) 1929:08 1933:03
		g1.draw(shade,bottom) 1937:05 1938:06
		g1.draw(shade,bottom) 1945:02 1945:10
		g1.draw(shade,bottom) 1948:11 1949:10
		g1.draw(shade,bottom) 1953:07 1954:05
		g1.draw(shade,bottom) 1957:08 1958:04
		g1.draw(shade,bottom) 1960:04 1961:02
		g1.draw(shade,bottom) 1969:12 1970:11
		g1.draw(shade,bottom) 1973:11 1975:03
		g1.draw(shade,bottom) 1980:01 1980:07
		g1.draw(shade,bottom) 1981:07 1982:11
		g1.draw(shade,bottom) 1990:07 1991:03
	else
		if (f = 4) then

			g1.draw(shade,bottom) 1857:2 1858:4
			g1.draw(shade,bottom) 1860:4 1861:2
			g1.draw(shade,bottom) 1865:2 1867:4
			g1.draw(shade,bottom) 1869:2 1870:4
			g1.draw(shade,bottom) 1873:4 1879:1
			g1.draw(shade,bottom) 1882:1 1885:2
			g1.draw(shade,bottom) 1887:1 1888:2
			g1.draw(shade,bottom) 1890:3 1891:2
			g1.draw(shade,bottom) 1893:1 1894:2
			g1.draw(shade,bottom) 1895:4 1897:2
			g1.draw(shade,bottom) 1899:2 1900:4
			g1.draw(shade,bottom) 1902:3 1904:3
			g1.draw(shade,bottom) 1907:2 1908:2
			g1.draw(shade,bottom) 1910:1 1912:1
			g1.draw(shade,bottom) 1913:1 1914:4
			g1.draw(shade,bottom) 1918:3 1919:1
			g1.draw(shade,bottom) 1920:1 1921:3
			g1.draw(shade,bottom) 1923:2 1924:3
			g1.draw(shade,bottom) 1926:4 1927:4
			g1.draw(shade,bottom) 1929:3 1933:1
			g1.draw(shade,bottom) 1937:2 1938:2
			g1.draw(shade,bottom) 1945:1 1945:4
			g1.draw(shade,bottom) 1948:4 1949:4
			g1.draw(shade,bottom) 1953:3 1954:2
			g1.draw(shade,bottom) 1957:3 1958:2
			g1.draw(shade,bottom) 1960:2 1961:1
			g1.draw(shade,bottom) 1969:4 1970:4
			g1.draw(shade,bottom) 1973:4 1975:1
			g1.draw(shade,bottom) 1980:1 1980:3
			g1.draw(shade,bottom) 1981:3 1982:4
			g1.draw(shade,bottom) 1990:3 1991:1
		else
			statusline currently only monthly or quarterly frequency supported!		
		endif
	endif

endsub