/*<!-- Paste this code into an external JavaScript file named: autoExpire.js  -->

 This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Don Demrow :: http://www.euro-innova.com
 */

 /*Note that we are setting all the dates and date parts to strings to do our comparisons.*/

function autoExpire() {
  var goLiveMonth = "01"  // Month you want your content to start displaying. Two digits.
  var goLiveDay = "01"      // Day you want your content to start displaying. Two digits.
  var goLiveYear = "2012"     // Year you want your content to start displaying. Four digits.

  var expireMonth = "03"   // Month you want your content to stop displaying. Two digits.
  var expireDay = "05"     // Day you want your content to stop displaying. Two digits.
  var expireYear = "2012"  // Year you want your content to stop displaying. Four digits.<font color=red size=5>WTC Roden</font><br>

  /* This is where you put your content. Make sure you escape any quotation marks with a backslash. Make sure you do not delete the opening and closing quotes. */
/* var myContent = "<table><tr><td> <img src='../images/kerst.gif' width=100 height=100></td><td><p align=center><font color=orange size=2><i><b>WTC Roden wenst iedereen een Prettige Kerstdagen en een gezond, gelukkig en sportief 2012</font></td></tr></table>" */
  var myContent = "<p align=center><a href='toc-crocus.htm' ><img src='../images/krokus.jpg' width=100 height=100 alt='Logo' border='0'></a></td><td><font color=orange size=2><b>Krokustoertocht<br> Zaterdag 03 maart 2012<br><a href='toc-crocus.htm' target=vulling><font color=red>Lees meer ....</font></a><br><br><small></p>"
  /*Deelnemers die sneller op de fiets willen,<br>kunnen het inschrijfformulier thuis printen en alvast invullen.<br>Bij het inschrijfbalie krijgt men na betaling een stempel/startkaart <br>Om het inschrijformulier te kunnen printen. <a href='toc-inschrijf.pdf' target = blanc><font color=red>Klik hier</font></a></small></b></font>."*/
 /*<font color=white>Lees meer ....</font></a><br>"<a href=toc-crocus.htm> Lees meer ......</a>
 <font color=yellow size=2>Tevens opgave tellerstanden voor de Toercompetitie.<br> <a href = toc-toercompins.htm ><font color=red> Klik hier </font> </a> voor meer informatie </font><td><img src='../images/kerstborrel.jpg'></td>*/

  /* Don't edit below this line. Don */

  var goLiveDate = goLiveYear + goLiveMonth + goLiveDay;  // puts START year, month, and day together.
  var expireDate = expireYear + expireMonth + expireDay;  // puts EXPIRE year, month, and day together.

  var nowDate = new Date();
  var day = nowDate.getUTCDate();
  var month = nowDate.getUTCMonth();
  var correctedMonth = month + 1;  //month - JavaScript starts at "0" for January, so we add "1"

  if (correctedMonth < 10) {  /* if less than "10", put a "0" in front of the number. */
    correctedMonth = "0" + correctedMonth;
  }

  if (day < 10) {  /* if less than "10", put a "0" in front of the number. */
    day = "0" + day;
  }

  var year = nowDate.getYear();  /* Get the year. Firefox and Netscape might use century bit, and two-digit year. */
  if (year < 1900) {
    year = year + 1900;  /*This is to make sure Netscape AND FireFox doesn't show the year as "107" for "2007." */
  }

  var GMTdate = year + "" + correctedMonth + "" + day;  //corrected month GMT date.

  if ((GMTdate <= expireDate) && (GMTdate >= goLiveDate)) {
    document.write(myContent)
  }
}

function autoExpire1() {
  var goLiveMonth = "01"  // Month you want your content to start displaying. Two digits.
  var goLiveDay = "01"      // Day you want your content to start displaying. Two digits.
  var goLiveYear = "2012"     // Year you want your content to start displaying. Four digits.

  var expireMonth = "03"   // Month you want your content to stop displaying. Two digits.
  var expireDay = "01"     // Day you want your content to stop displaying. Two digits.
  var expireYear = "2012"  // Year you want your content to stop displaying. Four digits.

  /* This is where you put your content. Make sure you escape any quotation marks with a backslash. Make sure you do not delete the opening and closing quotes. */
 var myContent = "<table><tr><td> <img src='../images/snert.jpg' width=130 height=100 alt='Lunchroom De Berk' border='0'></td><td><p align=center><font color=orange size=2><i><b>Afsluittocht ATB<br>Zaterdag<br> 25 feruari 2012<br></font><a href='toc-afsluitatb.htm' target=vulling><font color=red size=2>Lees meer ....</font></a></td></tr></table>" 
/*  var myContent = "<p align=center><font color=orange size=2><i><b> Zaterdag 19 maart 2011<br>Holterbergtocht<br>(alleen voor leden)<br><a href=toc-holterberg.htm> Lees meer ......</a></b></font><br>"*/
/*var myContent = "<p align=center><font color=orange size=2><b>Openingstocht ATB<br> Zondag 09 oktober 2011<br>Fitnesscentrum Roden<br>Start 09.00 uur<br>(Alleen voor leden)</b></font><br>"*/

  /* Don't edit below this line. Don */

  var goLiveDate = goLiveYear + goLiveMonth + goLiveDay;  // puts START year, month, and day together.
  var expireDate = expireYear + expireMonth + expireDay;  // puts EXPIRE year, month, and day together.

  var nowDate = new Date();
  var day = nowDate.getUTCDate();
  var month = nowDate.getUTCMonth();
  var correctedMonth = month + 1;  //month - JavaScript starts at "0" for January, so we add "1"

  if (correctedMonth < 10) {  /* if less than "10", put a "0" in front of the number. */
    correctedMonth = "0" + correctedMonth;
  }

  if (day < 10) {  /* if less than "10", put a "0" in front of the number. */
    day = "0" + day;
  }

  var year = nowDate.getYear();  /* Get the year. Firefox and Netscape might use century bit, and two-digit year. */
  if (year < 1900) {
    year = year + 1900;  /*This is to make sure Netscape AND FireFox doesn't show the year as "107" for "2007." */
  }

  var GMTdate = year + "" + correctedMonth + "" + day;  //corrected month GMT date.

  if ((GMTdate <= expireDate) && (GMTdate >= goLiveDate)) {
    document.write(myContent)
  }
}

function autoExpire2() {
  var goLiveMonth = "01"  // Month you want your content to start displaying. Two digits.
  var goLiveDay = "06"      // Day you want your content to start displaying. Two digits.
  var goLiveYear = "2011"     // Year you want your content to start displaying. Four digits.

  var expireMonth = "01"   // Month you want your content to stop displaying. Two digits.
  var expireDay = "07"     // Day you want your content to stop displaying. Two digits.
  var expireYear = "2011"  // Year you want your content to stop displaying. Four digits.

  /* This is where you put your content. Make sure you escape any quotation marks with a backslash. Make sure you do not delete the opening and closing quotes. */
  /*var myContent = "<p align=center><font color=orange size=2><i><b> Zondag 26 juni 2011<br>1e Zondagsrit<br>(alleen voor leden)<br></font>"*/
  var myContent = "<p align=center><font color=orange size=2><b>Najaarsvergadering 2011<br> Woensdag 2 november 2011<br>Fitnesscentrum Roden<br>Aanvang 19.30 uur<br><a href='../images/najaar2011.pdf'>Lees meer ....</a></b></font><br>"
/*<a href='toc-stork.htm'><font color=red size=2>Lees meer ....</font></a>   <a href=toc-afsluitatb.htm> Lees meer ......</a></b>*/ 
  /* Don't edit below this line. Don */

  var goLiveDate = goLiveYear + goLiveMonth + goLiveDay;  // puts START year, month, and day together.
  var expireDate = expireYear + expireMonth + expireDay;  // puts EXPIRE year, month, and day together.

  var nowDate = new Date();
  var day = nowDate.getUTCDate();
  var month = nowDate.getUTCMonth();
  var correctedMonth = month + 1;  //month - JavaScript starts at "0" for January, so we add "1"

  if (correctedMonth < 10) {  /* if less than "10", put a "0" in front of the number. */
    correctedMonth = "0" + correctedMonth;
  }

  if (day < 10) {  /* if less than "10", put a "0" in front of the number. */
    day = "0" + day;
  }

  var year = nowDate.getYear();  /* Get the year. Firefox and Netscape might use century bit, and two-digit year. */
  if (year < 1900) {
    year = year + 1900;  /*This is to make sure Netscape AND FireFox doesn't show the year as "107" for "2007." */
  }

  var GMTdate = year + "" + correctedMonth + "" + day;  //corrected month GMT date.

  if ((GMTdate <= expireDate) && (GMTdate >= goLiveDate)) {
    document.write(myContent)
  }
}

function autoExpire3() {
  var goLiveMonth = "11"  // Month you want your content to start displaying. Two digits.
  var goLiveDay = "19"      // Day you want your content to start displaying. Two digits.
  var goLiveYear = "2011"     // Year you want your content to start displaying. Four digits.

  var expireMonth = "01"   // Month you want your content to stop displaying. Two digits.
  var expireDay = "08"     // Day you want your content to stop displaying. Two digits.
  var expireYear = "2012"  // Year you want your content to stop displaying. Four digits.

  /* This is where you put your content. Make sure you escape any quotation marks with a backslash. Make sure you do not delete the opening and closing quotes. */
  var myContent = "<p align=center><font color=orange size=2><i><b>Vrijdag 6 januari 2011 <br> Opgave tellerstanden<br>van 20.00 tot 21.30 uur<br> Fitnesscentrum Roden"

  /* Don't edit below this line. Don */

  var goLiveDate = goLiveYear + goLiveMonth + goLiveDay;  // puts START year, month, and day together.
  var expireDate = expireYear + expireMonth + expireDay;  // puts EXPIRE year, month, and day together.

  var nowDate = new Date();
  var day = nowDate.getUTCDate();
  var month = nowDate.getUTCMonth();
  var correctedMonth = month + 1;  //month - JavaScript starts at "0" for January, so we add "1"

  if (correctedMonth < 10) {  /* if less than "10", put a "0" in front of the number. */
    correctedMonth = "0" + correctedMonth;
  }

  if (day < 10) {  /* if less than "10", put a "0" in front of the number. */
    day = "0" + day;
  }

  var year = nowDate.getYear();  /* Get the year. Firefox and Netscape might use century bit, and two-digit year. */
  if (year < 1900) {
    year = year + 1900;  /*This is to make sure Netscape AND FireFox doesn't show the year as "107" for "2007." */
  }

  var GMTdate = year + "" + correctedMonth + "" + day;  //corrected month GMT date.

  if ((GMTdate <= expireDate) && (GMTdate >= goLiveDate)) {
    document.write(myContent)
  }
}



