//ウィンドウオープン(画面中央)
function openWindow(url, width, height) {
	var mydate = new Date();
	window.open(url, 'win' + mydate.getTime(), 'scrollbars=yes,resizable=yes,menubar=no,status=no,toolbar=no,location=no,directories=no,width=' + width + ',height=' + height);
}
//URLエンコード
function urlEncode(str) {
	var ret;
//	if(ua()=='sf') {
//		ret = encodeURIComponent(str);
//	} else {
		ret = escape(str).replace(/\+/g,'%2B');
//	}
	return ret;
}
//全選択、全解除
function changeSelect(lst, flg) {
	var data = '';
	var i;
	if (!lst) return '';
	//リスト1件
	if (!lst[0]) {
		lst.checked = flg
	}
	//リスト複数件
	for (i=0;i<lst.length;i++) {
		lst[i].checked = flg
	}
	return data ;
}
//表示件数変更
function changeLimit(val) {
	limit  = val;
	pageno = 1;
	formRefresh();
}
//ページ変更
function changePage(val) {
	pageno = val;
	formRefresh();
}
//値の反転
function getSortOrder(curno, newno, curorder) {
	var neworder = '0';
	if(newno == curno) {
		if(curorder=='0') neworder = '1';
	}
	return neworder;
}
//ソート変更
function changeSort(val) {
	order  = getSortOrder(sortno, val, order);
    sortno = val;
	pageno = 1;
	formRefresh();
}

