/* 表示位置固定
----------------------------------------------- */
window.onresize = function() { positioning(); }
window.onload = function() { positioning(); }

function positioning() {
	var nv = navigator.userAgent;
	var bt = document.getElementById("pgup");
	if (nv.match(new RegExp("MSIE 6", "i"))) { floatbt(); }
	else if (nv.match(new RegExp("MSIE 7", "i"))) {
		bt.style.position = "fixed";
		bt.style.left = (document.body.offsetWidth / 2) + 381 + "px";
		bt.style.bottom = "80px";
	}
	else {
		bt.style.position = "fixed";
		bt.style.left = (document.body.offsetWidth / 2) + 380 + "px";
		bt.style.bottom = "80px";
	}
	
	try{ tabCheck(); }
	catch(e){}
}
function floatbt() {
	var bt = document.getElementById("pgup");
	bt.style.position = "absolute";
	bt.style.left = (document.body.offsetWidth / 2) + 370 + "px";
	bt.style.top = document.body.offsetHeight + document.body.scrollTop - 150 + "px";
	setTimeout("floatbt()", 10);
}

/* page up
----------------------------------------------- */
function pageup() {
	var mode = (document.compatMode && document.compatMode=="CSS1Compat");
	if (mode) { posi = document.documentElement.scrollHeight; }
	else { posi = document.body.scrollHeight; }
	moveObje(posi);
}
function moveObje(position) {
	move = position / 10;
	point = parseInt(position - move);
	scrollTo(0,point);
	if (point > 0) { setTimeout("moveObje(point)",1); }
}

/* page back
----------------------------------------------- */
function pageBack(){
    history.back();
}


/* SubWindow
----------------------------------------------- */
function sWin(theURL,winName,features) { //v2.0
	var features = features + ",scrollbars=yes,resizable=yes";
  window.open(theURL,winName,features);
}


