// Window( Frame )の幅の取得
function getWindowSize() {
	var win = { width: 0, height: 0 };
	// Mozilla, Opera, NN4
	if ( window.innerWidth && window.innerHeight ) {
		win.width  = window.innerWidth;
		win.height = window.innerHeight;
	}
	// 以下 IE
	else if ( document.documentElement && document.documentElement.clientWidth && document.documentElement.clientHeight ) {
		win.width  = document.documentElement.clientWidth;
		win.height = document.documentElement.clientHeight;
	}
	else if( document.body && document.body.clientWidth && document.body.clientHeight ){
		win.width  = document.body.clientWidth;
		win.height = document.body.clientHeight;
	}
	return win;
}

// お知らせ表示
function ShowOsirase(no, id) {
	var osi = { width: 500, height: 300 };
// 	var win = Glayer.getWindowSize();
	var win = getWindowSize();
	Glayer.show('glayer_img');
	$('osiwin').style.left    = ( win.width  - osi.width  ) / 2 + 'px';
	$('osiwin').style.top     = ( win.height - osi.height ) / 2 + 'px';
	$('osiwin').style.display = '';
	$('osiwin').innerHTML = '<table width="500" height="300" bgcolor="#ffffff"><tr><td></td></tr></table>';
	var myAjax = new Ajax.Updater( 'osiwin', 'news_disp.cgi', { method: 'get', parameters: 'news_no=' + no + '&id=' + id } );
}

// お知らせ非表示
function HideOsirase() {
	Glayer.hide('glayer_img');
	$('osiwin').style.display = 'none';
}

//一定期間だけNEWの文字を表示する
function newMark(y,m,d)
{
	oldDay = new Date(y+"/"+m+"/"+d);
	newDay = new Date();
	n = (newDay - oldDay)/(1000*60*60*24);
	if (n <= 30) document.write("new");
}

//お知らせ　メッセージ窓　表示
function openwin(url) {
 w = window.open(url,"win1","width=500,height=300,toolbar=no,resizable=yes,scrollbars=yes,status=no");
 w.focus();
}
