//
// メニュー領域の反転表示
//
function menuHover(obj, cls)
{
	var target;
	
	if(document.getElementById) target = document.getElementById(obj);
	else target = document.all(obj);
	
	if(target == null) return;
	
	target.className = cls;
}

//
// フォントカラーの変更
//
function fontChangeColor(target, cls)
{
	target.className = cls;
}

//
// リアルタイム日時表示
//
function showRealDateTime(obj)
{
	var now;
	var watch;
	var target;
	
	if(document.getElementById) target = document.getElementById(obj);
	else target = document.all(obj);
	if(target == null) return;

	// ローカル日時を取得 
	now = new Date(); 
	watch = now.toLocaleString();  

	// ローカル日時を表示
	target.innerHTML = watch; 

	setTimeout(("showRealDateTime('" + obj + "')"), 1000); 
}

//
// リアルタイム日時表示
//
function showRealDateTime2(obj)
{
	var target;
	
	if(document.getElementById) target = document.getElementById(obj);
	else target = document.all(obj);
	if(target == null) return;

	// ローカル日時を取得 
	var now = new Date(); 
	var year = now.getYear();
	var month = now.getMonth() + 1;
	var day = now.getDate();
	var Hour = now.getHours();
	var minute = now.getMinutes();
	var second = now.getSeconds();
	var watch = year + "/";
	if (month < 10) watch += "0";
	watch += month + "/";
	if (day < 10) watch += "0";
	watch += day + " ";
	if (Hour < 10) watch += "0";
	watch += Hour + ":";
	if (minute < 10) watch += "0";
	watch += minute + ":";
	if (second < 10) watch += "0";
	watch += second;

	// ローカル日時を表示
	target.value = watch; 

	setTimeout(("showRealDateTime2('" + obj + "')"), 1000); 
}

//
// フォーカス設定
//
function setFocus(obj)
{
	var target;
	
	if(document.getElementById) target = document.getElementById(obj);
	else target = document.all(obj);
	if(target == null) return;

	target.focus();
}

//
// ヘルプウィンドウのオープン
//
function OpenHelp()
{
	var posx, posy;
	
	posx = (window.screen.width / 2) - (600 / 2);
	posy = (window.screen.height / 2) - (550 / 2);
	window.open("Help.aspx",null,"height=550,width=600,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,left=" + posx + ",top=" + posy);
}