Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ]<html>
- <head>
- <link rel="stylesheet" href="style.css" type="text/css">
- <title>IPCam</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="keywords" content="camera">
- <style type="text/css">
- <!--
- body {
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- background-color: #999999;
- }
- .style2 {font-size: 12px}
- -->
- </style>
- <script src="public.js"></script>
- <script src="check_user.cgi"></script>
- <script src="get_status.cgi"></script>
- <script type="text/javascript">
- if(sys_ver.charAt(0)!='4')
- location = 'vererr.htm';
- try{
- user;
- }
- catch(exception){
- location='index.htm';
- }
- var record_osd=1;
- var ptz_type=1;
- var ERROR_TIMEOUT=-3;
- var ERROR_CANCEL=-5;
- var current=0;
- var PRI_REFUSE=0;
- var PRI_VISITOR=1;
- var PRI_OPERATOR=2;
- var PRI_ADMINISTRATOR=3;
- var R160_120=2;
- var R320_240=8;
- var R640_480=32;
- var PTZ_STOP=1;
- var TILT_UP=0;
- var TILT_UP_STOP=1;
- var TILT_DOWN=2;
- var TILT_DOWN_STOP=3;
- var PAN_LEFT=4;
- var PAN_LEFT_STOP=5;
- var PAN_RIGHT=6;
- var PAN_RIGHT_STOP=7;
- var PTZ_LEFT_UP=90;
- var PTZ_RIGHT_UP=91;
- var PTZ_LEFT_DOWN=92;
- var PTZ_RIGHT_DOWN=93;
- var PTZ_CENTER=25;
- var PTZ_VPATROL=26;
- var PTZ_VPATROL_STOP=27;
- var PTZ_HPATROL=28;
- var PTZ_HPATROL_STOP=29;
- var PTZ_PELCO_D_HPATROL=20;
- var PTZ_PELCO_D_HPATROL_STOP=21;
- var IO_ON=94;
- var IO_OFF=95;
- var cameras={};
- var listen_src="";
- var talk_src="";
- var listen_on_src="";
- var talk_on_src="";
- var record_src="";
- var record_on_src="";
- if(pri == PRI_ADMINISTRATOR)
- document.write('<script src="get_misc.cgi"><\/script>');
- cameras.alias=new Array();
- cameras.host=new Array();
- cameras.port=new Array();
- cameras.user=new Array();
- cameras.pwd=new Array();
- cameras.pri=new Array();
- cameras.valid=new Array();
- cameras.restart=new Array();
- cameras.retry_times=new Array();
- cameras.alarm=new Array();
- cameras.alarm_light=new Array();
- cameras.count=1;
- cameras.first=0;
- cameras.pri[0]=cameras.pri[1]=cameras.pri[2]=cameras.pri[3]=0;
- cameras.pri[4] = cameras.pri[5] = cameras.pri[6] = cameras.pri[7] = 0;
- cameras.pri[8] = 0;
- cameras.set_params=function(index,alias,host,port,user,pwd)
- {
- if ((index > 8) || (index < 0))
- return;
- this.alias[index]=alias;
- this.host[index]=host;
- this.port[index]=port;
- this.user[index]=user;
- this.pwd[index]=pwd;
- }
- cameras.set_count=function(current,count)
- {
- if(count > 9)
- count = 9;
- if ((count > 4) && (count < 9))
- count = 4;
- if (count < 1 || ((count > 1) && (count <4)))
- count = 1;
- this.count=count;
- if (parseInt(current) + parseInt(count) > 9)
- this.first = 9 - count;
- else
- this.first=current;
- for (i = 0;i < 9;++ i)
- this.valid[i]=0;
- for (i=this.first;i<parseInt(this.first)+parseInt(this.count);++i)
- this.valid[i]=1;
- scr9.src="images/x9_off.gif";
- scr4.src="images/x4_off.gif";
- scr1.src="images/x1_off.gif"
- if(count==9)
- scr9.src="images/x9_on.gif";
- else if(count==4)
- scr4.src="images/x4_on.gif";
- else
- scr1.src="images/x1_on.gif"
- }
- function timer()
- {
- if (cameras.alarm[current]==1){
- if (cameras.alarm_light[current]==1)
- {
- sound_player.controls.play();
- device_status.src="images/red.gif";
- cameras.alarm_light[current]=0;
- }
- else
- {
- device_status.src="images/green.gif";
- cameras.alarm_light[current]=1;
- }
- }
- setTimeout('timer()',1000);
- }
- function x_onclick(nSplit)
- {
- if(nSplit !=1 && nSplit!=4 && nSplit != 9)
- nSplit=1;
- if(nSplit==1)
- cameratitle.style.display='none';
- else
- cameratitle.style.display='';
- if (nSplit==1)
- {
- if (cameras.count == 1)
- return;
- cameras.set_count(current,1);
- }
- else if(nSplit==4)
- {
- if (cameras.count == 4)
- return;
- cameras.set_count(current,4);
- }
- else
- {
- if (cameras.count == 9)
- return;
- cameras.set_count(current,9);
- }
- var nWidth;
- for (i = 0;i < 9; ++ i)
- {
- ipcam[i].SetFocus(0);
- if (cameras.valid[i] == 1)
- {
- if ((cameras.count == 1))
- {
- if(ipcam[i].resolution == R640_480){
- ipcam[i].style.width = 640;
- ipcam[i].style.height = 480;
- nWidth = 640;
- }
- else if(ipcam[i].resolution == R320_240){
- ipcam[i].style.width = 320;
- ipcam[i].style.height = 240;
- nWidth = 320;
- }
- else{
- ipcam[i].style.width = 160;
- ipcam[i].style.height = 120;
- nWidth = 160;
- }
- }
- else if(cameras.count == 4)
- {
- ipcam[i].style.width = 320;
- ipcam[i].style.height = 240;
- nWidth = 640;
- }
- else if(cameras.count == 9)
- {
- ipcam[i].style.width = 213;
- ipcam[i].style.height = 160;
- nWidth = 639;
- }
- ipcam[i].PlayVideo();
- }
- else
- {
- ipcam[i].StopVideo();
- ipcam[i].StopRecord();
- ipcam[i].style.width = 0;
- ipcam[i].style.height = 0;
- }
- }
- document.getElementById("ipcamdiv").style.width=nWidth;
- setcookie('split',nSplit,720);
- cameratitle_span.innerText = cameras.alias[current];
- current = -1;
- ipcam_OnFocus(0);
- }
- function set_ipcam_osd(index,osd)
- {
- ipcam[index].OSD=osd;
- }
- function connect_camera(index)
- {
- if (ipcam[index].MonitorStatus!=0)
- return;
- if (cameras.host[index]=='')
- return;
- ipcam[index].DefaultFileName=cameras.alias[index];
- re=ipcam[index].MonitorConnect(cameras.host[index],cameras.port[index],cameras.user[index],cameras.pwd[index]);
- //if (re)
- // showerror(cameras.alias[index],_failtoconnect,re);
- }
- function body_onload()
- {
- var port;
- if (location.port=='')
- port=80;
- else
- port=location.port;
- cameras.set_params(0,alias,location.hostname,port,user,pwd);
- for(i=1;i<=8;i++)
- cameras.set_params(i,'','',0,'','');
- //x1.checked=true;
- current=0;
- try{
- ipcam[0].SetFocus(true);
- }
- catch(exception){ return; }
- for(i=0;i<9;i++){
- ipcam[i].RecordOSD=true;
- ipcam[i].AutoRecordOnAlarm=true;
- ipcam[i].PTZOnScreen=1;
- cameras.pri[i]=PRI_REFUSE;
- cameras.retry_times[i]=0;
- cameras.restart[i]=0;
- cameras.alarm[i]=0;
- cameras.alarm_light[i]=0;
- ipcam[i].BufferTime = 1;
- }
- nsplit=getcookie("split");
- if(nsplit !=1 && nsplit!=4 && nsplit != 9)
- nsplit=1;
- x_onclick(nsplit);
- cameras.set_count(current,nsplit);
- for(i=0;i<nsplit;i++){
- if (cameras.host[i]!='')
- connect_camera(i);
- }
- if(pri == PRI_ADMINISTRATOR)
- document.getElementById('curpos').innerText = ptz_patrol_rate;
- }
- function ipcam_OnFocus(index)
- {
- if (index == current)
- return;
- if(current>=0 && current<9)
- ipcam[current].SetFocus(false);
- current = index;
- cameratitle_span.innerText = cameras.alias[index];
- /* if (cameras.valid[index])
- alias_span.innerText = cameras.alias[index];
- else
- alias_span.innerText = _unsel;
- */
- if (ipcam[index].MonitorStatus == 2)
- {
- resolution.value = ipcam[index].Resolution;
- rMode.value = ipcam[index].Saturation;
- brightness.value = Math.round(ipcam[index].Brightness / 16);
- contrast.value = ipcam[index].Contrast;
- img_reversal.checked = (ipcam[index].CameraFlip & 0x01)?true:false;
- img_mirror.checked = (ipcam[index].CameraFlip & 0x02)?true:false;
- // if(getcookie("audio"+current)=="1")
- // ipcam[index].PlayAudio();
- if(ipcam[index].RecordStatus==2)
- recImage_avi.src=record_on_src;
- else
- recImage_avi.src=record_src;
- if (ipcam[index].AudioStatus==2)
- img_listen.src=listen_on_src;
- else
- img_listen.src=listen_src;
- if (ipcam[index].TalkStatus==2)
- img_talk.src=talk_on_src;
- else
- img_talk.src=talk_src;
- }
- }
- function showhint(str)
- {
- hint_span.innerText=str;
- }
- function body_onunload()
- {
- for (i = 0;i < 9;++ i)
- {
- if(cameras.valid[i]){
- try{
- ipcam[i].SetFocus(true);
- }
- catch(exception){ return; }
- ipcam[i].StopVideo();
- ipcam[i].StopAudio();
- ipcam[i].StopTalk();
- ipcam[i].StopRecord();
- ipcam[i].MonitorDisconnect();
- }
- }
- }
- function OnResolutionChanged(nValue)
- {
- ipcam[current].Resolution = nValue;
- }
- function ipcam_OnMonitorConnectResult(index,result,pri)
- {
- if (result)
- {
- device_status.src="images/yellow.gif";
- if (cameras.retry_times[index]==0)
- {
- if(index==0){
- showerror(cameras.alias[index],_failtoconnect,result);
- location.href='index.htm';
- }
- }
- else
- {
- cameras.retry_times[index] --;
- setTimeout('connect_camera('+index+')',30000);
- }
- }
- else
- {
- cameras.pri[index]=pri+1;
- var bOpe = cameras.pri[index]>PRI_VISITOR;
- var bAdmin = cameras.pri[index]>PRI_OPERATOR;
- if(!bOpe){
- ptzpanel.style.display='none';
- hpatrol.style.display='none';
- vpatrol.style.display='none';
- img_reversal.style.display='none';
- img_mirror.style.display='none';
- bvoption.style.display='none';
- img_option.style.display='none';
- img_switchon.style.display='none';
- img_switchoff.style.display='none';
- tdspeed.style.display='none';
- }
- else if(!bAdmin){
- img_option.style.display='none';
- tdspeed.style.display='none';
- }
- cameras.retry_times[index]=0;
- device_status.src="images/green.gif";
- /* audio[index].src=audio_up.src;
- talk[index].src=talk_up.src;
- */
- if(cameras.valid[index]){
- ipcam[index].PlayVideo();
- }
- }
- }
- function up_onmousedown()
- {
- //up.src=up_down.src;
- if (ipcam[current].CameraFlip&0x01)
- ipcam[current].DecoderControl(TILT_DOWN);
- else
- ipcam[current].DecoderControl(TILT_UP);
- }
- function up_onmouseup()
- {
- //up.src=up_up.src;
- if (ptz_type==0)
- ipcam[current].DecoderControl(PTZ_STOP);
- else if (ipcam[current].CameraFlip&0x01)
- ipcam[current].DecoderControl(TILT_DOWN_STOP);
- else
- ipcam[current].DecoderControl(TILT_UP_STOP);
- }
- function down_onmousedown()
- {
- //down.src=down_down.src;
- if (ipcam[current].CameraFlip&0x01)
- ipcam[current].DecoderControl(TILT_UP);
- else
- ipcam[current].DecoderControl(TILT_DOWN);
- }
- function down_onmouseup()
- {
- //down.src=down_up.src;
- if (ptz_type==0)
- ipcam[current].DecoderControl(PTZ_STOP);
- else if (ipcam[current].CameraFlip&0x01)
- ipcam[current].DecoderControl(TILT_UP_STOP);
- else
- ipcam[current].DecoderControl(TILT_DOWN_STOP);
- }
- function left_onmousedown()
- {
- //left.src=left_down.src;
- if (ipcam[current].CameraFlip&0x02)
- ipcam[current].DecoderControl(PAN_RIGHT);
- else
- ipcam[current].DecoderControl(PAN_LEFT);
- }
- function left_onmouseup()
- {
- //left.src=left_up.src;
- if (ptz_type==0)
- ipcam[current].DecoderControl(PTZ_STOP);
- else if (ipcam[current].CameraFlip&0x02)
- ipcam[current].DecoderControl(PAN_RIGHT_STOP);
- else
- ipcam[current].DecoderControl(PAN_LEFT_STOP);
- }
- function right_onmousedown()
- {
- //right.src=right_down.src;
- if (ipcam[current].CameraFlip&0x02)
- ipcam[current].DecoderControl(PAN_LEFT);
- else
- ipcam[current].DecoderControl(PAN_RIGHT);
- }
- function right_onmouseup()
- {
- //right.src=right_up.src;
- if (ptz_type==0)
- ipcam[current].DecoderControl(PTZ_STOP);
- else if (ipcam[current].CameraFlip&0x02)
- ipcam[current].DecoderControl(PAN_LEFT_STOP);
- else
- ipcam[current].DecoderControl(PAN_RIGHT_STOP);
- }
- function setCameraParam(index)
- {
- var alias, host, port, user, pwd;
- ipcam[index].StopVideo();
- ipcam[index].StopAudio();
- ipcam[index].StopRecord();
- ipcam[index].MonitorDisconnect();
- host=ipcam[0].GetOtherDeviceHost(index);
- alias=ipcam[0].GetOtherDeviceAlias(index);
- if (alias=='')
- alias=_anonymous;
- port=ipcam[0].GetOtherDevicePort(index);
- user=ipcam[0].GetOtherDeviceUser(index);
- pwd=ipcam[0].GetOtherDevicePwd(index);
- if (host=='')
- {
- cameras.set_params(index,'','',0,'','');
- }
- else
- {
- cameras.set_params(index,alias,host,port,user,pwd);
- setTimeout('connect_camera(' + index + ')',1000);
- }
- }
- function ipcam_OnOtherDevicesParamsChanged(index)
- {
- if (index!=0)
- return;
- for(i=1;i<=8;i++)
- setCameraParam(i);
- }
- function ipcam_OnPTZOnScreen(index,ptz)
- {
- try{
- ipcam[index].MonitorStatus;
- }
- catch(exception){ return;}
- if (ipcam[index].MonitorStatus!=2)
- return;
- if (ptz==0)
- {
- ipcam[index].DecoderControl(PTZ_STOP);
- }
- else if (ptz==1)
- {
- if ((ipcam[index].CameraFlip&0x03)==0x03)
- ipcam[index].DecoderControl(PTZ_RIGHT_DOWN);
- else if (ipcam[index].CameraFlip&0x02)
- ipcam[index].DecoderControl(PTZ_RIGHT_UP);
- else if (ipcam[index].CameraFlip&0x01)
- ipcam[index].DecoderControl(PTZ_LEFT_DOWN);
- else
- ipcam[index].DecoderControl(PTZ_LEFT_UP);
- }
- else if (ptz==2)
- {
- if (ipcam[index].CameraFlip&0x01)
- ipcam[index].DecoderControl(TILT_DOWN);
- else
- ipcam[index].DecoderControl(TILT_UP);
- }
- else if (ptz==3)
- {
- if ((ipcam[index].CameraFlip&0x03)==0x03)
- ipcam[index].DecoderControl(PTZ_LEFT_DOWN);
- else if (ipcam[index].CameraFlip&0x02)
- ipcam[index].DecoderControl(PTZ_LEFT_UP);
- else if (ipcam[index].CameraFlip&0x01)
- ipcam[index].DecoderControl(PTZ_RIGHT_DOWN);
- else
- ipcam[index].DecoderControl(PTZ_RIGHT_UP);
- }
- else if (ptz==4)
- {
- if (ipcam[index].CameraFlip&0x02)
- ipcam[index].DecoderControl(PAN_RIGHT);
- else
- ipcam[index].DecoderControl(PAN_LEFT);
- }
- else if (ptz==5)
- {
- ipcam[index].DecoderControl(PTZ_CENTER);
- }
- else if (ptz==6)
- {
- if (ipcam[index].CameraFlip&0x02)
- ipcam[index].DecoderControl(PAN_LEFT);
- else
- ipcam[index].DecoderControl(PAN_RIGHT);
- }
- else if (ptz==7)
- {
- if ((ipcam[index].CameraFlip&0x03)==0x03)
- ipcam[index].DecoderControl(PTZ_RIGHT_UP);
- else if (ipcam[index].CameraFlip&0x02)
- ipcam[index].DecoderControl(PTZ_RIGHT_DOWN);
- else if (ipcam[index].CameraFlip&0x01)
- ipcam[index].DecoderControl(PTZ_LEFT_UP);
- else
- ipcam[index].DecoderControl(PTZ_LEFT_DOWN);
- }
- else if (ptz==8)
- {
- if (ipcam[index].CameraFlip&0x01)
- ipcam[index].DecoderControl(TILT_UP);
- else
- ipcam[index].DecoderControl(TILT_DOWN);
- }
- else if (ptz==9)
- {
- if ((ipcam[index].CameraFlip&0x03)==0x03)
- ipcam[index].DecoderControl(PTZ_LEFT_UP);
- else if (ipcam[index].CameraFlip&0x02)
- ipcam[index].DecoderControl(PTZ_LEFT_DOWN);
- else if (ipcam[index].CameraFlip&0x01)
- ipcam[index].DecoderControl(PTZ_RIGHT_UP);
- else
- ipcam[index].DecoderControl(PTZ_RIGHT_DOWN);
- }
- }
- function snapshot()
- {
- if (ipcam[current].MonitorStatus!=2)
- return;
- window.open('snapshot.htm').focus();
- }
- function record_onclick()
- {
- if ((ipcam[current].VideoStatus!=2)&&(ipcam[current].AudioStatus!=2))
- return;
- if (ipcam[current].RecordStatus==0)
- ipcam[current].StartRecord();
- else
- ipcam[current].StopRecord();
- if (ipcam[current].RecordStatus==1)
- recImage_avi.src=record_on_src;
- else
- recImage_avi.src=record_src;
- }
- function audio_onclick()
- {
- if (ipcam[current].AudioStatus==0){
- ipcam[current].PlayAudio();
- // setcookie("audio"+current,1,720);
- }
- else{
- ipcam[current].StopAudio();
- // setcookie("audio"+current,0,720);
- }
- if (ipcam[current].AudioStatus==1)
- img_listen.src=listen_on_src;
- else
- img_listen.src=listen_src;
- }
- function talk_onclick()
- {
- if (ipcam[current].TalkStatus==0)
- ipcam[current].StartTalk();
- else
- ipcam[current].StopTalk();
- if (ipcam[current].TalkStatus==1)
- img_talk.src=talk_on_src;
- else
- img_talk.src=talk_src;
- }
- function image_reversal_onclick()
- {
- if (ipcam[current].CameraFlip&0x01){
- ipcam[current].CameraFlip=ipcam[current].CameraFlip&0x02;
- }
- else
- ipcam[current].CameraFlip=ipcam[current].CameraFlip|0x01;
- }
- function image_mirror_onclick()
- {
- if (ipcam[current].CameraFlip&0x02)
- ipcam[current].CameraFlip=ipcam[current].CameraFlip&0x01;
- else
- ipcam[current].CameraFlip=ipcam[current].CameraFlip|0x02;
- }
- function image_switchon_onclick()
- {
- ipcam[current].DecoderControl(IO_ON);
- }
- function image_switchoff_onclick()
- {
- ipcam[current].DecoderControl(IO_OFF);
- }
- function ipcam_OnMonitorParamsChanged(index)
- {
- resolution.value=ipcam[index].Resolution;
- rMode.value = ipcam[index].Saturation;
- brightness.value=Math.round(ipcam[index].Brightness / 16);
- contrast.value=ipcam[index].Contrast;
- if(ipcam[index].CameraFlip&0x01)
- img_reversal.src="images/reversal_on.gif";
- else
- img_reversal.src="images/reversal.gif";
- if(ipcam[index].CameraFlip&0x02)
- img_mirror.src="images/mirror_on.gif";
- else
- img_mirror.src="images/mirror.gif";
- // osd.selectedIndex=ipcam[index].OSD;
- // buffer.value=ipcam[index].BufferTime;
- }
- function ipcam_OnMonitorDisconnected(index,reason)
- {
- cameras.pri[index]=PRI_REFUSE;
- if (cameras.host[index]=='')
- device_status.src="images/gray.gif";
- else
- device_status.src="images/yellow.gif"
- if ((!reason)||(reason==ERROR_CANCEL))
- {
- if (cameras.restart[index]==1)
- {
- cameras.restart[index]=0;
- connect_camera(index);
- }
- return;
- }
- cameras.retry_times[index]=10;
- if (index==0)
- setTimeout('connect_camera(0)',30000);
- }
- var s_hpatrol=true;
- var s_vpatrol=true;
- function hpatrol_onclick()
- {
- if(s_hpatrol){
- if (ptz_type==0)
- ipcam[current].DecoderControl(PTZ_HPATROL);
- else
- ipcam[current].DecoderControl(PTZ_PELCO_D_HPATROL);
- s_hpatrol = false;
- }
- else{
- if (ptz_type==0)
- ipcam[current].DecoderControl(PTZ_HPATROL_STOP);
- else
- ipcam[current].DecoderControl(PTZ_PELCO_D_HPATROL_STOP);
- s_hpatrol=true;
- }
- }
- function vpatrol_onclick()
- {
- if(s_vpatrol){
- if (!ptz_type)
- ipcam[current].DecoderControl(PTZ_VPATROL);
- s_vpatrol = false;
- }
- else{
- if (!ptz_type)
- ipcam[current].DecoderControl(PTZ_VPATROL_STOP);
- s_vpatrol=true;
- }
- }
- function ipcam_OnImageSizeChanged(index,width,height)
- {
- if(cameras.count == 1 ){
- ipcam[index].style.width=width;
- ipcam[index].style.height=height;
- }
- }
- function ipcam_OnAlarm(alarm)
- {
- cameras.alarm[0]=1;
- cameras.alarm_light[0]=1;
- device_status.src="images/red.gif";
- }
- function ipcam_OnAlarmStopped(index)
- {
- cameras.alarm[0]=0;
- cameras.alarm_light[0]=0;
- if (ipcam[0].MonitorStatus==2)
- device_status.src="images/green.gif";
- else
- device_status.src="images/yellow.gif";
- }
- function ipcam_OnPlayAudioResult(index,result)
- {
- if (result)
- {
- img_listen.src=listen_src;
- showerror(cameras.alias[index],_failtoplayaudio,result);
- }
- else
- {
- img_listen.src=listen_on_src;
- }
- }
- function ipcam_OnStartTalkResult(index,result)
- {
- if (result)
- {
- img_talk.src=talk_src;
- showerror(cameras.alias[index],_failtostarttalk,result);
- }
- else
- {
- img_talk.src=talk_on_src;
- }
- }
- function ipcam_OnPlayVideoResult(index,result)
- {
- if (result)
- {
- //showerror(cameras.alias[index],_failtoplayvideo,result);
- }
- else
- {
- }
- }
- function getX(elem){
- var x = 0;
- while(elem){
- x = x + elem.offsetLeft;
- elem = elem.offsetParent;
- }
- return x;
- }
- function getY(elem){
- var y = 0;
- while(elem){
- y = y + elem.offsetTop;
- elem = elem.offsetParent;
- }
- return y;
- }
- function showpostable()
- {
- var tb=document.getElementById('postable');
- var curpos=document.getElementById('curpos');
- var nleft=getX(curpos);
- var ntop=getY(curpos);
- tb.style.left=nleft-96;
- tb.style.top=ntop-4;
- tb.style.display = "block";
- }
- function hidepostable()
- {
- var tb=document.getElementById('postable');
- tb.style.display = "none";
- }
- function setspeed(nValue)
- {
- action_zone.location='set_misc.cgi?ptz_patrol_rate='+nValue;
- document.getElementById('curpos').innerText = nValue;
- }
- setTimeout('timer()',1000);
- </script>
- <script language="JavaScript" type="text/JavaScript">
- <!--
- function MM_reloadPage(init) { //reloads the window if Nav4 resized
- if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
- document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
- else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
- }
- MM_reloadPage(true);
- //-->
- </script>
- <SCRIPT FOR="ipcam" EVENT="OnOtherDevicesParamsChanged()">ipcam_OnOtherDevicesParamsChanged(this.name)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnMonitorConnectResult(result,pri)">ipcam_OnMonitorConnectResult(this.name,result,pri)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnPTZOnScreen(ptz)">ipcam_OnPTZOnScreen(this.name,ptz)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnMonitorParamsChanged">ipcam_OnMonitorParamsChanged(this.name)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnMonitorDisconnected(reason)">ipcam_OnMonitorDisconnected(this.name,reason)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnImageSizeChanged(width,height)">ipcam_OnImageSizeChanged(this.name,width,height)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnAlarm(alarm)">ipcam_OnAlarm(alarm)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnAlarmStopped">ipcam_OnAlarmStopped()</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnPlayAudioResult(result)">ipcam_OnPlayAudioResult(this.name,result)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnStartTalkResult(result)">ipcam_OnStartTalkResult(this.name,result)</SCRIPT>
- <SCRIPT LANGUAGE=javascript FOR=ipcam EVENT=OnFocus>ipcam_OnFocus(this.name)</SCRIPT>
- <SCRIPT FOR="ipcam" EVENT="OnPlayVideoResult(result)">ipcam_OnPlayVideoResult(this.name,result)</SCRIPT>
- </head>
- <body align="center" onLoad="body_onload()" onUnload="body_onunload()">
- <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="right" valign="middle" height="100%"><table width="320" height="281" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td ><img src="images/2_10.gif" width="35" height="20"></td>
- <td width="424" height="20" background="images/2_11.gif"></td>
- <td width="24"><img src="images/2_12.gif" width="11" height="20"></td>
- </tr>
- <tr>
- <td valign="top" background="images/2_26.gif" style="background-repeat:repeat-y"><img src="images/2_13.gif" width="35" height="30"><br>
- <br> </td>
- <td rowspan="3"><div name="ipcamdiv" id="ipcamdiv" align="center">
- <span><OBJECT id=ipcam name = 0 style="LEFT: 0px; TOP: 0px" height=240 width=320 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 1 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 2 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 3 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 4 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 5 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 6 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 7 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <span><OBJECT id=ipcam name = 8 style="LEFT: 0px; TOP: 0px" height=0 width=0 classid=clsid:A4150320-98EC-4DB6-9BFB-EBF4B6FBEB16 VIEWASTEXT>
- <PARAM NAME="_Version" VALUE="65536"><PARAM NAME="_ExtentX" VALUE="8467">
- <PARAM NAME="_ExtentY" VALUE="6350"><PARAM NAME="_StockProps" VALUE="0"></OBJECT></span>
- <script>
- try{
- if(ipcam[0].OSD==undefined)
- document.write("<FONT COLOR=red SIZE=4>" + _noocx + "<a href='./codebase/IPCam902.exe'>" + _here + "</a>" + _download + "</FONT>");
- }
- catch(exception){
- document.write("<FONT COLOR=red SIZE=4>" + _noocx + "<a href='./codebase/IPCam902.exe'>" + _here + "</a>" + _download + "</FONT>");
- }
- </script>
- </div></td>
- <td rowspan="3" valign="top" background="images/2_27.gif" style="background-repeat:repeat-y"> </td>
- </tr>
- <tr>
- <td background="images/2_26.gif" style="background-repeat:repeat-y"><img src="images/2_16.gif" width="35" height="166"></td>
- </tr>
- <tr>
- <td background="images/2_26.gif" style="background-repeat:repeat-y"> </td>
- </tr>
- <tr>
- <td><img src="images/2_18.gif" width="35" height="20"></td>
- <td background="images/2_19.gif"></td>
- <td><img src="images/2_20.gif" width="11" height="20"></td>
- </tr>
- </table></td>
- <td valign="middle"><table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><img src="images/2_08.gif" width="209" height="30"></td>
- </tr>
- <tr>
- <td align="center" bordercolor="0" style="background-repeat:repeat-y,repeat-x" ><table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" background="images/2_07.gif">
- <tr>
- <td><div align="center"><img id="img_logo" src="images/logo.gif" width="174" height="34"></div></td>
- </tr>
- <tr>
- <td><div align="center"><img src="images/line.gif" width="192" height="8"></div></td>
- </tr>
- </table>
- <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/2_09.gif">
- <tr id="cameratitle">
- <td height="20" align="center"><strong><span class="style2" id="cameratitle_span"></span></strong></td>
- </tr>
- <tr>
- <td align="center"><img id="ptzpanel" src="images/btn_circle.gif" width="105" height="105" border="0" usemap="#Map7MapMap">
- <map name="Map7MapMap">
- <area shape="circle" id="ptz_center" coords="53,52,28" href="#" onClick="if (!ptz_type) ipcam[current].DecoderControl(PTZ_CENTER)">
- <area shape="rect" id="ptz_left" coords="6,33,22,73" href="#" onMouseDown="left_onmousedown();" onMouseUp="left_onmouseup();">
- <area shape="rect" id="ptz_down" coords="32,83,76,99" href="#"onMouseDown="down_onmousedown();" onMouseUp="down_onmouseup();">
- <area shape="rect" id="ptz_right" coords="85,32,100,73" href="#" onMouseDown="right_onmousedown();" onMouseUp="right_onmouseup();">
- <area shape="rect" id="ptz_up" coords="30,6,75,21" href="#" onMouseDown="up_onmousedown();" onMouseUp="up_onmouseup();">
- </map></td>
- </tr>
- <tr>
- <td height="32" align="center"> <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><img src="images/gray.gif" name="0" border="0" id="device_status"></td>
- <td><img src="images/hpatrol_up.gif" width="24" height="23" border="0" class="curspan" id="hpatrol" onClick="hpatrol_onclick()" onMouseOver="showhint(_hori_par)" onMouseOut="showhint('')"></td>
- <td><img src="images/vpatrol_up.gif" width="24" height="23" border="0" class="curspan" id="vpatrol" onClick="vpatrol_onclick()" onMouseOver="showhint(_ver_par)" onMouseOut="showhint('')"></td>
- <td id="tdspeed" width="24" height="23" align="center" background="images/pt_speed.gif">
- <strong><span class="curspan2" id="curpos" onmousedown="showpostable();" onMouseOver="showhint(_set_ptz_speed)" onMouseOut="showhint('')"> </span></strong>
- <div id="postable" style="display:none;position:absolute; left:100px; top:100px; width:101px; height:104px; z-index:1">
- <table border="1" cellpadding="0" cellspacing="0" bgcolor="#993333">
- <tr>
- <td width="20"><div align="center"><span class="style3 curspan2" onclick="setspeed(0);hidepostable()"> 0 </span></div></td>
- <td width="20"><div align="center"><span class="style3 curspan2" onclick="setspeed(1);hidepostable()"> 1 </span></div></td>
- <td width="20"><div align="center"><span class="style3 curspan2" onclick="setspeed(2);hidepostable()"> 2 </span></div></td>
- <td width="20"><div align="center"><span class="style3 curspan2" onclick="hidepostable()">x</span></div></td>
- </tr>
- <tr>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(3);hidepostable()"> 3 </span></div></td>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(4);hidepostable()"> 4 </span></div></td>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(5);hidepostable()"> 5 </span></div></td>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(6);hidepostable()">6</span></div></td>
- </tr>
- <tr>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(7);hidepostable()"> 7 </span></div></td>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(8);hidepostable()"> 8 </span></div></td>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(9);hidepostable()"> 9 </span></div></td>
- <td><div align="center"><span class="style3 curspan2" onclick="setspeed(10);hidepostable()">10 </span></div></td>
- </tr>
- </table>
- </div></td>
- </tr>
- </table> <img src="images/reversal.gif" width="24" height="23" border="0" class="curspan" id="img_reversal" onClick="image_reversal_onclick()" onMouseOver="showhint(_rev)" onMouseOut="showhint('')"> <img src="images/mirror.gif" width="24" height="23" border="0" class="curspan" id="img_mirror" onClick="image_mirror_onclick()" onMouseOver="showhint(_mirror)" onMouseOut="showhint('')"> <img src="images/switchon_up.gif" width="24" height="23" border="0" class="curspan" id="img_switchon" onClick="image_switchon_onclick()" onMouseOver="showhint(_switchon)" onMouseOut="showhint('')"> <img src="images/switchoff_up.gif" width="24" height="23" border="0" class="curspan" id="img_switchoff" onClick="image_switchoff_onclick()" onMouseOver="showhint(_switchoff)" onMouseOut="showhint('')"></td>
- </tr>
- <tr>
- <td height="30" align="center" valign="middle"><table width="138" border="0" cellspacing="0" cellpadding="0">
- <tr align="center">
- <td><img id="scr1" class="curspan" src="images/x1_off.gif" onClick="x_onclick(1)"></td>
- <td><img id="scr4" class="curspan" src="images/x4_off.gif" onClick="x_onclick(4)"></td>
- <td><img id="scr9" class="curspan" src="images/x9_off.gif" onClick="x_onclick(9)"></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="90" align="center"><table id="bvoption" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><span class="style2">
- <script>document.write(_resolution);</script></span> </td>
- <td><select style="width=80" id="resolution" name="resolution" class="s4" onChange="OnResolutionChanged(this.value)">
- <option value="8">320*240</option>
- <option value="32">640*480</option>
- </select></td>
- </tr>
- <tr>
- <td><span class="style2">
- <script>document.write(_mode);</script></span> </td>
- <td><select style="width=80" id="rMode" name="rMode" class="s4" onChange="ipcam[current].Saturation=this.value">
- <option value="0">50 HZ</option>
- <option value="1">60 HZ</option>
- <option value="2"><script>document.write(_outdoor);</script></option>
- </select></td>
- </tr>
- <tr>
- <td><span class="style2">
- <script>document.write(_brightness);</script></span></td>
- <td><select style="width=40" id="brightness" class="s4" onChange="ipcam[current].Brightness=((parseInt(brightness.value)))*16" name="brightness">
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- <option value="7">7</option>
- <option value="8">8</option>
- <option value="9">9</option>
- <option value="10">10</option>
- <option value="11">11</option>
- <option value="12">12</option>
- <option value="13">13</option>
- <option value="14">14</option>
- <option value="15">15</option>
- </select></td>
- </tr>
- <tr>
- <td><span class="style2">
- <script>document.write(_contrast);</script></span></td>
- <td><select style="width=40" id="contrast" class="s4" onChange="ipcam[current].Contrast=contrast.value" name="contrast">
- <option value="0">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- </select></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="45" align="center" valign="bottom"><img src="images/btn_luxiang.gif" hspace="6" border="0" class="curspan" id="recImage_avi" onClick="record_onclick()" onMouseOver="showhint(_record)" onMouseOut="showhint('')">
- <img id="img_snapshot" class="curspan" src="images/btn_paizhao.gif" onClick="snapshot()" hspace="6" border="0" onMouseOver="showhint(_snapshot)" onMouseOut="showhint('')"></td>
- </tr>
- <tr>
- <td height="45" align="center"><img id="img_listen" class="curspan" src="images/btn_jianting.gif" onClick="audio_onclick()" onMouseOver="showhint(_listen)" onMouseOut="showhint('')" width="60" height="34" hspace="6" border="0">
- <img id="img_talk" class="curspan" src="images/btn_talk.gif" onclick="talk_onclick()" onMouseOver="showhint(_talk)" onMouseOut="showhint('')" width="60" height="34" hspace="6" border="0"></td>
- </tr>
- <tr>
- <td height="15" align="center"><span class="style2" id="hint_span"></span></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td height="34" align="center" background="images/2_24.gif"><a href="admin.htm" target="_self"><img id="img_option" src="images/btn_shezhi.gif" width="189" height="38" border="0" onMouseOver="showhint(_setting)" onMouseOut="showhint('')"></a></td>
- </tr>
- </table></td>
- </tr>
- </table>
- <map name="Map7Map">
- <area shape="circle" id="ptz_center" coords="53,52,28" href="#" onClick="if (!ptz_type) ipcam[current].DecoderControl(PTZ_CENTER)">
- <area shape="rect" id="ptz_left" coords="6,33,22,73" href="#" onMouseDown="left_onmousedown();" onMouseUp="left_onmouseup();">
- <area shape="rect" id="ptz_down" coords="32,83,76,99" href="#"onMouseDown="down_onmousedown();" onMouseUp="down_onmouseup();">
- <area shape="rect" id="ptz_right" coords="85,32,100,73" href="#" onMouseDown="right_onmousedown();" onMouseUp="right_onmouseup();">
- <area shape="rect" id="ptz_up" coords="30,6,75,21" href="#" onMouseDown="up_onmousedown();" onMouseUp="up_onmouseup();">
- </map>
- <script>
- document.getElementById("ptz_center").alt=_ptz_center;
- document.getElementById("ptz_left").alt=_ptz_left;
- document.getElementById("ptz_down").alt=_ptz_down;
- document.getElementById("ptz_right").alt=_ptz_right;
- document.getElementById("ptz_up").alt=_ptz_up;
- listen_src="images/btn_jianting.gif";
- listen_on_src="images/btn_jianting_on.gif";
- talk_src="images/btn_talk.gif";
- talk_on_src="images/btn_talk_on.gif";
- record_src="images/btn_luxiang.gif";
- record_on_src="images/btn_luxiang_on.gif";
- recImage_avi.src="images/btn_luxiang.gif";
- img_snapshot.src="images/btn_paizhao.gif";
- img_option.src="images/btn_shezhi.gif";
- if(language=='simple_chinese')
- img_logo.src="images/logo.gif";
- else if(language=='traditional_chinese')
- img_logo.src="images/logo_big5.gif";
- else if(language=='spanish')
- img_logo.src="images/logo_spa.gif";
- else if(language=='french')
- img_logo.src="images/logo_fr.gif";
- else
- img_logo.src="images/logo_en.gif";
- img_listen.src=listen_src;
- img_talk.src=talk_src;
- recImage_avi.src=record_src;
- </script>
- <object id="sound_player" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" width="0" height="0"><param name="url" value="images/alarm.wav"><param name="autoStart" value="false"><param name="playCount" value="1"><param name="rate" value="1"></object>
- <iframe id="action_zone" name="action_zone" style="display:none"></iframe>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement