//  JTOCNOTE.JS   Date-limited note at foot of TOC panel    13mar2006

//  The HTML string in TOCNOTE will be displayed in the toc panel if the date in TOCNOTEND is before today


// Dates for display -------------------------------------------------------------------------------------

var tocnotestart = 0;      // date in format yyyymmdd as number   (or zero = start OK)
var tocnotend = 20071031;  // date in format yyyymmdd as number   (or zero = no note reqd)

// -------------------------------------------------------------------------------------------------------


// HTML string for display -------------------------------------------------------------------------------

var tocnote = '<p align="right"></p>'; //[08nov2007]


//var tocnote = '<p align="center"><a href="hbinend.htm" title="Click for details"><img src="pbindeal.jpg" border="0" width="90" height="67"></a></p>';    

//var tocnote = '<hr><p align="center"><a href="hnews.htm" title="Click for details"><font color="#ffcc00">NOTE<br>Bar closed<br>3rd & 4th May<br>Click for info</font></a></p><hr>';    

// -------------------------------------------------------------------------------------------------------



// Working code -------------------------------------------------------------
var mydate = new Date();    // This contains date AND time
var mydayofmonth = mydate.getDate();
var mymonth = mydate.getMonth() + 1;
var myyear = mydate.getFullYear();
var mychekdate = (myyear * 10000) + (mymonth * 100) + mydayofmonth;
if (tocnotend != 0) {
    if (mychekdate >= tocnotestart) { 
        if (mychekdate <= tocnotend) document.write(tocnote);
    }
}
// --------------------------------------------------------------------------
