   <!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="GB2312">
    <title></title>
    <link href="css/style.css" title="style" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.6.3.min.js"></script>

</head>
<body style="background: #F3F3F3" onunload="OnClickStop201();">
<div class="append">
 <div class='type3080 empty' style='margin: 10px;'>
  <table width='100%' style='margin-bottom: 5px'>
   <tr><td style='border: none'> <h1>大华DH-NVR0401-P</h1></td></tr>
 </table>
   <div  style='width: 100%;text-align: center'>
     <span>
   <object width="100%" height="600" id="ocx" classid="CLSID:CB6C958B-1612-4764-98DF-2757EB82E1E3">
<param name="VideoWindBarColor" value="414141">
<param name="VideoWindTextColor" value="9c9c9c">
<param name="nActiveType" value="1" />
<param name="lVideoWindNum" value="4">
  </object>
     </span>
     <input style='width: 100px;height: 30px;margin: 0 30px' onclick='OnClickPlay201()' type='button' value='播放'>
     <input style='width: 100px;height: 30px;margin: 0 30px' onclick='OnClickStop201()'  type='button' value='停止'>
   </div>
   <a href='#' class='back' style='color: #fff'>返回</a>
 </div>
</div>
<script>
  var itype=3083;
<% db_Open("/NandFlash/dbCfg.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbSM where SID="+sid,0);%>;
<% db_Close(); %>
  var sip,sport,usercode,password;

  $(".back,.you_p").live("click",function(){window.history.go(-1);});
  $(function(){
//    var obj = document.getElementById("ocx");
//    obj.LoginType(0);
//    obj.put_lVideoWindNum(4);
    $("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
    $("span:contains('正常')").addClass("ger").removeClass("red");
  });
  list3(json);
  function list3(data){
    var q='';
    $.each(data.recs,function(i,n){
        var user=n.SerDef.split(":");
        sip=user[0]; sport=user[1];
		usercode=user[2];
		password=user[3];
    });
    //$(".append").html(q);
  }
var iPlay=0;
  function OnClickPlay201() {
     var obj = document.getElementById("ocx");
    if(iPlay==0) {
         iPlay++;
     obj.put_lVideoWindNum(4);
     obj.LoginDeviceEx(sip,37777,usercode,password, 0);
    }
     obj.ConnectRealVideoEx(0,1,0);
     obj.ConnectRealVideoEx(1,1,1);
  }
  function OnClickStop201() {
    var obj = document.getElementById("ocx");
    obj.DisConnectRealVideo(0);
    obj.DisConnectRealVideo(1);
  }

</script>
</body>
</html>