<!--
function TSPageBanner2() {
//
//	TSPageBanner2(Datetime, ThisTitle)
//      Version 00.00
//
//	Input: Datetime last modified
//             Title
//
//	Output: reduced version of TSHeader2, creates banner and 
//              3 links only
//
    var strOut1     = "";
    var strHdr      = "";
    var istrDate    = "";
    var istrTitle   = "";
    var strQ        = '"';
    var strFill4    = "&nbsp;&nbsp;&nbsp;&nbsp;";
    var argv = TSPageBanner2.arguments;
    var argc = TSPageBanner2.arguments.length;

    //
    // Get and process input parameters
    //
    istrDate     = (argc > 0) ? argv[0] : null;
    istrTitle    = (argc > 1) ? argv[1] : null;

    //  HEADING TABLE
    document.write("<TABLE BORDER=0 BGCOLOR='#2060A0' WIDTH='100%' CELLPADDING=0 CELLSPACING=0><TR>");
    document.write("<TD WIDTH=160 BGCOLOR='#004080' ROWSPAN=2 VALIGN='center'><FONT COLOR='white' SIZE=4 FACE='Comic Sans MS'><CENTER>Riverside Yard</CENTER></FONT></TD>");
    document.write("<TD><CENTER><FONT COLOR='yellow' SIZE=5><B>" + istrTitle + "</B></FONT></CENTER></TD>");
    document.write("<TD WIDTH=50 ROWSPAN=2 VALIGN='top' ALIGN='left'><BR><A HREF='MailTo:riversidey" + "ard@yah" + "oo.co.uk?subject=riverside-yard'><IMG SRC='nemail.gif' BORDER=0 WIDTH=40 HEIGHT=20 VSPACE=0 HSPACE=0 ALT='Click here to mail me about Riverside Yard'></A></TD>");
    document.write("</TR><TR>");
    document.write("<TD ALIGN='right'><FONT SIZE=1 COLOR='white'>Page Last Updated: " + DisplayLastModified(istrDate) + strFill4 + "</FONT></TD>");
    document.write("</TR></TABLE>");

    //  REDUCED NAV BAR TABLE
    document.write("<TABLE BORDER=1 BGCOLOR='#C0C0C0' WIDTH=160 BORDERCOLOR='#333355' CELLPADDING=0 CELLSPACING=0 VALIGN='left'><TR><TD>");
    document.write("<TABLE BORDER=0 WIDTH='100%' CELLPADDING=2 CELLSPACING=0>");
    document.write("<TR><TD><FONT SIZE='-1'><B><IMG SRC='aaLinkOth.gif'><A HREF='home.html'>Homepage</A></B></TD></TR>");
    document.write("<TR><TD BACKGROUND='jzkmenu1.gif'><FONT SIZE='-1'><B><IMG SRC='aaLinkOth.gif'><A HREF='jpage200.html'>Layouts</A></B></TD></TR>");
    document.write("<TR><TD BACKGROUND='jzkmenu1.gif'><FONT SIZE='-1'><B><IMG SRC='aaLinkOth.gif'><A HREF='jpage300.html'>Operate</A></B></TD></TR>");
    document.write("<TR><TD BACKGROUND='jzkmenu2.gif'><FONT SIZE='-1'><B><IMG SRC='aaLinkOth.gif'>" + strFill4 + "<A HREF='jpage310.html'>Instructions</A></B></TD></TR>");
    document.write("</TABLE>");
    document.write("</TD></TR></TABLE>");
   }



function DisplayLastModified() {
//
//	DisplayLastModified()     Version 00.05
//
//	Input: Mandatory string  Date in format 'DD MMMMM YYYY HH:MM:SS GMT' 
//             Optional  string  Output required
//
//	Output: string, dependant upon Param1 and the time last modified;
//        Param2 = 'DD'
//          Days since last modified, integer
//        Param2 = 'MM'
//          Minutes since last modified, integer
//	  Param2 not present
//	    < 1 day and days=	'Today'
//	    < 2 days		'Yesterday'
//	    < 15 days		days + ' days ago'
//	    >= 15 days		dd mmmmm yyyy
//
	var dtLastMod, dtCurrent;
	var intTimeDiff, intDayCurrent;
	var intDayLastMod, intMonthLastMod, intYearLastMod
	var strParam1, strParam2
	var strReturn;
	var strMonthName = new Array("January","February","March","April","May","June","July","August","September","October","November","December"); 
	var argv = DisplayLastModified.arguments;
	var argc = DisplayLastModified.arguments.length;

	//
	// Get and process input parameter
	//
	strParam1 = (argc > 0) ? argv[0] : null;
	strParam2 = (argc > 1) ? argv[1] : null;

	//
	// Calculate age in days
	//
	dtLastMod = new Date(strParam1);
	dtCurrent = new Date();
	intTimeDiff = (dtCurrent - dtLastMod) / (1000*60*60*24);
	if (intTimeDiff > 36525) { intTimeDiff = intTimeDiff - 36525};

	//
	// Build return value
	//
	if (intTimeDiff < 1)
	   {intDayLastMod = dtLastMod.getDate();
	    intDayCurrent = dtCurrent.getDate();
	    if (intDayLastMod == intDayCurrent)
	       {strReturn = 'Today';
	       }
	    else
	       {strReturn = 'Yesterday';
	       } 
	   }
	else
	   {if (intTimeDiff < 2)
	       {strReturn = 'Yesterday';
	       }
	    else
	       {if (intTimeDiff < 15)
	           {strReturn = Math.round(intTimeDiff) + ' days ago';
	           }
	        else
	           {intDayLastMod = dtLastMod.getDate();
	            intMonthLastMod = dtLastMod.getMonth();
	            intYearLastMod = dtLastMod.getFullYear();
	            if (intYearLastMod < 1950) 
	               {intYearLastMod = intYearLastMod + 100
	               }
	            strReturn = intDayLastMod + " " + strMonthName[intMonthLastMod] + " " + intYearLastMod;
	           }  
	       }
	   }

	//
	// If Param1 passed then recalculate return value
	//
	if (strParam2=="DD")
	   {strReturn = Math.round(intTimeDiff - 0.5)
	   }
	if (strParam2=="MM")
	   {strReturn = Math.round((intTimeDiff * (24*60)) - 0.5)
	   }

	return strReturn;
}

// -->
