function getFace() {
	$
			.ajax( {
				url : "frontPage/getSixFace",
				type : "post",
				dataType : "json",
				success : function(json) {
					var index = 1;
					var ht = "<tr>";
					$
							.each(
									json.coll,
									function(i, value) {
										var img = "../jjwBG/images/faces/"
												+ json.coll[i].imagepath;
										ht = ht
												+ ("<td width='16%' valign='middle' align='center'><input type='hidden' id='"
														+ index
														+ "' value='"
														+ img
														+ "'/><input type='hidden' id='"
														+ index
														+ "-t' value='"
														+ json.coll[i].dis
														+ "'/><a href='javascript:view("
														+ index
														+ ")'><img src='" + img + "' width='197px' height='120px' border='0'/></a></td>");
										index = index + 1;
									});
					if (index == 1) {
						$("#facs")
								.append(
										"<tr><td style='font-size: 12px;text-align: center'>暂无交警英姿！</td></tr>");
					}
					$("#facs").append(ht + "</tr>");
					$("#facs2").append(ht + "</tr>");

					var speed = 30;
					var demo = $("#demo");
					var demo1 = $("#demo1");
					var demo2 = $("#demo2");
					demo2.html(demo1.html());
					function Marquee() {
						if (demo.scrollLeft() >= demo1.width())
							demo.scrollLeft(0);
						else {
							demo.scrollLeft(demo.scrollLeft() + 1);
						}
					}
					var MyMar = setInterval(Marquee, speed)
					demo.mouseover(function() {
						clearInterval(MyMar);
					})
					demo.mouseout(function() {
						MyMar = setInterval(Marquee, speed);
					})
				},
				error : function() {
					//	alert("数据库为空");
			}
			});
}

function getallFace() {
	$
			.ajax( {
				url : "frontPage/allFace",
				type : "post",
				dataType : "json",
				success : function(json) {
					var index = 1;
					var ht = "";
					$
							.each(
									json.coll,
									function(i, value) {
										var img = "../jjwBG/images/faces/"
												+ json.coll[i].imagepath;
										ht = ht
												+ "<tr><td width='80%'><a href='javascript:view("
												+ index
												+ ")'>"
												+ index
												+ "、"
												+ json.coll[i].dis
												+ "</a></td><td><a href='javascript:view("
												+ index
												+ ")'><img src='"
												+ img
												+ "' width='40px' height='30px'></a><input type='hidden' id='"
												+ index
												+ "' value='"
												+ img
												+ "'/><input type='hidden' id='"
												+ index + "-t' value='"
												+ json.coll[i].dis
												+ "'/></td></tr>";
										index = index + 1;
									});
					if (index == 1) {
						$("#newsList").append("暂无交警英姿！");
					}

					$("#newsList").append(ht);
				},
				error : function() {
					//	$("#newsList").append("数据库无数据！");
			}
			});
}

function view(id) {
	$("#pointface")
			.attr(
					"style",
					"position: absolute;border: 2px solid #bbbbbb;background-color:#EFEFEF;z-index:1000;width:600px;height:500px;text-align: center; vertical-align: middle; font-size: 18px;");
	var img = $("#" + id).attr("value");
	var text = $("#" + id + "-t").attr("value");
	$("#pointface").empty();
	text = text + "<br/><br/>" + "<img src='" + img
			+ "' width='500px' height='400px'>" + "<br>"
			+ "<br><input type='button' value='关闭' onclick='ci()'>";
	$("#pointface").append(text);
	scall();
}

function ci() {
	$("#pointface").attr("style", "display:none;");
}
