// Source :  http://hyperdisc.unitec.ac.nz/materials/javascript/top10/breadcrumbs.htm  
  function breadcrumbs2(){
    sURL = new String;
    bits = new Object;
    var x = 0;
    var stop = 0;
    var output = "<div class=topnav><A HREF=/>AbdurRahman.org</A> &raquo; ";

    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> &raquo; ";
    }
    //document.write(output + document.title);
	document.write(output);
	document.write("</div>");
  }

  
  // Source: http://www.evolt.org/article/Breadcrumbs_in_Javascript/17/15480/index.html
  function breadcrumbs(sClass, sDelimiter)
  {
    if(!sDelimiter) sDelimiter = '&raquo;'
    var sURL = (location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
        sURL = (location.pathname.charAt(0) == '/') ? location.pathname.substring(1) : location.pathname;
    var aURL = sURL.split('/');
    if(aURL)
    {
	  //var sOutput = 'You are here: ';
	  //sOutput += '<a href="/">AbdurRahman.org</a> ' + sDelimiter + ' ';
      var sOutput = '<a href="/index.html" target="_top">AbdurRahman.org</a> ' + sDelimiter + ' ';
      sOutput += '<a href="/sitemap.html" >Sitemap</a> ' + sDelimiter + ' ';
      var sPath = '/';
      for(var i = 0; i < aURL.length-1; i++)
      {
        sPath += aURL[i] + '/';
        sOutput += '<a href="' + sPath + '"';
        if(sClass) sOutput += ' class="' + sClass +'"';
        sOutput += '>' + aURL[i] + '</a>';
        sOutput += ' ' + sDelimiter + ' ';
      }
      //sOutput += document.title;
      document.write(sOutput);
	  //document.write("</div>");
    }
  }


