// File: clickTrail.js

function clickTrail(L0path, L0page, L1path, L1page, L2path, L2page, L3path, L3page, L4path, L4page)
// Generates 2-, 3-, 4-, or 5-level PATHWAY
// BillR 2008-08-25
// L0path = PATHWAY display value for highest level link (always 'Home')
// L0page = Name of file to load for highest level link (always 'index.php')
// L1path = PATHWAY display value for second-level link (from Tab)
// L1page = Name of file to load for second-level link
// L2path = PATHWAY display value for third-level link (from tab's dropdown menu)
// L2page = Name of file to load for third-level link
// L3path = PATHWAY display value for fourth-level link (from left-nav menu)
// L3page = Name of file to load for fourth-level link
// L4path = PATHWAY display value for fifth-level link (from "Photo" and other secondary FCT pages)
// L4page = Name of file to load for fifth-level link
// For "Home" page, pass only the two "L0" arguments
// For "Tab" pages, pass only the four "L0" and "L1" arguments
// Examples:
//  clickTrail('Home','index.php')
//  clickTrail('Home','index.php','Get Involved','Get-Involved.php')
//  clickTrail('Home','index.php','Get Involved','Get-Involved.php','Volunteer','Volunteer.php')
//  clickTrail('Home', 'index.php','Culture','Culture.php','Framingham Civic League','FCT.php','Auditions','Auditions.php')
//  clickTrail('Home', 'index.php','Culture','Culture.php','Framingham Civic League','FCT.php','Cast Info','Cast-Info.php','Just Desserts Photos','FCT-Photos-Just-Desserts.php')
{
//  alert("clickTrail called, L0path=" + L0path + ", L1path=" + L1path + ", L2path=" + L2path);
  if (L1path == null) {
    document.write (L0path);
  }
  else if (L2path == null)
  {
    document.write('<a href="'+L0page+'"target="_top">'+L0path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<b>'+L1path+'</b>');
  }
  else if (L3path == null)
  {
    document.write('<a href="'+L0page+'"target="_top">'+L0path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<a href="'+L1page+'"target="_top">'+L1path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<b>'+L2path+'</b>');
  }
  else if (L4path == null)
  {
    document.write('<a href="'+L0page+'"target="_top">'+L0path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<a href="'+L1page+'"target="_top">'+L1path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<a href="'+L2page+'"target="_top">'+L2path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<b>'+L3path+'</b>');
  }
  else
  {
    document.write('<a href="'+L0page+'"target="_top">'+L0path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<a href="'+L1page+'"target="_top">'+L1path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<a href="'+L2page+'"target="_top">'+L2path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<a href="'+L3page+'"target="_top">'+L3path+'</a>&nbsp;&nbsp;<image src="images/FCT/greaterThan.gif" />&nbsp;&nbsp;<b>'+L4path+'</b>');
  }
}
