// JavaScript Document


// This is the original version that works on the main level pages.  

function rsclevelModifiedBuildCookieCrumbs(p,fn,titles,path) {

var home = "<a href='http://www.utexas.edu/'>UT Home</a>&nbsp;-&gt;&nbsp;" + p + "&nbsp;-&gt;&nbsp;";
var CurrentPage = window.location.pathname

for (var j=0; j<fn.length; j++) {

     if (((path + fn[j]) == CurrentPage && j==0) || (j == 0 && CurrentPage.lastIndexOf("/")+1 == CurrentPage.length)) {
          document.write(home + titles[j]);
      }
     if ((path + fn[j]) == CurrentPage && j>=1) {          
       if (CurrentPage.lastIndexOf("/") > path.lastIndexOf("/")) {
             uol = DirectoryDepth(fn[j],"") + fn[0];
             document.write(home + '<a href="' + uol + '">' + titles[0] + '</a> -&gt;&nbsp;' + titles[j]);
         } 
		 else {
			 document.write(home + '<a href="' + fn[0] + '">' + titles[0] + '</a> -&gt;&nbsp;' + titles[j]);
			 }
      }
  }
}




function ModifiedBuildCookieCrumbs(p,fn,titles,path) {

// old var home = "&nbsp;&nbsp;<a href='http://www.utexas.edu/'>UT Home</a>&nbsp;-&gt;&nbsp;" + p + "&nbsp;-&gt;&nbsp;";
var uthome = "<a href='http://www.utexas.edu/'>UT Home</a>&nbsp;-&gt;&nbsp;";
var home = "&nbsp;<a href='http://www.utexas.edu/research'>Research</a>&nbsp;-&gt;&nbsp;" + p + "&nbsp;-&gt;&nbsp;";

var CurrentPage = window.location.pathname

document.write (uthome);

for (var j=0; j<fn.length; j++) {


     if (((path + fn[j]) == CurrentPage && j==0) || (j == 0 && CurrentPage.lastIndexOf("/")+1 == CurrentPage.length)) {
          document.write(home + titles[j]);
      }
     if ((path + fn[j]) == CurrentPage && j>=1) {          
       if (CurrentPage.lastIndexOf("/") > path.lastIndexOf("/")) {
             uol = DirectoryDepth(fn[j],"") + fn[0];
             document.write(home + '<a href="' + uol + '">' + titles[0] + '</a> -&gt;&nbsp;' + titles[j]);
         } 
		 else {
			 document.write(home + '<a href="' + fn[0] + '">' + titles[0] + '</a> -&gt;&nbsp;' + titles[j]);
			 }
      }
  }
}



// -->
