1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
-
-
-
- breadCrumbJsData = function(){
-
-
-
-
- this.indexMatch = false;
-
-
-
-
- this.ignorePath = '/third';
-
-
-
-
- this.contentName = {
- "home" : "ホーム",
- "/~kitagata/":"トップ",
- "/~kitagata/living/":"くらしの情報",
- "/~kitagata/living/copy_of_the_certificate_of_residence.html":"戸籍・住民票など",
-
- "" : ""
- };
- }
- var breadCrumbJsData = new breadCrumbJsData();
-
- function breadCrumbJs(){
-
-
-
- var URL = window.location.pathname.replace(breadCrumbJsData.ignorePath, '');
- var thisURL = URL.match(/(.*?)\//g);
- var fileName = window.location.pathname.match(/([^¥/]+?)$/);
-
- if ( fileName && (!( fileName[0].match("index") && !breadCrumbJsData.indexMatch )) ){ thisURL.push( fileName[0] ); }
- var drw = document.getElementById("breadCrumb");
- var rootingPath = "";
- if ( drw.tagName == "P" | drw.tagName == "DIV" ){
- for( i=0; i<thisURL.length; i++){
- rootingPath += thisURL[i];
- if ( i == 0 ){
- drw.innerHTML = '<a href="'+breadCrumbJsData.ignorePath+'/">' + funcIndexSearch('home') + '</a>';
- } else if ( i == thisURL.length - 1 ){
- drw.innerHTML += ' > <strong>' + funcIndexSearch(rootingPath) + '</strong>';
- } else {
- drw.innerHTML += ' > <a href="'+breadCrumbJsData.ignorePath+''+rootingPath+'">' + funcIndexSearch(rootingPath) + '</a>';
- }
- }
- }
- if ( drw.tagName == "UL" | drw.tagName == "OL" ){
- for( i=0; i<thisURL.length; i++){
- rootingPath += thisURL[i];
- if ( i == 0 ){
- drw.innerHTML = '<li><a href="'+breadCrumbJsData.ignorePath+'/">' + funcIndexSearch('home') + '</a></li>';
- } else if ( i == thisURL.length - 1 ){
- drw.innerHTML += ' <li class="active"><strong>' + funcIndexSearch(rootingPath) + '</strong></li>';
- } else {
- drw.innerHTML += ' <li><a href="'+breadCrumbJsData.ignorePath+''+rootingPath+'">' + funcIndexSearch(rootingPath) + '</a></li>';
- }
- }
- }
- }
- function funcIndexSearch(){
-
-
-
- keyword = breadCrumbJsData.contentName[arguments[0]];
- if(keyword == undefined){
- return arguments[0].match(/(.*?)\//g).pop().replace("/","");
- } else{
- return keyword;
- }
- }
-
- if(window.addEventListener) {
- window.addEventListener("load", breadCrumbJs, false);
- }
- else if(window.attachEvent) {
- window.attachEvent("onload", breadCrumbJs);
- }
|