function header()
{
  retVal = "<img src=\"images/logo.jpg\" alt=\"Heart's Desire\" width=\"365\" height=\"82\">";

  return retVal;
}

function menu()
{
  retVal = "<br/>" +
    "<a href=\"newsletter/index.html\">Read our Newsletters</a><br/>" +
    "<a href=\"whatsnew/index.html\">See What's New</a><br/>" +
    "<a href=\"gizmos/index.html\">Gizmos and Gadgets</a><br/>" +
    "<a href=\"news/index.html\">Current Events</a><br/>" +
    "<a href=\"calendar/index.html\">Look at our Calendar</a><br/>" +
    "<a href=\"russian/index.html\">Russian Punchneedle</a><br/>" +
	"<a href=\"camp/index.html\">Cross Stitch Camp</a><br/>" +
    "<a href=\"aboutus/index.html\">About Us</a><br/>"
    "</p>";

  return retVal;
}

function footer()
{
  retVal = "<p class=\"small\">2804 E. Central * Wichita, KS 67214 * (316) 681-3369 <br/>" +
    "Contact <a href=\"mailto:heartsd@southwind.net\">Hearts Desire</a> or " +
    "<a href=\"mailto:webmaster@hearts-desire.net\">Webmaster</a></p>" +
    "<p class=\"small\">This site is maintained by Jessica Gagnon</p>" +
    lastMod();

  return retVal;
}

function lastMod()
{
  var x = new Date (document.lastModified);
  Modif = new Date(x.toGMTString());
  Year = takeYear(Modif);
  Month = Modif.getMonth();
  Day = Modif.getDate();
  Mod = (Date.UTC(Year,Month,Day,0,0,0))/86400000;
  x = new Date();
  today = new Date(x.toGMTString());
  Year2 = takeYear(today);
  Month2 = today.getMonth();
  Day2 = today.getDate();
  now = (Date.UTC(Year2,Month2,Day2,0,0,0))/86400000;
  daysago = now - Mod;

  if (daysago < 0) return '';

  unit = 'days';
  if (daysago > 730)
  {
    daysago = Math.round(daysago/365);
    unit = 'years';
  }
  else if (daysago > 60)
  {
    daysago = Math.round(daysago/30);
    unit = 'months';
  }
  else if (daysago > 14)
  {
    daysago = Math.round(daysago/7);
    unit = 'weeks'
  }

  towrite = '<p class="small"><em>Page last changed ';
  if (daysago == 0) towrite += 'today';
  else if (daysago == 1) towrite += 'yesterday';
  else towrite += daysago + ' ' + unit + ' ago';

  towrite += '.</em></p>';
  return towrite;
}

function takeYear(theDate)
{
  x = theDate.getYear();
  var y = x % 100;
  y += (y < 38) ? 2000 : 1900;
  return y;
}

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files
var Pic = new Array();

Pic[0] = 'images/new1.jpg';
Pic[1] = 'images/2.jpg';
Pic[2] = 'images/3.jpg';
Pic[3] = 'images/4.jpg';
Pic[4] = 'images/5.jpg';
Pic[5] = 'images/6.jpg';
Pic[6] = 'images/6.jpg';
Pic[7] = 'images/7.jpg';

var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();
   }
   document.images.SlideShow.src = preLoad[j].src;
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}