
//////////////////////////////////////////////////////////////////////////////////////////////////////
//																									//
//Script created and used by JAYJIT CHAKRABORTY :: jay@dreamz-i.com									//
//																									//
// <div id="breadcrumbs"></div>																		//
// <script type="text/javascript" src="path/to/type="text/javascript" src="crumbs.js""></script>	//
//																									//
//																									//
/////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
// Change the following variables as instructed                             //
//////////////////////////////////////////////////////////////////////////////

// Enter your domain name here, 
var url = "www.abbottcnc.com";

// Enter the word you want to use to describe the home page of your site
var home = "abbottcnc.com";

// Enter the character(s) you want to use to separate your breadbrumbs
var divide = "&gt;";

// Enter text you'd like to see.  You can make this blank as well - "";
var pre = "";

// Enter the extension you use for your pages
var ext = ".html";

// Enter the default file name you use for the root file of your folders
var root = "index";

//////////////////////////////////////////////////////////////////////////////
// DO NOT TOUCH ANYTHING BELOW THIS LINE                                    //
//////////////////////////////////////////////////////////////////////////////

divide = " " + divide + " ";
var a = "" + window.location;
var b = "";
var bar = divide + root;
var code = "";
var foo = root + ext;
var left = "";

a = a.replace(ext,"");
left = a.lastIndexOf("/");

if (a.substring(a.lastIndexOf("/")) == "/") {
	a = a + root;
}

b = a.substring(left+1);
b = b.replace(/_/g," ");
b = b.replace(/#/g,divide);

// Alternative spacer: hyphen. Remove comment tags in the next line to activate
// b = b.replace(/-/g," ");

code = divide + b;
b = "/" + b
b = b.replace(divide,"#");
b = b.replace(/ /g,"_");

// Alternative spacer: hyphen. Remove comment tags in the next line to activate
// b = b.replace(/ /g,"-");

a = a.replace(b,"");

if (a.substring(left-1) != "/") {
	do  {
		left = a.lastIndexOf("/");
		b = a.substring(left+1);
		b = b.replace(/_/g," ");
		
		// Alternative spacer: hyphen. Remove comment tags in the next line to activate
		// b = b.replace(/-/g," ");

		code = divide + "<a href=\"" + foo + "\"   class=\"lowermenu-text-link\">" + b + "</a>" + code;
		foo = "../" + foo;
		b = "/" + b;
		b = b.replace(/ /g,"_");
		
		// Alternative spacer: hyphen. Remove comment tags in the next line to activate
		// b = b.replace(/ /g,"-");

		a = a.replace(b,"");
	} while (a.substring(left-1) != "/");
}

code = code.replace(url,home);
code = code.replace(bar,"");
code = (code.substring(code.indexOf("<")));
code = pre + code;
document.getElementById('breadcrumbs').innerHTML = code;