// This script creates the copyright/page modified footer.

months = [
  "January ",
  "February ",
  "March ",
  "April ",
  "May ",
  "June ",
  "July ",
  "August ",
  "September ",
  "October ",
  "November ",
  "December "
];

hshNone  = -1;
hshHome  = 0;
hshSite  = 1;
hshHelp  = 2;

hshItems = 2;

hshHref = [
	"sitemap.html",
	"index.html"
];

hshText = [
	"SITEMAP",
	"HOME"
];	

menuNone      = -1;
menuNextShow  = 0;
menuCompany   = 1;
menuVenues    = 2;
menuTickets   = 3;
menuContact   = 4;

menuItems = 5;

menuHref = [
	"index.html",
	"company.html",
	"venue.html",
	"tickets.html",
	"contact.html"
];

menuText = [
	"our next show",
	"the company",
	"venue",
	"tickets",
	"contact"
];	

photoItems = 4

photoCaption = [
	"Silent E - Cast of TOMFOOLERY (Theatre on San Pedro Square, San Jose, 2006)",
	"Let The Sun Shine In - Cast of HAiR (Theatre on San Pedro Square, San Jose, 2007)",
	"Send The Marines - Cast of TOMFOOLERY (Stop The War March, San Francisco, 2003)",
	"I Wanna Go Back To Dixie - Cast of TOMFOOLERY (Theatre on San Pedro Square, San Jose, 2006)"
];	

photoUrl = [
	"silente.jpg",
	"hairimage.jpg",
	"sendthemarines.jpg",
	"backtodixie.jpg"
];	

  
function make_datetime(strDate) {

  objDate = new Date(Date.parse(strDate));
  
  hr = objDate.getHours() + 100;
  mn = objDate.getMinutes() + 100;
  sc = objDate.getSeconds() + 100;
  am = " AM";
  if (hr > 111) {
    hr = hr - 12;
    am = " PM";
  }
  hs = hr + "";
  ms = mn + "";
  ss = sc + "";
  tm = hs.slice(1)+":"+ms.slice(1)+":"+ss.slice(1) + am; 
  
  strDateTime = months[objDate.getMonth()] +
    objDate.getDate() + ', ' + objDate.getFullYear() + ', at ' + tm;

  return strDateTime;  
}

function stagelight_header(img,caption) {
  
  var rInt = Math.floor(Math.random()*4);
	document.write('<div id="top_nav">');
  document.write('</div>');
	document.write('<div id="splash">');
  if (img == 'random') {
    document.write('<img src="images/'+photoUrl[rInt]+'" />');
    document.write('</div>');
	  document.write('<div id="splash_caption">');
    document.write(photoCaption[rInt]);
  } else {
	  document.write('<img src="'+img+'" />');
    document.write('</div>');
	  document.write('<div id="splash_caption">');
    document.write(caption);
  }
  document.write('</div>');
	document.write('<div id="main_nav">');
  for (i = 0; i < menuItems; i++) {
    if (i > 0) document.write(' / ');
    li = '<a href="' + menuHref[i] + '">' + menuText[i] + '</a>';
    document.write(li);
  }
  document.write('</div>');
}

function stagelight_footer() {
	document.write('<div id="container_footer">');
	document.write('  <div id="our_copyright">');
	document.write('Copyright 2008 by <b>Stagelight Productions, Inc.</b>');
	document.write(' All Rights Reserved.<br />');
  document.write('This website page was last updated ');
  document.write(make_datetime(document.lastModified));
  document.write('.');
  document.write('  </div>');
//document.write('  <div id="txc_copyright">');
//document.write('Web template designed by:');
//document.write('<a href="http://www.templatesxchange.com/">');
//document.write('<img alt="templatesXchange" ');
//document.write('src="images/txc_logo.gif" id="txc_logo" />');
//document.write('</a>');
//document.write('  </div>');
  document.write('</div>');
}

											   