//---------------------------------------------------------------
// Navigate to the selected 'slice'
function fGoToSlice(box)
{
   strip_id = box.options[box.selectedIndex].value;
   // location.href = "http://austenandrews.com/GordianAlgebra/home.php?s=" + strip_id;
   location.href = base_url + "?s=" + strip_id;
}


//---------------------------------------------------------------
// When you roll over a strip link on the archive page, the associated tagline
// highlights
function fHighlightTagline(link)
{
   for (i=0; i<document.anchors.length; i++)
   {
      if (document.anchors[i].name.substring(0,5)!='_tag_')
      {
         continue;
      }
      var tag = document.anchors[i].name.replace('_tag_','');
      tag = tag.replace('_slice_link','');
      var name = link.name.replace('_day_','');

      if (tag == name.substring(0,tag.length))
      {
         document.anchors[i].className = 'archive_slice_link_highlighted';
         fHighlightStripLinks(document.anchors[i]);
      }
   }
}

// The onmouseout reverse of the above
function fUnHighlightTagline(link)
{
   for (i=0; i<document.anchors.length; i++)
   {
      if (document.anchors[i].name.substring(0,5)!='_tag_')
      {
         continue;
      }
      var tag = document.anchors[i].name.replace('_tag_','');
      tag = tag.replace('_slice_link','');
      var name = link.name.replace('_day_','');

      if (tag == name.substring(0,tag.length))
      {
         document.anchors[i].className = 'archive_slice_link';
         fUnHighlightStripLinks(document.anchors[i]);
      }
   }
}

//---------------------------------------------------------------
// When you roll over a tagline on the archive page, the associated strip
// links highlights
function fHighlightStripLinks(tag)
{
   for (i=0; i<document.anchors.length; i++)
   {
      if (document.anchors[i].name.substring(0,5)!='_day_')
      {
         continue;
      }
      var link = document.anchors[i].name.replace('_day_','');
      var name = tag.name.replace('_tag_','');
      name = name.replace('_slice_link','');

      if (name == link.substring(0,name.length))
      {
         document.anchors[i].className = 'calendar_week_link_highlighted';
      }
   }
}

// The onmouseout reverse of the above
function fUnHighlightStripLinks(tag)
{
   for (i=0; i<document.anchors.length; i++)
   {
      if (document.anchors[i].name.substring(0,5)!='_day_')
      {
         continue;
      }
      var link = document.anchors[i].name.replace('_day_','');
      var name = tag.name.replace('_tag_','');
      name = name.replace('_slice_link','');

      if (name == link.substring(0,name.length))
      {
         document.anchors[i].className = 'calendar_week_link';
      }
   }
}


