/* ************************************

build breadcrumbs based on folder names
var strTitle is placed on individual asp pages
Author: Ross Andersen - Little Orange Dots - August 2005

*************************************** */
function buildCrumbs() {
	var strPath = window.location.toString();
	strPath = strPath.replace("_","/");
	var pathArray = strPath.split("/");
	//alert(pathArray);
	//alert(pathArray.length);
	if (strTitle != "Home") {
		if (((pathArray.length == "6") && (pathArray[5] == "")) || ((pathArray.length == "5") && (pathArray[4] == "")) || pathArray.length == "4") {
			document.write("<a href='/'>Home</a> &gt; <span style='color:#000;'>" + strTitle + "</span>");
		}
		else if ((pathArray.length == "6") && (pathArray[5] != "")) {
			document.write("<a href='/'>Home</a> &gt; <a href=/" + pathArray[3] + "_" + pathArray[4] + "/>" + pathArray[3] + " " + pathArray[4] + "</a> &gt; <span style='color:#000;'>" + strTitle + "</span>");
		}
		else if ((pathArray.length == "5") && (pathArray[4] == "")) {
			document.write("<a href='/'>Home</a> &gt; <span style='color:#000;'>" + strTitle + "</span>");
		}
		else if ((pathArray.length == "5") && (pathArray[3] == "shoppingcart")) {
			document.write("<a href='/'>Home</a> &gt; <span style='color:#000;'>" + strTitle + "</span>");
		}
		else if ((pathArray[4] == "ato-tea-benefits.asp") || (pathArray[4] == "ato-tea-faq.asp") || (pathArray[4] == "ato-tea-instructions.asp") || (pathArray[4] == "ato-tea-applying.asp")) {
			document.write("<a href='/'>Home</a> &gt; <a href=/Products/>Products</a> &gt; <a href='/Products/ato-tea.asp'>ATO Tea Brewers</a> &gt; <span style='color:#000;'>" + strTitle + "</span>");
		}
		else {
			document.write("<a href='/'>Home</a> &gt; <a href=/" + pathArray[3] + "/>" + pathArray[3] + "</a> &gt; <span style='color:#000;'>" + strTitle + "</span>");
		}
	}
}
