/* This file contains the date ranges for each month, and the target donation for that month,
   so that we can set up a whole year's worth of donation events and have the code roll over automatically

   MAINTENANCE instructions:

   The start and end date arrays shouldn't need adjustment -- they fill up automatically. The TLTarget array
   needs to be adjusted once a year with the new targets, which means creating the new targets on TicketLeap.

   This file uses "today", a variable set up in the general JS stuff. Include this after...

 */

 /* This is used in the sponsor/becomesponsor.html file, to identify the target for on-line donations. */
  var tlDonationTargets = [ /* jan */ "On-line donations not available"
                          , /* feb */ "On-line donations not available"
                          , /* mar 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=CA8E48ED-9EF0-46C5-9624-1EA986E4F2B"
                          , /* apr 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=E17DD45A-E48B-43D9-81FB-4C2CA0B9DB1"
                          , /* may 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=DE50431A-95B2-4C9A-97EF-3308C1C3C2C"
                          , /* jun 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=6DFAB39A-D700-4BC6-BDDF-8654D20708D"
                          , /* jul 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=D67D443D-9BAD-4E6F-A66A-F684EAABAC5"
                          , /* aug 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=9F7BB62B-E275-4FDC-8D14-FED2E3F6DB9"
                          , /* sep 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=17DEBC20-46A3-4EBB-9456-B348A06A1E5"
                          , /* oct 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=57754CAF-D0D2-49EA-8F42-9C13C95881B"
                          , /* nov 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=A86AD77F-04ED-46DB-92EE-27ACD475103"
                          , /* dec 2005 */ "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=9BDD097B-384A-42A6-A23B-833DC0473D6"
                          ];

  /* Links for the shows, and indices into the link array */
  var tlAllTickets  = 0;
  var tlShow1       = 1;
  var tlShow2       = 2;
  var tlShow3       = 3;
  var tlShow4       = 4;
  var tlShow5       = 5;
  var tlShowCCTC    = 6;
  var tlShowHoliday = 7;
  var tlShowSummer  = 8;
  var tlShowSpecial = 9;
  var tlShowTargets = [ /* all tkts*/   "http://www.ticketleap.com//Member/Event-List.aspx/event_company_id/40A04C57-40CA-7A03-165A66F4556B3D0F"
                      , /* show1   */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/A44AD4CA-00CE-4A3A-B2AE-64451E27ED4"
                      , /* show2   */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/0453F7D7-2C53-44C6-9590-5D6A60FBAFD"
                      , /* show3   */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/7437E92B-4059-4961-A118-7EACC8226F2"
                      , /* show4   */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/76D48E07-162E-4674-B54A-22DCC966040"
                      , /* show5   */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/2A7CE754-E86D-428A-B55C-8BE8D2D90F2"
                      , /* cctc    */   "http://www.ticketleap.com/index.cfm?fuseaction=details&event_id=8F3DE288-ECE5-420C-A506-F6F18529FEB"
                      , /* holiday */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/8DE47EE1-1835-4ED9-9A2B-FBACB7F94BD"
                      , /* summer  */   "http://www.ticketleap.com/Member/EventDetail.aspx/event_id/02B46BE7-5286-4AB9-BCBD-FC38CA18BAD"
   /* suspenders */   , /* special */   "http://www.ticketleap.com//Member/EventDetail.aspx/event_id/9D2BA13F-2100-4EE8-AFEE-710A68BACD5"
                      ];
                    
  function getStandardTicketLeapIcon()
  {
      var iconLocation = "TicketLeap/ticketleaptiny.jpg";
      var relativeDir = "";
      for (var i = pageLevel-1; i>0; i--) {
          relativeDir = relativeDir + "../"
      }
      var finalIconString = "<img src='"+relativeDir+iconLocation+"' alt='ticket leap logo' align='middle' border=0/>";
      return finalIconString;
  }

  function generateLink(linkTarget, linkIcon, linkText)
  {
      document.write("<a href='"+linkTarget+"'>");
      if (linkIcon != "") { document.write(linkIcon); }
      if (linkText != "") { document.write(linkText); }
      document.writeln("</a>");
  }

  function generateDonationTarget(linkIcon,linkText)
  {
      generateLink(tlDonationTargets[today.getMonth()], linkIcon, linkText);
  }

  function generateShowTarget(showIndex, linkIcon, linkText)
  {
      generateLink(tlShowTargets[showIndex], linkIcon, linkText);
  }


