/*
A breadcrumb is a navigational tool used to display the path to the current page.
There are three types of breadcrumbs: path, attribute, and *location*. The path breadcrumb displays the actual route taken by
the user to reach the current page. The attribute breadcrumb shows several different routes to the current page.
The location breadcrumb displays the route from the home page to the current page, no matter how the user got there.
Of these, the most popular method used is the location breadcrumb.

There are three different types of breadcrumbs represented in websites – path, attribute, and location (Instone, 2003).
Path breadcrumb trails are dynamic in that any given page will show a different breadcrumb trail based on how the user reached
the page. Attribute breadcrumb trails display meta information showing many different trails representing several
possible paths to reach the page. The location breadcrumb trail is a textual representation of a site’s structure,
e.g. Home > Furniture > Chairs > Leather Chairs.

This representation of information allows users to link to major categories of information along a continuum of sequential order.
Regardless of how users arrive at Leather Chairs, the breadcrumb trail displayed is the same


<!--
ModuleId 237
FileName @breadcrumb
-->
<!-- Start: Breadcrumb (module_101) -->
<div class="Breadcrumbs BodyXS">
<span class="BodyXSLtgry">You are here:</span>
<a href="/">Home Page</a>&nbsp;<span class="BodyXSLtgry">&gt;</span>&nbsp;<a href="/movies">Movies & TV</a>&nbsp;<span class="BodyXSLtgry">&gt;</span>&nbsp;<a href="/catalog/catalog.gsp?cat=616859">Blu-ray</a>&nbsp;<span class="BodyXSLtgry">&gt;</span>&nbsp;<a href="/catalog/product_listing.gsp?cat=616999">Action & Adventure</a>
<script type="text/javascript">
try {
WALMART.page.writeBreadcrumbs([
{
text: 'Movies &amp; TV'
, url: '/movies'
}
,
{
text: 'Blu-ray'
, url: '/catalog/catalog.gsp?cat=616859'
}
,
{
text: 'Action &amp; Adventure'
, url: '/catalog/product_listing.gsp?cat=616999'
}
]);
}
catch (e) {}
</script>
</div>
<!-- End: Breadcrumb (module_101) -->

*/

function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
  var output = "<a href=\"/\">My Pools</a>  >  ";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  for(var i in bits){
    output += "<a href=\"";
    for(y=1;y<x-i;y++){
      output += "../";
    }
    output += bits[i] + "/\">" + bits[i] + "</a>  >  ";
  }
  document.write(output + document.title);
}
