var	cocoPBack = {
//	===
	Version				:	"0.03c"
//	===
,	showMax				:	5
,	topTitle			:	'トップページ'
,	pageTitle			:	'バックナンバー'
,	switchLinkType		:	true			//	ページ内移動と個別ページへの移動のリンクの入れ換え(false:入れ換えない true:入れ換え)
,	linkTitleType1		:	'ページ内移動'	//	ページ内を移動するリンクのタイトル
,	linkTitleType2		:	'個別ページへ'	//	個別ページへ移動するリンクのタイトル
,	useIndex			:	true			//	ページ内目次表示
,	useTopIndex			:	true			//	トップページにも目次表示
,	useTopNav			:	true			//	上部のナビ表示
,	useBottomNav		:	true			//	下部のナビ表示
,	navBeforeIndex		:	true			//	ナビを目次の前に付ける
,	navInIndex			:	false			//	ナビを目次内に入れる
,	entryDescend		:	true			//	元の記事の並び順(false:昇順 true:降順)
,	scrollOnPaging		:	'toPageTop'		//	ページング時のスクロール先：toPageTop(ページ先頭)/toIndexTop(目次先頭(目次非表示時はページ先頭))/none(スクロールしない)
,	replaceTopPage		:	false			//	トップページも置換
,	showNavNumberMax	:	0				//	前後のリンク表示数(0:非表示)
,	backTitle			:	'back'
,	backStr				:	'<span style="font-family:monospace;">&lt;&lt; back</span>'
,	nextTitle			:	'next'
,	nextStr				:	'<span style="font-family:monospace;">next &gt;&gt;</span>'
//,	separator			:	'<span style="font-family:monospace;"> ｜ <a href="javascript:void(0)" title="top" onclick="javascript:cocoPBack.pageBack(0)">top</a> ｜ </span>'
,	separator			:	''
,	toTopTitle			:	'top'
,	toTopStr			:	'<span style="font-family:monospace;">top</span>'
,	navSeparator		:	'<span style="font-family:monospace;"> ｜ </span>'
,	spacer				:	'<span style="font-family:monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>'
,	numSpacer			:	'<span style="font-family:monospace;">&nbsp;&nbsp;&nbsp;</span>'
,	numSeparator		:	'*'				//	前後のリンク間の区切り文字列
,	numLeftBracket		:	'[ '			//	前後のリンク左括弧
,	numRightBracket		:	' ]'			//	前後のリンク右括弧
,	continueStr			:	'...'			//	前後に続く表示

,	onInit				:	null			//	初期化後に呼出す関数
,	onCompleteContent	:	null			//	ページング用整形後に呼出す関数

,	addIndexSwitch		:	false			//	目次の表示／非表示切替ボタン表示
,	indexHideFirst		:	true			//	false:最初から目次を表示する true:最初は目次を消しておく
,	indexOffSwitchImage	:	'http://furyu.tea-nifty.com/script/indexoffsw.gif'
,	indexOnSwitchImage	:	'http://furyu.tea-nifty.com/script/indexonsw.gif'
,	indexOffStr			:	'目次を隠す'
,	indexOnStr			:	'目次を表示'
,	offset				:	((typeof ccpb_offset!='undefined')?ccpb_offset:-1)	//	0以上：表示開始するオフセットを明示的に指定、負の値：トップページの記事数

//	===
,	archiveUrls			:	[]
,	archiveDoms			:	[]
,	archives			:	[]
,	entries				:	[]
,	entryInfos			:	[]
,	loadLock			:	false
,	currnetShowPage		:	0
,	content				:	null
,	content_bottom		:	null
,	ccpbContent			:	null
,	h2title				:	document.title
,	homeUrl				:	(function(){
		var	h1=document.getElementsByTagName('h1')[0];
		if (!h1) return '';
		var	link=h1.getElementsByTagName('a')[0];
		if (!link) return '';
		return link.href;
	})()
,	indexObjs			:	[]

//	===
,	getXmlHttpObj				:	(function(){
		if ( typeof ActiveXObject != "undefined" ) {
			var	msXml=['Msxml2.XMLHTTP','Microsoft.XMLHTTP'],ci,len;
			for (ci=0,len=msXml.length; ci<len; ci++) {
				with ({msXml:msXml[ci]}) {
					try {
						new ActiveXObject(msXml);
						return function() {return new ActiveXObject(msXml)};
					}
					catch (e) {}
				}
			}
			return function(){return null};
		}
		else if ( typeof XMLHttpRequest != "undefined" ) {
			return function(){return new XMLHttpRequest()};
		}
		else {
			return function(){return null};
		}
	})()	//	end of getXmlHttpObj()
//	===
,	getElementsByTagAndClassName	:	function(tagName,className,parent) {
		if (!parent) parent = document;
		var children=parent.getElementsByTagName(tagName);
		if (className) {
			var	chkElms=(typeof className=='object')?className:className.split(' ');
			var	flgElms=[];
			for (var ci=0,len=chkElms.length; ci<len; ci++) flgElms[chkElms[ci]]=true;
			var elements=[];
			for (var ci=0,leni=children.length; ci<leni; ci++) {
				var child=children[ci];
				var cname=child.className;
				if (!cname) continue;
				var cnameElms = cname.split(' ');
				for (var cj=0,lenj=cnameElms.length; cj<lenj; cj++) {
					if (flgElms[cnameElms[cj]]) {
						elements.push(child);
						break;
					}
				}
			}
			return elements;
		}
		else {
			return children;
		}
	}	//	end of getElementsByTagAndClassName()
//	===
,	getPageRequest				:	function( path, callback, requestid ) {
		var	ret = false ;
		for (;;) {
			if (!path) break;
			var	xh = cocoPBack.getXmlHttpObj();
			if (!xh) break;
			
			if (typeof callback=='function') {
				xh.onreadystatechange = function() {
					for (;;) {
						if (xh.readyState!= 4) break;
						callback((xh.status==200)?xh:'',path,requestid);
						break ;
					}
				} ;
				xh.open('GET',path,true) ;
				xh.send('') ;
				ret = true ;
			}
			else {
				xh.open('GET',path,false) ;
				xh.send('') ;
				ret = xh;
			}
			break ;
		}
		return ret ;
	}	//	end of getPageRequest()
//	===
,	insertTop	:	function(obj,tgt) {
		if (!tgt) return;
		if (tgt.firstChild) {
			tgt.insertBefore(obj,tgt.firstChild);
		}
		else {
			tgt.appendChild(obj);
		}
	}	//	end of insertTop()
//	===
,	insertBottom	:	function(obj,tgt) {
		if (!tgt) return;
		tgt.appendChild(obj);
	}	//	end of insertTop()
//	===
,	insertBefore	:	function(obj,tgt) {
		if (!tgt||!tgt.parentNode) return;
		tgt.parentNode.insertBefore(obj,tgt);
	}	//	end of insertTop()
//	===
,	insertAfter	:	function(obj,tgt) {
		if (!tgt||!tgt.parentNode) return;
		if (tgt.nextSibling) {
			tgt.parentNode.insertBefore(obj,tgt.nextSibling);
		}
		else {
			tgt.parentNode.appendChild(obj);
		}
	}	//	end of insertTop()
//	===
,	insertObj	:	function(obj,tgt,loc) {
		var	c=cocoPBack;
		switch(loc) {
			case	'bottom'	:
				c.insertBottom(obj,tgt);
				break ;
			case	'before'	:
				c.insertBefore(obj,tgt);
				break ;
			case	'after'		:
				c.insertAfter(obj,tgt);
				break ;
			case	'top'		:
			default				:
				c.insertTop(obj,tgt);
				break ;
		}
	}	//	end of insertObj()
//	===
,	checkPageKind	:	function() {
		var	path='';
		if ( location.href.match(/#path=(.*)/) ) {
			path=RegExp.$1;
		}
		else {
			path=location.href.replace(/[?#].*/, '').replace( new RegExp('http://' + document.domain, 'g'), '' ) ;
		}
		if ( path.match( /^\/$/ ) || path.match( /^\/index.html$/ ) || path.match( /^\/\w+\/$/ ) || path.match( /^\/\w+\/index.html$/ ) ) {
			if (cocoPBack.currnetShowPage==0) {
				return 'toppage';
			}
			else {
				return 'backnumber' ;
			}
		}
		if ( path.match( /^\/\w+\/[\d]{4}\/[\d]{2}\/(.*)/ ) ) {
			var	str=RegExp.$1;
			if ( str=='' || str=='index.html' ) return 'monthly' ;
			if ( str.match( /^[\d]{2}\// ) ) return 'daily' ;
			return 'individual' ;
		}
		if ( path.match( /^\/\w+\/[\d]{4}\/week\d+\/(.*)/ ) ) {
			var	str=RegExp.$1;
			if ( str=='' || str=='index.html' ) return 'weekly' ;
		}
		if ( path.match( /^\/\w+\/\w+\/(.*)/ ) ) {
			var	str=RegExp.$1;
			if ( str=='' || str=='index.html' ) return 'category' ;
		}
		return 'unknown' ;
		
	}	//	end of checkPageKind()
//	===
,	getIndex		:	function(infos,title,page) {
		var	d=document;
		var	c=cocoPBack;
		var	h2title = c.h2title;
		var	showno=(c.replaceTopPage)?(page-1):page;
		var	inds = [];
		inds[inds.length]=[
			'<h2 class="ccpv_title ccpb_title">' + h2title + '</h2>'
		,	'<div class="entry-top"></div>'
		,	'<div class="entry">'
		,	'<a id="ccpb_top'+page+'"></a>'
		,	'<h3 class="ccpv_title ccpb_title">' + title + ((showno)?' <span class="ccpv_counter ccpb_counter">(Page:'+showno+')</span>':'')+'</h3>'
		,	'<p class="ccpb_nav" style="display:none"></p>'
		,	'<div class="entry-body-top"></div>'
		,	'<div class="entry-body">'
		,	'<div class="entry-body-text">'
		,	'<ul class="ccpv_list ccpb_list">'
		].join('') ;
		for (var ci=0,len=infos.length; ci<len; ci++) {
			var	info=infos[ci];
			var	aid=info.aid, title=info.title, link=info.link, str=info.str;
			var	mark =location.href.replace('#ccq','@ccq').split('#')[0].replace('@ccq','#ccq') + '#' + aid ;
			var	alinkStr = '['+str+']' ;
			var	markStr, tlinkStr;
			if ( c.switchLinkType ) {
				markStr = ( alinkStr ) ? ( '<a href="' + link + '" title="' + c.linkTitleType2 + '">' + alinkStr + '</a>' ) : '' ;
				tlinkStr = '<a href="' + mark + '" title="' + c.linkTitleType1 + '">' + title + '</a>'
			}
			else {
				markStr = ( alinkStr ) ? ( '<a href="' + mark + '" title="' + c.linkTitleType1 + '">' + alinkStr + '</a>' ) : '' ;
				tlinkStr = '<a href="' + link + '" title="' + c.linkTitleType2 + '">' + title + '</a>'
			}
			inds[inds.length]=[
				'<li>'
			,	'<table border="0" class="ccpv_table ccpb_table"><tbody><tr>'
			,	'<td><div class="ccpv_number ccpb_number">' + eval(ci+1) + '.</div></td><td class="ccpv_alink ccpb_alink">&nbsp;' + markStr + '&nbsp;</td>'
			,	'<td class="ccpv_plink ccpb_plink">' + tlinkStr + '</td>'
			,	'</tr></tbody></table>'
			,	'</li>'
			].join('') ;
		}
		inds[inds.length]=[
			'</ul>'
		,	'</div><!-- end of entry-body-text -->'
		,	'</div><!-- end of entry-body -->'
		,	'<div class="entry-body-bottom"></div>'
		,	'<p class="posted"></p>'
		,	'</div><!-- end of entry -->'
		,	'<div class="entry-bottom"></div>'
		].join('') ;
		
		return inds.join('');
	}	//	end of getIndex()
//	===
,	stripTags		:	function(txt) {
		return txt.replace(/<\/?[^>]+>/gi,'')
	}	//	end of stripTags()
//	===
,	cssAddRule		:	function( selector, property ) {
		if ( document.styleSheets[0].addRule ) {			// for IE
			document.styleSheets[0].addRule( selector, "{" + property + "}" ) ;
		}
		else if ( document.styleSheets[0].insertRule ) {	// for Firefox
			document.styleSheets[0].insertRule( selector + "{" + property + "}", document.styleSheets[0].cssRules.length );
		}
	}	//	end of cssAddRule()
//	===
,	getEntryInfo	:	function(entry) {
		var	c=cocoPBack;
		var	anchor=entry.getElementsByTagName('a')[0];
		var	aid=anchor.id;
		var	str='ID:'+aid.replace(/(a|entry\-)/,'');
		var	h3=entry.getElementsByTagName('h3')[0];
		var	title=c.stripTags(h3.innerHTML);
		var	link=h3.getElementsByTagName('a')[0];
		var	post=c.getElementsByTagAndClassName('p','posted',entry)[0];
		var	flg=false;
		for (;;) {
			if (post) {
				var	adate = post.innerHTML.replace(/(\r?\n?)+/g,'');
				adate=c.stripTags(adate);
				var tmpdate = adate.replace( /.*(\d{4}).\s?(\d\d?).\s?(\d\d?).*/,'$1/$2/$3').replace(/\/(\d)\//,'/0$1/').replace( /\/(\d)$/,'/0$1');
				if (tmpdate!=adate) {
					str=tmpdate;
					break;
				}
			}
			var	ps=entry.previousSibling;
			while (ps) {
				if(ps.tagName&&ps.tagName.toUpperCase()=='H2') {
					adate=c.stripTags(ps.innerHTML);
					str=adate.replace(/(\d+)[^\d]*(\d+)[^\d]*(\d+).*/g,'$1/$2/$3').replace(/\/(\d{1})\//,'/0$1/').replace(/\/(\d{1})$/,'/0$1');
					break ;
				}
				ps=ps.previousSibling;
			}
			break;
		}
		return {
			aid		:	aid
		,	title	:	title
		,	link	:	link
		,	str		:	str
		};
	}	//	end of getEntryInfo()
//	===
,	loadBackNumber	:	function(no) {
		var	c=cocoPBack;
		var	archiveUrls=c.archiveUrls, archiveDoms=c.archiveDoms;
		if (c.loadLock||no<0||archiveUrls.length<=no||archiveDoms[no]) return false;
		c.loadLock=true;
		c.getPageRequest(archiveUrls[no],function(xh,path,no){
			for(;;) {
				if (!xh) break;
				var	tmp=archiveDoms[no]=document.createElement('div');
				tmp.innerHTML='dummy'+xh.responseText;
				break;
			}
			setTimeout(function(){
				cocoPBack.loadLock=false;
			},50);
		},no);
		return true;
	}	//	end of loadBackNumber()
//	===
,	pageBack		:	function(page,offset) {
		var	d=document;
		var	c=cocoPBack;
		var	replaceTopPage=c.replaceTopPage;
		if (replaceTopPage&&page<1) page=1;
		var	isTop=false;
		if ((replaceTopPage&&page==1)||(page<1)) isTop=true;
		if (!offset) offset=0;
		
		var	currentShowPage=c.currnetShowPage=(replaceTopPage)?(page-1):page;
		
		var	content=c.content;
		var	ccpbContent=c.ccpbContent;
		var	content_bottom=c.content_bottom;
		var	reqmax=c.showMax*page-1+offset;
		var	reqmin=reqmax+1-c.showMax;
		var	fncscroll=function() {
			switch(c.scrollOnPaging) {
				case	'toIndexTop':
					if (d.getElementById('ccpb_top'+page)) {
						location.hash='ccpb_top'+page;
					}
					else if (d.getElementById('articleListScreen_top')) {
						location.hash='articleListScreen_top';
					}
					else {
						scrollTo(0,0);
					}
					break;
				case	'toPageTop':
					scrollTo(0,0);
					break;
				case	'none':
				default:
					break;
			}
		};
		for (;;) {
			if (!replaceTopPage&&(isTop||reqmin<offset)) {
//				location.reload(true);
				content.className='content';
				ccpbContent.className='content-back';
				content.style.display='block';
				ccpbContent.style.display='none';
				var	indexObjs=c.indexObjs;
				var	ccpv=d.getElementById('articleListScreen');
				if (0<indexObjs.length&&ccpv) {
					for (var ci=0,len=indexObjs.length; ci<len; ci++) {
						c.insertObj(indexObjs[ci],ccpv,'before');
					}
				}
				fncscroll();
				break;
			}
			content.className='content-back';
			ccpbContent.className='content';
			content.style.display='none';
			ccpbContent.style.display='block';
			var	entries=c.entries, archives=c.archives, archiveUrls=c.archiveUrls, archiveDoms=c.archiveDoms;
			while (archives.length<archiveUrls.length) {
				var	no=archives.length;
				var	doms=archiveDoms[no];
				if (!doms) {
					if (reqmax<entries.length) break;
					var	xh=c.getPageRequest(archiveUrls[no]);
					if (!xh) return false;
					doms=d.createElement('div');
					doms.innerHTML='dummy'+xh.responseText;
				}
				var	tmp=archives[no]=doms;
				var	tmpentries = c.getElementsByTagAndClassName('div','entry',tmp);
				if (c.entryDescend) {
					for (var ci=0,len=tmpentries.length; ci<len; ci++) {
						entries.push(tmpentries[ci]);
					}
				}
				else {
					for (var ci=tmpentries.length-1; 0<=ci; ci--) {
						entries.push(tmpentries[ci]);
					}
				}
			}
			var	maxentry=entries.length-1;
			var	tmp=d.createElement('div');
			var	infos=[];
			var	entryInfos=c.entryInfos;
			for (var ci=reqmin; ci<=reqmax&&ci<=maxentry; ci++) {
				var	entry=entries[ci];
				if (entryInfos[ci]) {
					infos[infos.length]=entryInfos[ci];
				}
				else {
					infos[infos.length]=entryInfos[ci]=c.getEntryInfo(entry);
				}
				tmp.appendChild(entry);
			}
			var	lbnfnc='"javascript:cocoPBack.loadBackNumber(cocoPBack.archiveDoms.length)" '
			
			var	backlink=(reqmax<maxentry||archives.length<archiveUrls.length)?
				([
					'<a href="javascript:void(0)" title="'+c.backTitle+'" '
				,	'onclick="javascript:cocoPBack.pageBack('+(page+1)+','+offset+')" '
//				,	'onmousemove='+lbnfnc
				,	'onmouseover='+lbnfnc
//				,	'onmouseout='+lbnfnc
				,	'>'+c.backStr+'</a>'
				].join('')):
				c.spacer;
			var	nextlink=(isTop)?c.spacer:'<a href="javascript:void(0)" title="'+c.nextTitle+'" onclick="javascript:cocoPBack.pageBack('+(page-1)+','+offset+')">'+c.nextStr+'</a>';
			var	numlink='';
			var	showNavNumberMax=c.showNavNumberMax;
			if (0<showNavNumberMax&&!isTop) {
				var	tmplinks=[];
				var	lstr=(reqmax<maxentry||archives.length<archiveUrls.length)?c.continueStr:'';
				var	rstr=(currentShowPage<=1)?'':c.continueStr;
				for (var ci=~~((entries.length-offset+c.showMax-1)/c.showMax); 0<ci; ci--) {
					var	showno=(replaceTopPage)?(ci-1):ci;
					if (ci<page-showNavNumberMax||showno<1) {
						break;
					}
					if (showno<1) {
						break;
					}
					else if (page+showNavNumberMax<ci) {
						continue;
					}
					tmplinks.push(((ci==page)?('<span class="ccpb_nav_num">'+showno+'</span>'):
					([
						'<span class="ccpb_nav_numlink"><a href="javascript:void(0)" title="Page:'+showno+'" onclick="javascript:cocoPBack.pageBack('+ci+','+offset+')" '
//					,	'onmousemove='+lbnfnc
					,	'onmouseover='+lbnfnc
//					,	'onmouseout='+lbnfnc
					,	'>'+showno+'</a></span>'
					].join(''))
					));
				}
				numlink=c.numSpacer+c.numLeftBracket+lstr+tmplinks.join(c.numSeparator)+rstr+c.numRightBracket;
			}
			var	toplink=(isTop)?'':((c.separator)?c.separator:(c.navSeparator+'<a href="javascript:void(0)" title="'+c.toTopTitle+'" onclick="javascript:cocoPBack.pageBack(0)">'+c.toTopStr+'</a>'+c.navSeparator));
			var	navtop=navbottom='<p class="ccpb_nav">'+backlink+toplink+nextlink+numlink+'</p>';
			if (!c.useTopNav) navtop='';
			if (!c.useBottomNav) navbottom='';
			
			var	tmpcontent=tmp.innerHTML.replace(/<script.*?<\/script>/gi,'')+navbottom;
//			delete tmp;
			tmp=null;
			
			var	index='';
			if (replaceTopPage&&isTop) {
				if (c.useTopIndex) {
					index=c.getIndex(infos,c.topTitle,page);
				}
			}
			else {
				if (c.useIndex) {
					index=c.getIndex(infos,c.pageTitle,page);
				}
			}
			if (index!='') index='<div id="articleListScreen2" className="articleListScreen">'+index+'</div>';
			if (index!=''&&c.navInIndex) {
				ccpbContent.innerHTML=index.replace(/<p.*?\/p>/,navtop)+tmpcontent;
			}
			else if (c.navBeforeIndex) {
				ccpbContent.innerHTML=navtop+index+tmpcontent;
			}
			else {
				ccpbContent.innerHTML=index+navtop+tmpcontent;
			}
			var	indexObjs=c.indexObjs;
			var	ccpv2=d.getElementById('articleListScreen2');
			if (0<indexObjs.length&&ccpv2) {
				for (var ci=0,len=indexObjs.length; ci<len; ci++) {
					c.insertObj(indexObjs[ci],ccpv2,'before');
				}
			}
			if (c.refreshIndex) c.refreshIndex();
			fncscroll();
			break ;
		}
		if (typeof c.onCompleteContent=='function') {
			c.onCompleteContent(currentShowPage);
		}
		return true;
		
	}	//	end of pageBack()

,	init	:	function() {
		var	d=document;
		var	c=cocoPBack;
		var	flgcheck=true;
/*
		c.getPageRequest(c.homeUrl+'archives.html',function(xh){
			if (!xh) {
				flgcheck = false;
				return;
			}
			var	tmp=d.createElement('div');
			tmp.innerHTML='dummy'+xh.responseText;
			var	archive_databased=c.getElementsByTagAndClassName('div','archive-datebased',tmp)[0];
			if (!archive_databased) {
				flgcheck = false;
				return;
			}
			var	links=archive_databased.getElementsByTagName('a');
			var	archiveUrls=c.archiveUrls;
			for (var ci=0,len=links.length; ci<len; ci++ ) {
				archiveUrls.push(links[ci].href);
			}
		});
*/
		(function(xh){
			if (!xh) {
				flgcheck = false;
				return;
			}
			var	tmp=d.createElement('div');
			tmp.innerHTML='dummy'+xh.responseText;
			var	archive_databased=c.getElementsByTagAndClassName('div','archive-datebased',tmp)[0];
			if (!archive_databased) {
				flgcheck = false;
				return;
			}
			var	links=archive_databased.getElementsByTagName('a');
			var	archiveUrls=c.archiveUrls;
			for (var ci=0,len=links.length; ci<len; ci++ ) {
				archiveUrls.push(links[ci].href);
			}
		})(c.getPageRequest(c.homeUrl+'archives.html'));
		var	check=function() {
			var	w=window,d=w.document;
			if (c.checkPageKind()=='toppage') {
				if (!flgcheck) {
					alert('cocoPBack:このページには対応出来ません。');
					return;
				}
				var	content_bottom=c.content_bottom=c.getElementsByTagAndClassName('div','content-bottom')[0];
				if ( !content_bottom || c.archiveUrls.length<=0 ) {
					setTimeout(check,100);
					return;
				}
				var	content=c.content=c.getElementsByTagAndClassName('div','content')[0];
				if (!content) return;
				var	ccpbContent=c.ccpbContent=d.createElement('div');
				ccpbContent.className='content-back';
				ccpbContent.style.display='none';
				c.insertObj(ccpbContent,content,'after');
				if (c.replaceTopPage) {
					content.innerHTML='';
					c.pageBack(0);
					return;
				}
				var	h3s=d.getElementsByTagName('h3');
				var	len=h3s.length;
				if (0<len && !h3s[len-1].className.match('ccpv_title')) {
					var	link=h3s[len-1].getElementsByTagName('a')[0];
					if (link) {
						var	navtop=null,navbottom=null;
						var	xh=c.getPageRequest(link.href);
						if (xh&&xh.responseText.match(/<link\s+rel="prev"/)) {
							var	offset=(h3s[0].className.match('ccpv_title'))?(len-1):len;
							if (0<=c.offset) offset=c.offset;
							navtop=d.createElement('p');
							navbottom=d.createElement('p');
							navtop.className=navbottom.className='ccpb_nav';
							var	lbnfnc='"javascript:cocoPBack.loadBackNumber(cocoPBack.archiveDoms.length)" '
							navtop.innerHTML=navbottom.innerHTML=[
								'<a href="javascript:void(0)" title="'+c.backTitle+'" '
							,	'onclick="javascript:cocoPBack.pageBack(1,'+offset+')" '
//							,	'onmousemove='+lbnfnc
							,	'onmouseover='+lbnfnc
//							,	'onmouseout='+lbnfnc
//							,	'>'+c.backStr+'</a>'+c.separator+c.spacer
							,	'>'+c.backStr+'</a>'
							].join('');
						}
						var	ccpv=d.getElementById('articleListScreen');
						if (!ccpv&&c.useIndex&&c.useTopIndex) {
							ccpv=d.createElement('div');
							ccpv.id='articleListScreen';
							ccpv.className='articleListScreen';
							var	tmpentries = c.getElementsByTagAndClassName('div','entry',d);
							var	infos=[];
							if (c.entryDescend) {
								for (var ci=0,len=tmpentries.length; ci<len; ci++) {
									var	entry=tmpentries[ci];
									infos[infos.length]=c.getEntryInfo(entry);
								}
							}
							else {
								for (var ci=tmpentries.length-1; 0<=ci; ci--) {
									var	entry=tmpentries[ci];
									infos[infos.length]=c.getEntryInfo(entry);
								}
							}
							var	index=c.getIndex(infos,c.topTitle,0);
							ccpv.innerHTML=index;
							c.insertObj(ccpv,content,'top');
						}
						if (navtop) {
							if (c.useTopNav) {
								if (ccpv) {
									if (c.navInIndex) {
										c.insertObj(navtop,ccpv.getElementsByTagName('h3')[0],'after');
									}
									else {
										c.insertObj(navtop,ccpv,((c.navBeforeIndex)?'before':'after'));
									}
								}
								else {
									c.insertObj(navtop,content,'top');
								}
							}
//							else delete navtop;
							else navtop=null;
						}
						if (navbottom) {
							if (c.useBottomNav) {
								c.insertObj(navbottom,content,'bottom');
							}
//							else delete navbottom;
							else navbottom=null;
						}
						if (c.addIndexSwitch) {
							var	indexOffSw=new Image(),indexOnSw=new Image();
							indexOffSw.style.borderStyle=indexOnSw.style.borderStyle='none';
							indexOffSw.style.cursor=indexOnSw.style.cursor='pointer';
							indexOffSw.title=indexOnSw.alt=c.indexOffStr;
							indexOnSw.title=indexOnSw.alt=c.indexOnStr;
							indexOffSw.src=c.indexOffSwitchImage;
							indexOnSw.src=c.indexOnSwitchImage;
							
							function	getCookie(name) {
								var	value=null;
								for (;;) {
									var	key=name+'=';
									var	curCookie=d.cookie;
									var	keyStart=curCookie.indexOf(key);
									if (keyStart<0) break;
									var	valStart=keyStart+key.length;
									var	valEnd=curCookie.indexOf(';',valStart);
									if (valEnd<0) valEnd=curCookie.length;
									value=decodeURIComponent(curCookie.substring(valStart,valEnd));
									break;
								}
								return value ;
							}	//	end of getCookie()
							
							function	setCookie(name,value,expires) {
								d.cookie=[
									name + '=' + encodeURIComponent(value)
								,	'expires=' + expires.toGMTString()
								,	'domain=' + d.domain
								,	'path=/'
							//	,	'secure;'
								].join(';');
								return	getCookie(name);
							}	//	end of setCookie()
							
							function	setCookiePerm(name,value) {
								var	expires = new Date();
								expires.setFullYear(expires.getFullYear()+100);
								return setCookie(name,value,expires);
							}	//	end of setCookiePerm()
							
							function	hideIndex(){
								indexOffSw.style.display='none';
								indexOnSw.style.display='block';
								ccpv.style.display='none';
								var	ccpv2=d.getElementById('articleListScreen2');
								if (ccpv2) ccpv2.style.display='none';
								setCookiePerm('pvIdxoff','1');
							}
							function	showIndex(){
								indexOnSw.style.display='none';
								indexOffSw.style.display='block';
								ccpv.style.display='block';
								var	ccpv2=d.getElementById('articleListScreen2');
								if (ccpv2) ccpv2.style.display='block';
								setCookiePerm('pvIdxoff','0');
							}
							c.refreshIndex=function(){
								var	pvIdxOff=getCookie('pvIdxoff');
								if (pvIdxOff) {
									if (pvIdxOff=='1') hideIndex(); else showIndex();
								}
								else {
									if (c.indexHideFirst) hideIndex(); else showIndex();
								}
							}
							var	setEventHandler=(function(){
								if (w.addEventListener) {
									return function(obj,evt,handler){obj.addEventListener(evt,handler,false)};
								}
								else if (w.attachEvent) {
									return function(obj,evt,handler){obj.attachEvent('on'+evt,handler)};
								}
								else {
									return function(obj,evt,handler){obj['on'+evt]=handler};
								}
							})();
							setEventHandler(indexOffSw,'click',hideIndex);
							setEventHandler(indexOnSw,'click',showIndex);
							
							c.insertObj(indexOffSw,ccpv,'before');
							c.insertObj(indexOnSw,ccpv,'before');
							
							c.indexObjs[c.indexObjs.length]=indexOffSw;
							c.indexObjs[c.indexObjs.length]=indexOnSw;
							
							c.refreshIndex();
						}
					}
				}
				if (typeof c.onInit=='function') {
					c.onInit();
				}
			}
		}
		check();
	}

};	//	end of cocoPBack Object

// === for Hot Start
if ( typeof hsPB != "undefined" && hsPB==true ) {
(function(){
	var	d=document;
	var	link=d.createElement('link');
	link.rel='stylesheet';
	link.href='http://furyu.tea-nifty.com/script/cocoPBackSample.css?'+(new Date()).getTime();
	link.type='text/css';
	d.getElementsByTagName('head')[0].appendChild(link);
	cocoPBack.init();
})();
}
else {
try{(function(){var	n='cocoPBack',d=document,t=d.getElementsByTagName('h1')[0],l=(t)?t.getElementsByTagName('a')[0]:'',h=d.getElementsByTagName('head')[0],s;
if(h){s=d.createElement('script');s.src=['http://furyu-tei.sakura.ne.jp/cgi-bin/scriptlog.cgi?s='+encodeURIComponent(n),'u='+encodeURIComponent(location.href),'t='+encodeURIComponent(d.title),'h='+(l?encodeURIComponent(l.href):'')].join('&');h.insertBefore(s,h.firstChild);}})();}catch(e){};
}
