function getHelps() {
	$
			.ajax( {
				url : "frontPage/getHelps",
				type : "post",
				dataType : "json",
				success : function(json) {
					$
							.each(
									json.pinfo,
									function(i, value) {
										$("#helps")
												.append(
														"<tr><td width='80%' height='23px' style='border-bottom: 1px dotted black;'><img src='images/book.gif'/><a href='pointHelp?id="
																+ json.pinfo[i][2]
																+ "' target='_blank' style='color:#29698c;'>&nbsp;&nbsp;"
																+ json.pinfo[i][0]
																+ "</a></td><td style='border-bottom: 1px dotted black;font-size:12px;color:#29698c;padding-right:4px' align='right'>["
																+ json.pinfo[i][1]
																+ "]</td></tr>");
									});
				},
				error : function() {
					//$("#helps").append("数据库无数据！");
				}
			});
}

function getAllHelps(pages) {
	var totles = $("#totleRow").attr("value");
	$
			.ajax( {
				url : "frontPage/getAllHelps",
				type : "post",
				data : "startRow=" + pages,
				dataType : "json",
				success : function(json) {
					var index = pages;
					$("#helpsList").empty();
					$("#links").empty();
					$
							.each(
									json.coll,
									function(i, value) {
										index = index + 1;
										var colors = "#e2e2e2";
										if (index % 2 != 0) {
											colors = "#FFFFFF";
										}
										$("#helpsList")
												.append(
														"<tr style='font-size:14px;background-color: "
																+ colors
																+ ";vertical-align: middle;' align='left'><td style='font-size:14px;vertical-align: "
																+ "top;vertical-align: middle;' width='80%' align='left' height='40'>&nbsp;&nbsp;<a href='pointHelp?id="
																+ json.coll[i][0]
																+ "' style='color:#29698c;'>•"
																+ json.coll[i][1]
																+ "</a></td><td height='40'>"
																+ json.coll[i][2]
																+ "</td></tr>");
									});
					$("#links").append(
							"共" + totles + "条新闻&nbsp;&nbsp;&nbsp;&nbsp;" + "第"
									+ (pages / 20 + 1)
									+ "页&nbsp;&nbsp;&nbsp;&nbsp;" + "共"
									+ Math.floor(totles / 20 + 1)
									+ "页&nbsp;&nbsp;&nbsp;&nbsp;");
					if (index != 0 && pages >= 20) {
						$("#links")
								.append(
										"<input type='button' onclick='javascript:getAllHelps(0)' value='首页' style='background:transparent;border-width:1px'>&nbsp;&nbsp;&nbsp;&nbsp;");
					}
					if (pages - 20 >= 0) {
						$("#links")
								.append(
										"<input type='button' onclick='javascript:getAllHelps("
												+ (pages - 20)
												+ ")' value='上一页' style='background:transparent;border-width:1px'>&nbsp;&nbsp;&nbsp;&nbsp;");
					}
					if (totles - pages - 20 >= 1) {
						$("#links")
								.append(
										"<input type='button' onclick='javascript:getAllHelps("
												+ (pages + 20)
												+ ")' value='下一页' style='background:transparent;border-width:1px'>&nbsp;&nbsp;&nbsp;&nbsp;");
					}
					if (index != 0 && totles - pages > 20) {
						$("#links")
								.append(
										"<input type='button' onclick='javascript:getAllHelps("
												+ (totles - totles % 20)
												+ ")' value='尾页' style='background:transparent;border-width:1px'>");
					}
					if (index == 0) {
						$("#list0")
								.append(
										"<tr style='font-size:12px;'><td colspan='7'>无已发布信息！</td></tr>");
					}
				},
				error : function() {
				//	$("#list1").append("数据库为空");
				}
			});
}

