<!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="OnClickStop123();">
<div class="append">
</div>
<script>
  var itype=3082;
<% 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(){
    $("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= parseInt(user[1]);
		usercode=user[2];
		password=user[3];
        q+="<div class='type3080 empty' style='margin: 10px;'>";
        q+="<table width='100%' style='margin-bottom: 5px'>";
        q+="<tr><td style='border: none'> <h1>网络相机DH-IPC-HDW</h1></td></tr>";
        q+="</table>";
        q+="<div  style='width: 100%;text-align: center'>";
        var uAgent = navigator.userAgent.toLowerCase();
        if (!(uAgent.indexOf("msie") > 0 || uAgent.indexOf("rv:11") > 0))
          q+='<embed width="100%" height="600" id="ocx" type="application/media-plugin-version-3.0.0.3" videowindtextcolor="9c9c9c" videowindbarcolor="414141">';
        else
          q+='<object width="100%" height="600" id="ocx" classid="CLSID:ED1EDBF5-CCC7-4171-A559-6578BD6D3003" data="data:application/x-oleobject;base64,9dse7cfMcUGlWWV4vW0wAwADAABOmgAA7k0AAA=="><param name="lVideoWindNum" value="1"><param name="VideoWindBarColor" value="414141"><param name="VideoWindTextColor" value="9c9c9c"></object>';
        q+="<input style='width: 100px;height: 30px;margin: 0 30px' onclick='OnClickPlay123()' type='button' value='播放'>";
        q+="<input style='width: 100px;height: 30px;margin: 0 30px' onclick='OnClickStop123()'  type='button' value='停止'>";
        q+="</div>";
        q+="<a href='#' class='back' style='color: #fff'>返回</a>";
        q+="</div>";
    });
    $(".append").html(q)
  }
  function OnClickPlay123() {
    var obj = document.getElementById("ocx");	  
    obj.LoginDeviceEx(sip, sport,usercode,password,0);
    obj.ConnectRealVideo(0, 1);
  }
  function OnClickStop123() {
    var obj = document.getElementById("ocx");
    obj.DisConnectRealVideo(0);
  }

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