
//080920

function diary () {
	var sub;
	wx = 750;
	wy = 500;
	sub = window.open ("../html/diary.html", "pj_diary", "toolbar=0,locationbar=0,directories=0,status=no,menubar=0,personalbar=0,scrollbars=1,resizable=0,width=750,height=500");
	sub.window.focus ();
	x = (screen.width - (screen.width / 66) - wx);
	y = (screen.height - (screen.height / 13) - wy);
	sub.window.moveTo (x,y);
}

var scrj = 1;
function softScrollBack () {
	if (navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {
		var scdist = document.body.parentNode.scrollTop;
	} else {
		var scdist = document.body.scrollTop;
	}
	if (scrj < 50 && scdist) {
		scdist = (scdist > 2) ? Math.ceil (scdist * .2) : 1;
		scrj++;
		scrollBy (0,-scdist);
		setTimeout ("softScrollBack()",20);
	} else {
		scrollTo (0,0);
		scrj = 1;
	}
}

function OpenPop (theURL, winName) {
	window.open (theURL,winName,'scrollbars=no,resizable=no');
}

function infoPop999 (theURL) {
	GB_showCenter ('',theURL,'530px','850px');
}

function infoPop (theURL) {
	myLightWindow.activateWindow ({href:theURL, title:'magazineworld.jp', width:'850px', height:'530px'});
}


//090806 by tommie

var accordion=function(){
	var tm=sp=5;
	function slider(n){this.nm=n; this.arr=[]}
	slider.prototype.init=function(t,c,k){
		var a,h,s,l,i; a=document.getElementById(t); this.sl=k?k:'';
		h=a.getElementsByTagName('dt'); s=a.getElementsByTagName('dd'); this.l=h.length;
		for(i=0;i<this.l;i++){var d=h[i]; this.arr[i]=d; d.onclick=new Function(this.nm+'.pro(this)'); if(c==i){d.className=this.sl}}
		l=s.length;
		for(i=0;i<l;i++){var d=s[i]; d.mh=d.offsetHeight; if(c!=i){d.style.height=0; d.style.display='none'}}
	}
	slider.prototype.pro=function(d){
		for(var i=0;i<this.l;i++){
			var h=this.arr[i], s=h.nextSibling; s=s.nodeType!=1?s.nextSibling:s; clearInterval(s.tm);
			if(h==d&&s.style.display=='none'){s.style.display=''; su(s,1); h.className=this.sl}
			else if(s.style.display==''){su(s,-1); h.className=''}
		}
	}
	function su(c,f){c.tm=setInterval(function(){sl(c,f)},tm)}
	function sl(c,f){
		var h=c.offsetHeight, m=c.mh, d=f==1?m-h:h; c.style.height=h+(Math.ceil(d/sp)*f)+'px';
		c.style.opacity=h/m; c.style.filter='alpha(opacity='+h*100/m+')';
		if(f==1&&h>=m){clearInterval(c.tm)}else if(f!=1&&h==1){c.style.display='none'; clearInterval(c.tm)}
	}
	return{slider:slider}
}();