function iniocx(){ ; } function showlogin(){ $('l').style.top="0px"; } function ld() { //var ip = $("ip").value; var ip = location.hostname; var username = $("username").value; var password = $("password").value; var r=ocx.LoginDevice(ip,0,username,password); if (r==1){ chkdev(); resize(); getcl(); $('password').value=""; $('l').style.display="none"; $('m').style.top="0px"; settings['username'] = username; savesetting(); } } function lo() { ocx.LogoutDevice(); $('m').style.top="-10000px"; $('l').style.display=""; closemu(); if (gdj==1){ gdj=0; $('xdj').innerText=tl('AudioTalk'); } ocx.CloseLocalPlay(); } function ca(o,ch) { if ($(o).hasClass('cl1')){ if (ocx.ConnectRealVideo(ch,1)){ ; } } else{ if (!ocx.DisConnectRealVideo(ch)){ ; } } closemu(); } function cptz(){ if (gptz==0) { gptz=1; ocx.ControlPtz(51,0,0,0,0); } else{ gptz=0; ocx.ControlPtz(51,0,0,0,1); } } function cxh(o,ts,tb){ if (gxh==0) { if (ocx.ControlPtz(13,$('pv').value,0,76,0)) { gxh=1; o.innerText=ts; } } else{ if (ocx.ControlPtz(13,$('pv').value,0,96,0)) { gxh=0; o.innerText=tb; } } } function cxz(o,ts,tb){ if (gxz==0) { if (ocx.ControlPtz(39,0,0,0,0)) { gxz=1; o.innerText=ts; } } else{ if (ocx.ControlPtz(40,0,0,0,0)) { gxz=0; o.innerText=tb; } } } function cxs(o,ts,tb){ if (gxs==0) { if (ocx.ControlPtz(43,0,0,0,0)) { gxs=1; o.innerText=ts; } } else{ if (ocx.ControlPtz(44,0,0,0,0)) { gxs=0; o.innerText=tb; } } } function cxj(o,ts,tb){ if (gxj==0) { if (ocx.ControlPtz(47,$('pv').value,0,0,0)) { gxj=1; o.innerText=ts; } } else{ if (ocx.ControlPtz(48,$('pv').value,0,0,0)) { gxj=0; o.innerText=tb; } } } function cdj(o,ts,tb){ var ret; if (gdj==0) { if (ocx.ControlTalking(1)) { gdj=1; o.innerText=ts; } } else{ if (ocx.ControlTalking(0)) { gdj=0; o.innerText=tb; } } } function cdg(o,ts,tb){ if (gdg==0) { if (ocx.ControlPtz(14,1,0,0,0)) { gdg=1; o.innerText=ts; } } else{ if (ocx.ControlPtz(14,0,0,0,0)) { gdg=0; o.innerText=tb; } } } function sldtopos(sld,step){ sld.knob.setStyle('left', sld.toPosition(step)); } function txreset(){ gslda.set(64); gsldb.set(64); gsldc.set(64); gsldd.set(64); } function getcolors(){ var colors=""; colors=ocx.GetColor(); var t= new Array(); if (colors !="") t=colors.split(','); sldtopos(gslda,parseInt(t[0])); sldtopos(gsldb,parseInt(t[1])); sldtopos(gsldc,parseInt(t[2])); sldtopos(gsldd,parseInt(t[3])); setcolorsv(1,parseInt(t[0])); setcolorsv(2,parseInt(t[1])); setcolorsv(3,parseInt(t[2])); setcolorsv(4,parseInt(t[3])); } function setcolorsv(f,v){ switch (f) { case 1: gca=v; $('ska').title=v; break; case 2: gcb=v; $('skb').title=v; break; case 3: gcc=v; $('skc').title=v; break; case 4: gcd=v; $('skc').title=v; break; } } function setcolors(){ ocx.SetColor(0,gca,gcb,gcc,gcd); } function showmu(o,cid){ if (gcid==cid){ closemu(); } else{ gcid=cid; $('cmu').setProperty('title', cid); $('cmu').injectAfter($(o).getParent()); $('cmu').setStyle('height', 35); } } function closemu(){ gcid=-1; $('cmu').injectAfter($('cl')); $('cmu').setStyle('height', '0'); } function onmu(f){ var cid=$('cmu').getProperty('title'); ocx.ConnectRealVideo(parseInt(cid),f) closemu(); } function tl(s){ var ret; ret=ocx.Translate(s); return ret; } function chkdev(){ var strhtm=""; var sret=""; sret=ocx.GetDevConfig(1); if (sret.substring(0,1)=="1") strhtm=""+ tl('MainStream') +""; if (sret.substring(1,2)=="1") strhtm=strhtm+""+ tl('SecondStream') +""; $('cmu').setHTML(strhtm); //sret=ocx.GetDevConfig(2); //if (sret!='0') //{ //$('xptjr').style.display=""; //} } function savesetting(){ HashCookie.extend(settings); } function getsetting(){ if (HashCookie.get('username')) { settings['username'] = HashCookie.get('username'); } else { settings['username'] = ''; } $('username').setProperty('value', settings['username']); } function reps(str){ var strReg1 =/"/g; var strReg2=/'/g; var strReg3=//g; var ret=str.replace(strReg1, """); ret=ret.replace(strReg2, "´"); ret=ret.replace(strReg3, "<;"); ret=ret.replace(strReg4, ">"); return ret; } function showmu1(){ if (gfmu1==0) { gfmu1=1; $('smu1').style.display=""; } else{ closemu1(); } } function closemu1(){ gfmu1=0; $('smu1').style.display="none"; } function onmu1(v){ $('ps').value=v; closemu1(); } function getcl(){ var t= new Array(); var ts=new Array(); var shtml=""; var strsplita=String.fromCharCode(9); var strsplitb=String.fromCharCode(16); var sc; sc=ocx.GetChannelName(); if (sc !=""){ sc=sc.substr(0, sc.length-1); t=sc.split(strsplita); for (var i =0; i
" + ts[1] + "
" t[i]=ts; } $("cl").innerHTML=shtml; var ls = $$('#cl li'); ls.each(function(element) { var fx = new Fx.Styles(element, {duration:100, wait:false}); element.addEvent('mouseenter', function(){ fx.start({ 'opacity':1 }); }); element.addEvent('mouseleave', function(){ fx.start({ 'opacity':0.001 }); }); }); } } function rfc(){ var t= new Array(); var ts=new Array(); var shtml=""; var strsplita=String.fromCharCode(9); var strsplitb=String.fromCharCode(16); var sc; sc=ocx.GetChannelName(); if (sc !=""){ sc=sc.substr(0, sc.length-1); t=sc.split(strsplita); for (var i =0; i
用户名:
密码:
IP:
  • 录像查询
  • 报警设置
  • 系统配置
  • 关于
  • 退出