<!DOCTYPE html>
<% language=javascript %>
<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">
<div class="append"></div>
<script>
var itype=3074;
var tescape= 0,time;

<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbSM where SID="+sid,0); %>;
<% db_Close(); %>
	
    $(function(){
        $("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
      //  time=setInterval(ajax,tescape)
    });
    function ajax(){
        $.ajax({
            type: "POST",
            url: "omdev/smdat0.asp",
            data: "itype="+itype+"&sid="+sid,
            dataType:"json",
            success: function(msg){
                list3(msg)
            }
        });
    }
   list3(json);
    function list3(data){
        var q='';vv='';
        $.each(data.recs,function(i,n){
            vv=n.SerDef.split(":");
            q+="<div class='type3075 empty' style='margin: 10px;'>";
            q+="<table width='100%' style='margin-bottom: 20px'>";
            q+="<tr><td style='border: none'> <h1>网络相机19</h1></td></tr>";
            q+="</table>";
            q+="<div  style='width: 100%;text-align: center'>";
            q+="<form id='fo2'>";
            q+="<object name='Camera0' style='width: 80%' height='500px;' id='Camera0' class='cur'CLASSID='CLSID:0C615F36-0C1C-497B-B9E4-833B0D7AA8CA'CODEBASE='/NetViewX.cab#Version=7,7,0,0'>";
            q+="</object></form>";
            q+="<input type='button' style='width: 100px;height: 30px;margin: 0 30px' onclick='OnClickPlay19(vv[0],vv[1],vv[2],vv[3])'  value='播放'>";
            q+="<input style='width: 100px;height: 30px;margin: 0 30px'  type='button' onclick='OnClickStop19()'  value='停止'>";
            q+="</div>";
            q+="<a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>";
            q+="</div>";
        });
        $(".append").html(q)
    }
    function OnClickPlay19(q,w,e,r) {
        document.getElementById("Camera0").Url = q;
        document.getElementById("Camera0").WServerPort = w;
        document.getElementById("Camera0").Channel     = 0;
        document.getElementById("Camera0").Username    = e;
        document.getElementById("Camera0").Password    = r;
        document.getElementById("Camera0").StartView();
    } //串口相机与网络相机函数
    function OnClickStop19() {
        document.getElementById("fo2").Camera0.StopView();
    }
    function OnClickPlay123() {
        document.getElementById("fo1").player.SetUrl("rtsp://192.168.0.123/mpeg4");
        document.getElementById("fo1").player.SetRTPOverRTSP(1);
        document.getElementById("fo1").player.Play();
    }
    function OnClickStop123() {
        document.getElementById("fo1").player.Stop();
    }

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