// =======================================================
// -------------------------------------------------------
// id → オブジェクト
// -------------------------------------------------------
function id_to_obj( id ) {
	var obj;
	if( document.all ) {
		if( obj = document.all( id ) )	return obj;
	}
	if( document.getElementById ) {
		if( obj = document.getElementById( id ) )	return obj;
	}
	return null;
}
// =======================================================
// -------------------------------------------------------
// form.name → オブジェクト
// -------------------------------------------------------
function fnm_to_obj( fnm ) {
	if( obj = eval( 'document.' + fnm ) )	return obj;
	return null;
}
// -------------------------------------------------------
// top.form.name → オブジェクト
// -------------------------------------------------------
function tfnm_to_obj( fnm ) {
	if( obj = eval( 'top.document.' + fnm ) )	return obj;
	return null;
}
// -------------------------------------------------------
// top.FRN.form.name → オブジェクト
// -------------------------------------------------------
function tffnm_to_obj( frn, fnm ) {
	if( obj = eval( 'top.' + frn + '.document.' + fnm ) )	return obj;
	return null;
}
// =======================================================
// -------------------------------------------------------
// iframe id → ドキュメント
// -------------------------------------------------------
function ifid_to_doc( id ) {
	var doc;
	if( document.all ) {
		if( doc = frames[id].document )	return doc;
	}
	if( document.getElementById ) {
		if( doc = document.getElementById( id ).contentDocument )	return doc;
	}
	return null;
}
// -------------------------------------------------------
// top.iframe id → ドキュメント
// -------------------------------------------------------
function tifid_to_doc( id ) {
	var doc;
	if( top.document.all ) {
		if( doc = top.frames[id].document )	return doc;
	}
	if( top.document.getElementById ) {
		if( doc = top.document.getElementById( id ).contentDocument )	return doc;
	}
	return null;
}

// =======================================================
// -------------------------------------------------------
// 文字オブジェクト値取得
// -------------------------------------------------------
function get_vl_otx( obj ) {
	if( !obj )	return '';
	return obj.value;
}
// -------------------------------------------------------
// 文字オブジェクト値設定
// -------------------------------------------------------
function set_vl_otx( obj, val ) {
	if( !obj )	return;
	obj.value = val;
}
// -------------------------------------------------------
// 選択オブジェクト値取得
// -------------------------------------------------------
function get_vl_osl( obj ) {
	if( !obj )	return '';
	return obj.options[obj.selectedIndex].value;
}
// -------------------------------------------------------
// 選択オブジェクト値設定
// -------------------------------------------------------
function set_vl_osl( obj, val ) {
	var n;
	if( !obj )	return;
	for( n = 0; n < obj.options.length; n++ ) {
		if( obj.options[n].value == val ) {
			obj.selectedIndex = n;	return;
		}
	}
	obj.selectedIndex = 0;
}
// -------------------------------------------------------
// チェックオブジェクト値取得
// -------------------------------------------------------
function get_vl_ock( obj ) {
	if( !obj )	return '';
	if( obj.checked ) {
		return obj.value;
	}
	return '';
}
// -------------------------------------------------------
// ラジオオブジェクト値取得
// -------------------------------------------------------
function get_vl_ord( obj ) {
	var n;
	if( !obj )	return '';
	for( n = 0; n < obj.length; n++ ) {
		if( obj[n].checked ) {
			return obj[n].value;
		}
	}
	return '';
}
// =======================================================
// -------------------------------------------------------
// オブジェクトクラス設定
// -------------------------------------------------------
function set_obj_cls( obj, cls ) {
	if( !obj )	return;
	obj.className = cls;
}
// -------------------------------------------------------
// オブジェクト文字スタイルシート設定
// -------------------------------------------------------
function set_obj_tcs( obj, css ) {
	if( !obj || !obj.style )	return;
	obj.style.cssText = css;
}
// *******************************************************
// -------------------------------------------------------
// 正整数値変換
// -------------------------------------------------------
function cv_uint( str ) {
	var num;
	str = str.replace( /０/g, '0' );
	str = str.replace( /１/g, '1' );
	str = str.replace( /２/g, '2' );
	str = str.replace( /３/g, '3' );
	str = str.replace( /４/g, '4' );
	str = str.replace( /５/g, '5' );
	str = str.replace( /６/g, '6' );
	str = str.replace( /７/g, '7' );
	str = str.replace( /８/g, '8' );
	str = str.replace( /９/g, '9' );
	num = str.replace( /[^0-9]/g, '' ) - 0;
	return num;
}
// -------------------------------------------------------
// 数字カンマ分割
// -------------------------------------------------------
function cmspl_num( num ) {
	var str, sf, chs, ln, n;
	sf = "";
	if( num < 0 ) {
		num *= -1;
		sf = "-";
	}
	chs = num + "";
	ln = chs.length;
	str = "";
	for( n = 0; n < ln; n++ ) {
		if( n != 0 && n % 3 == 0 )	str = ',' + str;
		str = chs.charAt( ln - n - 1 ) + str;
	}
	str = sf + str;
	return str;
}

// *******************************************************
// =======================================================
// ヘルプ表示
// =======================================================
function dsp_win_hlp( itm ) {
	var win = window.open( "/document/help.html#" + itm, "win_hlp", "width=720,height=300"+
		",scrollbars=1,resizable=1,toolbar=0,menubar=0,location=0,directories=0,status=0" );
	win.focus();
}

// *******************************************************
// =======================================================
// バナー11表示
// =======================================================
function dsp_bnr_11() {
document.write('<a href="http://px.a8.net/svt/ejp?a8mat=1HTQI4+9ERNZM+M7Q+601S1" target="_blank">');
document.write('<img border="0" width="125" height="125" alt="" src="http://www28.a8.net/svt/bgt?aid=090407020569&wid=001&eno=01&mid=s00000002879001008000&mc=1"></a>');
document.write('<img border="0" width="1" height="1" src="http://www16.a8.net/0.gif?a8mat=1HTQI4+9ERNZM+M7Q+601S1" alt="">');
}
// =======================================================
// バナー12表示
// =======================================================
function dsp_bnr_12() {
document.write('<a href="http://px.a8.net/svt/ejp?a8mat=1HTQI3+GCTQ2A+1SVK+626XT" target="_blank">');
document.write('<img border="0" width="120" height="60" alt="" src="http://www26.a8.net/svt/bgt?aid=090407019989&wid=001&eno=01&mid=s00000008408001018000&mc=1"></a>');
document.write('<img border="0" width="1" height="1" src="http://www14.a8.net/0.gif?a8mat=1HTQI3+GCTQ2A+1SVK+626XT" alt="">');
}
// =======================================================
// バナー13表示
// =======================================================
function dsp_bnr_13() {
document.write('<a href="http://px.a8.net/svt/ejp?a8mat=1HTQI3+FJ21TE+130Q+5YJRL" target="_blank">');
document.write('<img border="0" width="125" height="125" alt="" src="http://www27.a8.net/svt/bgt?aid=090407019939&wid=001&eno=01&mid=s00000005057001001000&mc=1"></a>');
document.write('<img border="0" width="1" height="1" src="http://www14.a8.net/0.gif?a8mat=1HTQI3+FJ21TE+130Q+5YJRL" alt="">');
}
