String.prototype.capitalize = function(){   return this.replace( /(^|\s)([a-z])/g , function(m,p1,p2){ return p1+p2.toUpperCase(); } );  };

idx=document.URL.indexOf('?');
if (idx < 1) {
	path0=document.URL
} else {
	path0=document.URL.substring(0,idx);
}
idx=path0.indexOf("//",0);
resto=path0.substring(idx+1,path0.length);
idx=resto.indexOf("/",1);
resto=resto.substring(idx,resto.length);
direito=new Array();
i=0;
maior="";
while (true) {
	idx=resto.indexOf("/",1);
	if ((resto.substring(0,idx)=="") || (resto.charAt(1)=="_")) {
		break;
	}
	if (i>0) {
		direito[i]=resto.substring(0,idx);
		if (i>1) {
			path="";
			for (a=1;a<direito.length;a++) {path+=direito[a];}
			fim=direito[i].length;
			aux=direito[i].substring(1,fim);
			string=aux.split("_");
			direitos=string.join(" ");

/*			for (a=0;a<aux.length;a++) {
				if (aux.charAt(a)=="_")
					direitos+=" ";
				else
					direitos+=aux.charAt(a);
			}*/
			nomes=direitos.split(" ");
			direitos="";
			for (n=0;n<nomes.length;n++) {
				nomes[n]=nomes[n].toLowerCase();
				if ((nomes[n]=="de") || (nomes[n]=="da") || (nomes[n]=="do") || (nomes[n]=="das") || (nomes[n]=="dos") || (nomes[n]=="e")) {
					nomes[n]=nomes[n]+" ";
				}	else if ((nomes[n]=="df") || (nomes[n]=="mtps") || (nomes[n]=="tst") || (nomes[n]=="ibama")) {
					nomes[n]=nomes[n].toUpperCase()+" ";
				}	else {
					nomes[n]=nomes[n].capitalize();
/*					mai=nomes[n].charAt(0);
					mai=mai.toUpperCase();
					direito=mai+nomes[n].substring(1,nomes[n].length)+" ";*/
					if (nomes[n]=="Seguro") {
						nomes[n]="Seguros";
					} else if (nomes[n]=="Minas Energia") {
						nomes[n]="Minas e Energia";
					}
//					direitos+=direito;
				}
				direitos=nomes.join(" ");
			}
			document.write(maior+direitos);
			maior=" > ";
		}
		resto=resto.substring(idx,resto.length);
	}
	i++;
}
if (parent.leftFrame && parent.leftFrame.xmlFrame) {
	parent.leftFrame.xmlFrame.location="/legisinfo/controle/monta_xml.cfm?url="+document.URL;
}
if (parent.parent && parent.parent.leftFrame && parent.parent.leftFrame.xmlFrame) {
	parent.parent.leftFrame.xmlFrame.location="/legisinfo/controle/monta_xml.cfm?url="+document.URL;
}
