﻿theDate= new Date();

var month = theDate.getMonth() + 1;
var date = theDate.getDate();
var year = theDate.getYear();
var season;


if (month == 1 && date<7) season = "Christmas";
else if (year == 2008 && month == 3 && date >22  ) season = "Easter1";
else if (year == 2008 && month == 4 ) season = "Easter1";
else if (year == 2008 && month == 5 && date<11) season = "Easter2";
else if (year == 2009 && month == 2 && date >24  ) season = "Lent";
else if (year == 2009 && month == 3 ) season = "Lent";
else if (year == 2009 && month == 4 && date <12  ) season = "Lent";
else if (year == 2009 && month == 4 && date >11  ) season = "Easter1";
else if (year == 2009 && month == 5 ) season = "Easter2";
else if (year == 2010 && month == 2 && date >16  ) season = "Lent";
else if (year == 2010 && month == 3 ) season = "Lent";
else if (year == 2010 && month == 4 && date <4  ) season = "Lent";
else if (year == 2010 && month == 4 && date >3  ) season = "Easter1";
else if (year == 2010 && month == 5 && date <24) season = "Easter2";
else if (year == 2011 && month == 3 && date >8) season = "Lent";
else if (year == 2011 && month == 4 && date <24  ) season = "Lent";
else if (year == 2011 && month == 4 && date >23  ) season = "Easter1";
else if (year == 2011 && month == 5 ) season = "Easter2";
else if (year == 2011 && month == 6 && date <13) season = "Easter2";
else if (year == 2012 && month == 2 && date >21  ) season = "Lent";
else if (year == 2012 && month == 3 ) season = "Lent";
else if (year == 2012 && month == 4 && date <8  ) season = "Lent";
else if (year == 2012 && month == 4 && date >7  ) season = "Easter1";
else if (year == 2012 && month == 5 && date <28) season = "Easter2";
else if (year == 2013 && month == 2 && date >12  ) season = "Lent";
else if (year == 2013 && month == 3 && date <31) season = "Lent";
else if (year == 2013 && month == 3 && date ==31  ) season = "Easter1";
else if (year == 2013 && month == 4 ) season = "Easter1";
else if (year == 2013 && month == 5 && date <18) season = "Easter2";
else if (year == 2014 && month == 3 && date >4) season = "Lent";
else if (year == 2014 && month == 4 && date <20  ) season = "Lent";
else if (year == 2014 && month == 4 && date >19  ) season = "Easter1";
else if (year == 2014 && month == 5 ) season = "Easter2";
else if (year == 2014 && month == 6 && date <8) season = "Easter2";
else if (year == 2015 && month == 2 && date >17  ) season = "Lent";
else if (year == 2015 && month == 3 ) season = "Lent";
else if (year == 2015 && month == 4 && date <5  ) season = "Lent";
else if (year == 2015 && month == 4 && date >4  ) season = "Easter1";
else if (year == 2015 && month == 5 && date <24) season = "Easter2";
else if (month == 10) season = "Harvest";
else if (month == 12 && date >24) season = "Christmas";
else season = "general";

var pic1;
if (season == "general") pic1 = '<img src="../images/general/pic1.jpg ">';
if (season == "Christmas") pic1 ='<img src="../images/christmas/pic1.jpg ">';
if (season == "Lent") pic1 = '<img src="../images/lent/pic1.jpg ">';
if (season == "Easter1") pic1 ='<img src="../images/easter1/pic1.jpg ">';
if (season == "Easter2") pic1 = '<img src="../images/easter2/pic1.jpg ">';
if (season == "Harvest") pic1 ='<img src="../images/harvest/pic1.jpg ">';

var pic2;
if (season == "general") pic2 = '<img src="../images/general/pic2.jpg ">';
if (season == "Christmas") pic2 ='<img src="../images/christmas/pic2.jpg ">';
if (season == "Lent") pic2 = '<img src="../images/lent/pic2.jpg ">';
if (season == "Easter1") pic2 ='<img src="../images/easter1/pic2.jpg ">';
if (season == "Easter2") pic2 = '<img src="../images/easter2/pic2.jpg ">';
if (season == "Harvest") pic2 ='<img src="../images/harvest/pic2.jpg ">';

var pic3;
if (season == "general") pic3 = '<img src="../images/general/pic3.jpg ">';
if (season == "Christmas") pic3 ='<img src="../images/christmas/pic3.jpg ">';
if (season == "Lent") pic3 = '<img src="../images/lent/pic3.jpg ">';
if (season == "Easter1") pic3 ='<img src="../images/easter1/pic3.jpg ">';
if (season == "Easter2") pic3 = '<img src="../images/easter2/pic3.jpg ">';
if (season == "Harvest") pic3 ='<img src="../images/harvest/pic3.jpg ">';

var pic4;
if (season == "general") pic4 = '<img src="../images/general/pic4.jpg ">';
if (season == "Christmas") pic4 ='<img src="../images/christmas/pic4.jpg ">';
if (season == "Lent") pic4 = '<img src="../images/lent/pic4.jpg ">';
if (season == "Easter1") pic4 ='<img src="../images/easter1/pic4.jpg ">';
if (season == "Easter2") pic4 = '<img src="../images/easter2/pic4.jpg ">';
if (season == "Harvest") pic4 ='<img src="../images/harvest/pic4.jpg ">';



numpic = 4
day = new Date()
z = day.getTime()
y = (z - (parseInt(z/1000,10) * 1000))/10
x = parseInt(y/100*numpic,10) + 1
if (x == (1)) picn=(pic1)
else if (x == (2)) picn=(pic2)
else if (x == (3)) picn=(pic3)
else if (x == (4)) picn=(pic4)

document.write(picn);
