function rowOn(row) {
	$$('.listTable tbody tr.onRow').map(function(elem) {
		elem.removeClassName('onRow');
	});

	if (row != null) {
		$(row).addClassName('onRow');
	}
}

function post(href, formName, conf)
{
	var post_ok = true;
	if (conf) {
		post_ok = confirm(conf);
	}

	if (post_ok != true) return;

	var formName = (typeof(formName) == 'undefined')? 'form1' : formName;
	var formElem = $(formName);

	if (!Object.isElement(formElem)) {
		alert('フォーム要素が見つかりません。[' + formName + ']');
		return false;
	}

	var url    = href.split('?');
	var params = url[1].split('&');

	params.each(function(param) {
		var hid = param.split('=');
		formElem.insert(new Element('input', {type:'hidden', name:hid[0], value:hid[1]}));
	});

	if (url[0] != "") {
		formElem.writeAttribute('action', url[0]);
	}

	var now = new Date();
	var sec = now.getHours() + now.getMinutes() + now.getSeconds();
	formElem.writeAttribute('action', formElem.readAttribute('action') + '?' +sec);
	//alert(formElem.readAttribute('action').inspect());


	formElem.submit();

	return false;
}


function selectMember(member_code)
{
	var selectMemberName = $('mem_' + member_code).innerHTML;

	parent.document.getElementById('member_name').innerHTML = selectMemberName + "様";
	parent.document.getElementById('member_code').value     = member_code;

	parent.Shadowbox.close();
}

function openWin(param) {
	window.open('http://www.fpoa.jp/chat.php?' + param,
				'chatWin',
				'width=800, height=600, menubar=no, toolbar=no, scrollbars=no');
}



var lastInfo = "";
function openInfo(id) {
	if (lastInfo.id == id && lastInfo.style.display == 'block') {
		lastInfo.style.display = 'none';
		return;
	}
	if (lastInfo != "") {
		lastInfo.style.display = 'none';
	}

	var info = document.getElementById(id);
	info.style.display = 'block';
	lastInfo = info;
}

function confWin(url, msg, call) {
	var confMsg = (typeof msg == "undefined")? "削除してよろしいですか？": msg;
	if (confirm(confMsg)) {
		if (call == "openWin") {
			openWin(url);
		} else {
			location.href = url;
		}

	}
}


