<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
String drid = request.getParameter("driverId");
String vhcid = request.getParameter("vhcid");
 %>
<html>
  <head>  	
  </head>
  <body>
			<div class="top"></div>
			<div class="center">
		  		<h3 id="movePopuWin">
		        	<a href="javascript:;" title="关闭" class="message_close" id="closePopuWin"></a>
		        	<span>车主信息</span>
		        </h3>
		        <div class="popuWinMessage_main">
		        	<ul><li style="text-align:center;"><span id="carOwnerMsg" style="color:red;">&nbsp;</span></li></ul>		     
			        	<table width="100%" border="0" style="line-height:25px;">			        		
								<tr>
				        			<td style="width: 100px;text-align: right;padding-right: 15px;">
				        			     姓名:
				        			</td>
				        			<td  id="carOwnerName">
				        				&nbsp;
				        			</td>
				        		</tr>
				        		<tr>
				        			<td style="width: 100px;text-align: right;padding-right: 15px;">
				        			     电话:
				        			</td>
				        			<td id="carOwnerPhone">
				        				&nbsp;
				        			</td>
				        		</tr>
				        		<tr>
				        			<td style="width: 100px;text-align: right;padding-right: 15px;">
				        			     邮箱:
				        			</td>
				        			<td id="carOwnerEmail">
				        				&nbsp;
				        			</td>
				        		</tr>	
			        	</table>			     
        			</form>
		        </div>
			</div>
			<div class="bot"></div>	
			<script>
				$(function(){
				var driverid = '<%=drid %>';
				var vhcid = '<%=vhcid %>';
					$.ajax({
		                    type: "POST",
		                    dataType: "json",
		                    url: "json/driverAction_info.action",
		                    data: {driverid : driverid,vhcid:vhcid},
		                    success: function (json){
		                        if(json.flag){
		                        	if(json.data != null && json.data.length > 0){
		                        		json.data[0].name && $("#carOwnerName").html(isTiYanUser() ? "" : json.data[0].name);
		                        		(json.data[0].mobile || json.data[0].seatNO) 
		                        		  && 
		                        		$("#carOwnerPhone").html( isTiYanUser() ? "" : ( json.data[0].mobile + 
								                        									((json.data[0].mobile && json.data[0].seatNO) ? ", " : "") + 
								                        									(json.data[0].seatNO ==null?"":json.data[0].seatNO)
							                        								   ));
		                        		if(json.data[0].email && !isTiYanUser())$("#carOwnerEmail").html(json.data[0].email);
	                        		}
		                        }else{
		                        	$("#carOwnerMsg").html(json.msg);	
		                        }
		                    },
		                    error: function() {
		                     	$("#carOwnerMsg").html("获取数据异常");	
		                    }
               		 });    
               		   
				     function isTiYanUser(){
				     	return $("#userId").val() == "-1000" ? true : false;
				     }
				});
			</script>	
  </body>
</html>
