<!--

function pArg(n,v){ //フォームフィールドのコンストラクタ定義
	this.name = n;
	this.value = v;
}

function sArg(n,v){ //検索引数のコンストラクタ定義
	this.name = n;
	this.value = v;
}

/* 検索結果の件数を表示させる */
function RecNumDisp( StartRow, TotalRows, MaxRows, NumRows, RecComment){
	if ( TotalRows != 1){
		document.write( RecComment + "<b>" + TotalRows + "</b>件あります。");
		if ( MaxRows > 1 ){
			document.write( "現在、表示中の物件：<b>" + StartRow + "</b>〜<b>" + ( StartRow + NumRows - 1 ) + "</b>.<br>");
		}else{
			document.write( "現在、表示中の物件：<b>" + StartRow + "</b><br>");
		}
	}else{
		document.write( RecComment + "<b>1</b>件です。<br>");
	}
}

/* 検索結果の件数を表示させるCSS使用 */
function RecNumDispCSS( StartRow, TotalRows, MaxRows, NumRows, RecComment,ClassStr){
	if ( TotalRows != 1){
		document.write( RecComment + '<em class="' + ClassStr + '">' + TotalRows + '</em> 件あります。');
		if ( MaxRows > 1 ){
			document.write( '現在、表示中の物件は、<em class="' + ClassStr + '">' + StartRow + '</em>〜<em class="look">' + ( StartRow + NumRows - 1 ) + '</em>件です。');
		}else{
			document.write( '現在、表示中の物件は、<em class="' + ClassStr + '">' + StartRow + '</em>件です。');
		}
	}else{
		document.write( RecComment + '<em class="' + ClassStr + '">1</em>件あります。');
	}
}

/* リスト表示の[前のn件][次のn件]ボタンを表示させる search用*/
function Make_PNBottons( StartRow, TotalRows, MaxRows, QueryDoc, Method){
	Make_PNBottonsf( StartRow, TotalRows, MaxRows, QueryDoc, Method,'search');
}

/* リスト表示の[前のn件][次のn件]ボタンを表示させる searchrail用*/
function Make_PNBottonsRail( StartRow, TotalRows, MaxRows, QueryDoc, Method){
	Make_PNBottonsf( StartRow, TotalRows, MaxRows, QueryDoc, Method,'searchrail');
}

/* リスト表示の[前のn件][次のn件]ボタンを表示させる */
function Make_PNBottonsf( StartRow, TotalRows, MaxRows, QueryDoc, Method, Func){
	var output;
	if ( MaxRows > 0 ){
		document.write("<table id='PNBottonsTable'><tr>");
		if (StartRow != 1){
			if(Method=='post' || Method=='POST'){
				document.write("<td><form method=" + Method + " action=\"" + QueryDoc + "?function=" + Func + "&start=" + eval( StartRow - MaxRows ) + "\">");
			}else if(Method=='get' || Method=='GET'){
				document.write("<td><form method=" + Method + " action=\"" + QueryDoc + "\">");
				Make_Hidden( new Array(new pArg("function",Func),
															 new pArg("start",eval( StartRow - MaxRows ))
															)
										);
			}
			Make_Hidden(ArgList);
			
			document.write("<input type=\"submit\" value=\"前の " + eval(MaxRows) +  "レコードへ\">");
			document.write("</form></td>");
		}
		if( StartRow + MaxRows <= TotalRows ){
			document.write("<td>");
			if(Method=='post' || Method=='POST'){
				document.write("<form method=" + Method + " action=\"" + QueryDoc + "?function="+ Func +"&start=" + eval(StartRow + MaxRows) + "\">");
			}else if(Method=='get' || Method=='GET'){
				document.write("<td><form method=" + Method + " ACTION=\"" + QueryDoc + "\">");
				Make_Hidden( new Array(new pArg("function",Func),
															 new pArg("start",eval( StartRow + MaxRows ))
															)
										);
			}
			Make_Hidden(ArgList);
			if( TotalRows - ( StartRow + MaxRows - 1 ) < MaxRows ){
				document.write("<input type=\"submit\" value=\"次の" + eval( TotalRows - ( StartRow + MaxRows - 1 ) ) + "レコードへ\">");
			}else{
				document.write("<input type=submit value=\"次の "+ eval(MaxRows) + "レコードへ\">");
			}
			document.write("</form></td>");
		}
		document.write("</tr>");
		document.write("</table>");
	}
	
}


/* 指定された引数リストの<INPUT TYPE=HIDDEN>を作成する */
function Make_Hidden(ArgumentList){
	for( var i=0; i<ArgumentList.length; i++ ){
		document.write( "<input type=hidden name=" + ArgumentList[i].name + " value=" + ArgumentList[i].value + ">" );
	}
}

// -->

