function path(x){
	var str = "";
	for(i=0; i<x; i++){
		str += "../";
	}
	return str;
}

function breadcrumbs(pole){
	var pole = document.getElementById(pole);
	var html = pole.innerHTML;
	var url = window.location.toString();
	url = url.split("/");
	var first = true;
	
	html += "<div>";
	for(var i=3; i<url.length-1; i++){
		if(first){ first = false; }else{ html += " ::"; }
		if(i==url.length-2){ 
			html+= "<span> " + unescape(url[i]) + "</span>"; 
		}else{
			html+= "<span> " + "<a href='" + path(url.length-i-2) + "'>" + unescape(url[i]) + "</a></span>";
		}
	}
	html += "</div>";
	
	pole.innerHTML = html;
}

window.onload = function(){
	breadcrumbs("bread");

	var prev = document.getElementById("prev");
	prev.onclick = function(){
		history.go(-1);
	}
	
	var reload = document.getElementById("reload");
	reload.onclick = function(){
		location.reload();
	}
	
	var next = document.getElementById("next");
	next.onclick = function(){
		history.go(1);
	}
}