

/* number disp
----------------------------------------------- */
function numberDisp() {

	d = new Date();

	yy = d.getYear();
	mm = d.getMonth() + 1;
	dd = d.getDate();
	if (yy < 2000) { yy += 1900; }
	if (mm < 10) { mm = "0" + mm; }
	if (dd < 10) { dd = "0" + dd; }

	st = new Date(2001,1,1);
	nw = new Date(yy,mm,dd);
	tt = nw.getTime() - st.getTime();
	tt = String(tt / (60 * 60 * 24 * 1000));

	tt = tt.replace(/0/g,"<img src='/common/0.gif' />");
	tt = tt.replace(/1/g,"<img src='/common/1.gif' />");
	tt = tt.replace(/2/g,"<img src='/common/2.gif' />");
	tt = tt.replace(/3/g,"<img src='/common/3.gif' />");
	tt = tt.replace(/4/g,"<img src='/common/4.gif' />");
	tt = tt.replace(/5/g,"<img src='/common/5.gif' />");
	tt = tt.replace(/6/g,"<img src='/common/6.gif' />");
	tt = tt.replace(/7/g,"<img src='/common/7.gif' />");
	tt = tt.replace(/8/g,"<img src='/common/8.gif' />");
	tt = tt.replace(/9/g,"<img src='/common/9.gif' />");

	toDays = yy + "-" + mm + "-" + dd;
	toDays = toDays.replace(/0/g,"<img src='/common/date_0.gif' />");
	toDays = toDays.replace(/1/g,"<img src='/common/date_1.gif' />");
	toDays = toDays.replace(/2/g,"<img src='/common/date_2.gif' />");
	toDays = toDays.replace(/3/g,"<img src='/common/date_3.gif' />");
	toDays = toDays.replace(/4/g,"<img src='/common/date_4.gif' />");
	toDays = toDays.replace(/5/g,"<img src='/common/date_5.gif' />");
	toDays = toDays.replace(/6/g,"<img src='/common/date_6.gif' />");
	toDays = toDays.replace(/7/g,"<img src='/common/date_7.gif' />");
	toDays = toDays.replace(/8/g,"<img src='/common/date_8.gif' />");
	toDays = toDays.replace(/9/g,"<img src='/common/date_9.gif' />");
	toDays = toDays.replace(/-/g,"<img src='/common/date_dot.gif' />");

	document.write('<div id="number">');
	document.write(tt);
	document.write('<img src="/common/number.gif" />');
	document.write('</div>');

	document.write('<div id="date">');
	document.write(toDays);
	document.write('</div>');

}


/* 表示位置固定
----------------------------------------------- */
window.onload = function() {
	var nv = navigator.userAgent;
	var bt = document.getElementById("pgup");
	var mn = document.getElementById("pageleft");

	if (nv.match(new RegExp("MSIE 6", "i"))) { floatbt(); }
	else {
		mn.style.position = "fixed";
		bt.style.position = "fixed";
		bt.style.left = "760px";
		bt.style.bottom = "100px";
	}
}
function floatbt() {
	var bt = document.getElementById("pgup");
	var mn = document.getElementById("pageleft");
	mn.style.position = "absolute";
	mn.style.top = document.body.scrollTop + "px";
	bt.style.position = "absolute";
	bt.style.left = 760 + "px";
	bt.style.top = document.body.offsetHeight + document.body.scrollTop - 150 + "px";
	setTimeout("floatbt()", 10);
}


/* page up
----------------------------------------------- */
function pageup() {
	var nv = navigator.userAgent;
	if (nv.match(new RegExp("MSIE 7", "i"))) { posi = document.documentElement.scrollTop; }
	else if (document.all) { posi = document.body.scrollTop; }
	else { posi = window.pageYOffset; }
	moveObje(posi);
}
function moveObje(position) {
	move = position / 10;
	point = parseInt(position - move);
	scrollTo(0,point);
	if (point > 0) { setTimeout("moveObje(point)",10); }
}

