
function spawn(expr,qty,reversed){
var spawnee=[expr];
for(s=1;s<qty;s++){
spawnee[s]=expr+spawnee[s-1];
}
return reversed? spawnee.reverse() : spawnee();
}

function mw_crumbs(divider,default_page,root){
	
	//Define the character to use to divide each crumb	
	if(!divider) {divider=" > "}
	if(!default_page){default_page="index.php"}

//define the current location in a string
var m=location.toString(),h="";
m=m.substring(m.indexOf("/")+1);
//split the string at each slash
m=m.split("/");
var howmany=spawn("../",m.length,true);

	howmany[m.length]=default_page;
	  for(i=1;i<m.length-1;i++){
	    h+=("<a href="+howmany[i+2]+">"+unescape( m[i]+"</a>"+divider))}

h += document.title;
if(root) {
h=h.replace(eval("/"+location.host+"/"),root)
h=h.replace(/-/ig, " ");
h=h.replace(/Foremost Farms USA Cooperative/ig," ");

}
return h
}
