\documentclass{article}
 \usepackage[dvips,landscape,margin=.25in]{geometry}
 \usepackage{tree-dvips}
 \usepackage[usenames]{color}

\pagestyle{empty}

\setlength{\parskip}{\medskipamount}

\nofiles % Uncomment this line if there are no cross references.

\begin{document}

\input{gridsizing}

\newcounter{timewid}
\setcounter{timewid}{\halftimewid}
\addtocounter{timewid}{\halftimewid}
\newcounter{quartdaywid}
\newcounter{halfdaywid}
\newcounter{daywid}
\newcounter{daytimewid}
\setcounter{quartdaywid}{\coursewid}
\setcounter{halfdaywid}{\value{quartdaywid}}
\addtocounter{halfdaywid}{\value{quartdaywid}}
\setcounter{daywid}{\value{halfdaywid}}
\addtocounter{daywid}{\value{halfdaywid}}
\setcounter{daytimewid}{\value{daywid}}
\addtocounter{daytimewid}{\value{timewid}}

\newcounter{Mcenter}
\newcounter{Tcenter}
\newcounter{Wcenter}
\newcounter{Rcenter}
\newcounter{Fcenter}
\setcounter{Mcenter}{\value{halfdaywid}}\addtocounter{Mcenter}{\value{timewid}}
\setcounter{Tcenter}{\value{Mcenter}}\addtocounter{Tcenter}{\value{daytimewid}}
\setcounter{Wcenter}{\value{Tcenter}}\addtocounter{Wcenter}{\value{daytimewid}}
\setcounter{Rcenter}{\value{Wcenter}}\addtocounter{Rcenter}{\value{daytimewid}}
\setcounter{Fcenter}{\value{Rcenter}}\addtocounter{Fcenter}{\value{daytimewid}}

\newcounter{fullwid}
\setcounter{fullwid}{\value{Fcenter}}
\addtocounter{fullwid}{\value{halfdaywid}}
\addtocounter{fullwid}{\value{timewid}}

\newcommand{\putday}[2]{\put(\value{#1center},0){#2}}
\newcommand{\putM}{\putday{M}}
\newcommand{\putT}{\putday{T}}
\newcommand{\putW}{\putday{W}}
\newcommand{\putR}{\putday{R}}
\newcommand{\putF}{\putday{F}}

\newcommand{\gridline}[1]{\multiput(-\value{halfdaywid},-#1)(10,0){21}{\makebox(0,0){.}}}

\newcommand{\puttime}[2]{\put(-\value{halfdaywid},0){\put(-\halftimewid,-#1){\makebox(0,0){#2}}}}


\newcounter{coursemod}\setcounter{coursemod}{0}
\newcounter{horoff}
\newcount\n

\newcommand{\putcourse}[2]{\setcounter{horoff}{-\value{halfdaywid}}\n=0\loop\ifnum\n<\value{coursemod}\addtocounter{horoff}{\value{quartdaywid}}\advance\n by 1\repeat\put(\value{horoff},0){\putday{#1}{#2}}\stepcounter{coursemod}\ifnum\value{coursemod}=4\setcounter{coursemod}{0}\fi}

\newcommand{\link}[4]{\anodeconnect{#1#2}[r]{#3#4}}

\noindent\tiny%
\begin{picture}(\value{fullwid},\gridheight)(0,\gridbot)
 \input{gridlines}
 \putM{\input{gridtimes}}
 \putT{\input{gridtimes}}
 \putW{\input{gridtimes}}
 \putR{\input{gridtimes}}
 \putF{\input{gridtimes}}
 \putF{\put(\value{daytimewid},0){\input{gridtimes}}}
 \putM{\put(-\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}\put(0,\gridtop){\makebox(0,0)[t]{{\normalsize MONDAY}}}\put(\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}}
 \putT{\put(-\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}\put(0,\gridtop){\makebox(0,0)[t]{{\normalsize TUESDAY}}}\put(\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}}
 \putW{\put(-\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}\put(0,\gridtop){\makebox(0,0)[t]{{\normalsize WEDNESDAY}}}\put(\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}}
 \putR{\put(-\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}\put(0,\gridtop){\makebox(0,0)[t]{{\normalsize THURSDAY}}}\put(\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}}
 \putF{\put(-\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}\put(0,\gridtop){\makebox(0,0)[t]{{\normalsize FRIDAY}}}\put(\value{halfdaywid},\gridbot){\line(0,1){\gridheight}}}
 \input{gridcourses}
 {\color{Gray}\input{gridlinks}}
 \end{picture}

\end{document}
