/* ページ上部へ戻る */
function pageTopScroll() {
	var scrj = 1;
	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("pageTopScroll()",20);
	} else {
		scrollTo(0,0);
		scrj = 1;
	}
}

/* onmouse で文字スクロール */
var scr = {}; // スクロール用
function scroll(el){
	scr.element = el;
	var pix = 1;		// 一度に動かす量(ピクセル)
	var interval = 50;	// 実行間隔(ms)
	if (el != undefined) {
		var tags = el.getElementsByTagName('*');
		for (var i in tags) {
			if (tags[i].className == 'shortTxt')
				var shortTxt = tags[i];
			if (tags[i].className == 'fullTxt')
				var fullTxt = tags[i];
		}
		el.onmouseout = function(){
			if (scr.fnc) clearTimeout(scr.fnc);
			scr = {};
			fullTxt.style.display = 'none';
			shortTxt.style.display = 'inline';
		}
//			if (shortTxt.innerHTML != fullTxt.innerHTML) {
			shortTxt.style.display = 'none';
			fullTxt.style.display = 'inline';
			var max = 0 - fullTxt.offsetWidth;
			var left = (fullTxt.style.left) ? parseInt(fullTxt.style.left.split('px')[0]) : 0;
			if (left > max) {
				fullTxt.style.left = (left - pix) + 'px';
			} else {
//				fullTxt.style.left = el.offsetWidth + 'px';
				fullTxt.style.left = fullTxt.parentNode.offsetWidth + 'px';
			}
			scr.fnc = setTimeout(
				function(){scroll(scr.element)},
				interval
			);
//			}
	}
}

/* ウインドウ名を指定して開く */
	function target_open_win ( url, window_name ) {

		window.open( url, window_name ).focus();

		return false;
	}


