window.onload = function XmlPathway()
{

// XmlPathway　v1.2 20080320 by itami.info http://itami.info/
// XmlPathway.js is freely distributable under the terms of an MIT-style license.


/** config *******************************************************************/
	var xmlid 		= "pathway";				// set id
	var pathXmlFile 	= "_bc.xml";				// set xml file name
	var separater 		= "&nbsp;&#187;&nbsp;";		// set character as separater
	var currentPhrase 	= "";		// set phrase for current page　<-- toggle excludePhrase
	var excludePhrase 	= "ファルコムミュージアム / Amusement-Center.com / ";		// set exclude phrase for current page <-- toggle currentPhrase
/*****************************************************************************/
	
	var path,name,string   ="";

	if (document.implementation && document.implementation.createDocument){
		xml_doc = document.implementation.createDocument("", "", null);
	}else if (window.ActiveXObject){
		 xml_doc = new ActiveXObject("Microsoft.XMLDOM");
	}else{
	}

	xml_doc.async = false;
	xml_doc.load(pathXmlFile);

	var pathways = xml_doc.getElementsByTagName("pathway");
	for (var i = 0; i < pathways.length; i++) {
		path = pathways[i].getElementsByTagName("path")[0].firstChild.nodeValue;
		name = pathways[i].getElementsByTagName("name")[0].firstChild.nodeValue;
		string += "<a class='path' href=' " + path +"'>"+ name + "</a>" + separater;
	}
	
	currentTitle = document.title;

	if (currentPhrase != ""){
		string += currentPhrase;
	}else if (excludePhrase != ""){
		string += currentTitle.replace(excludePhrase ,"");
	}else {
		string += currentTitle;
	}

	document.getElementById(xmlid).innerHTML = string; 
}
